[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gsrc-commit] /srv/bzr/gsrc/trunk r1407: improve external dependency han
From: |
Brandon Invergo |
Subject: |
[Gsrc-commit] /srv/bzr/gsrc/trunk r1407: improve external dependency handling |
Date: |
Thu, 13 Dec 2012 00:26:53 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 1407
committer: Brandon Invergo <address@hidden>
branch nick: trunk
timestamp: Thu 2012-12-13 00:26:53 +0100
message:
improve external dependency handling
modified:
gar.lib/external.mk
=== modified file 'gar.lib/external.mk'
--- a/gar.lib/external.mk 2011-09-02 14:11:53 +0000
+++ b/gar.lib/external.mk 2012-12-12 23:26:53 +0000
@@ -1,3 +1,8 @@
+include ../../config.mk
+include ../../gar.conf.mk
+include ../../gar.env.mk
+-include ../../gar.site.mk
+
# Function: gar_patternlist
# Usage: $(call gar_patternlist,$(PATH),$(PATTERNS))
# Description: Create a list of files to check for that match pattern, in path.
@@ -32,11 +37,19 @@
.PKGPATTERNS ?= %.pc
.MANPATTERNS ?= $(foreach i,1 2 3 4 5 6 7 8,man$i/%.$i*)
-MISSING_BINFILES = $(call gar_missing,$(BINFILES),$(PATH)
,$(.BINPATTERNS))
-MISSING_LIBFILES = $(call
gar_missing,$(LIBFILES),$(LD_LIBRARY_PATH),$(.LIBPATTERNS))
-MISSING_PYFILES = $(call gar_missing,$(PYFILES) ,$(PYTHONPATH)
,$(.PYPATTERNS) )
-MISSING_PKGFILES = $(call
gar_missing,$(PKGFILES),$(PKG_CONFIG_PATH),$(.PKGPATTERNS))
-MISSING_MANFILES = $(call gar_missing,$(MANFILES),$(MANPATH)
,$(.MANPATTERNS))
+# not all systems add the usual system directorys to LD_LIBRARY_PATH
+SYSLIBS = /lib:/usr/lib:/usr/local/lib
+
+MISSING_BINFILES = $(call gar_missing,$(BINFILES),$(PATH), \
+ $(.BINPATTERNS))
+MISSING_LIBFILES = $(call
gar_missing,$(LIBFILES),$(LD_LIBRARY_PATH):$(SYSLIBS), \
+ $(.LIBPATTERNS))
+MISSING_PYFILES = $(call gar_missing,$(PYFILES) ,$(PYTHONPATH), \
+ $(.PYPATTERNS))
+MISSING_PKGFILES = $(call gar_missing,$(PKGFILES),$(PKG_CONFIG_PATH), \
+ $(.PKGPATTERNS))
+MISSING_MANFILES = $(call gar_missing,$(MANFILES),$(MANPATH), \
+ $(.MANPATTERNS))
MISSING_FILES = $(strip \
$(MISSING_BINFILES) \
@@ -52,17 +65,23 @@
MISSING ?= install-message
install: variable-install
+
variable-install: $(if $(MISSING_FILES),$(MISSING));
+install-p: $(if $(MISSING_FILES),error)
+ @echo -e "[$(OK)install-p$(OFF] $(MSG)$(GARNAME) is installed$(OFF)"
+
reinstall-p: $(if $(MISSING_FILES),error)
- @echo "$(GARNAME) is installed"
+ @echo -e "[$(OK)install-p$(OFF)] $(MSG)$(GARNAME) is installed$(OFF)"
error:
+ @echo -e "[$(OK)install-p$(OFF)] $(ERR)$(GARNAME) is not
installed$(OFF)"
@exit 1
install-message:
- @echo "Please install \`$(GARNAME)' using a system other than GSRC."
- @echo $(INSTALL_CMD)
+ @echo -e "[$(ERR)install-deps$(OFF)] $(MSG)Please install \`$(GARNAME)'
\
+using a system other than GSRC."
+ @echo -e " $(INSTALL_CMD)$(OFF)"
@exit 1
fetch checksum extract configure build clean:
@@ -78,7 +97,7 @@
endif
ifneq ($(strip $(call gar_pathsearch,apt-get,$(PATH),$(.BINPATTERNS))),)
-INSTALL_CMD ?= eg: $(SUDO) apt-get install $(GARNAME)
+INSTALL_CMD ?= eg: $(SUDO) apt-get install $(GARNAME) $(GARNAME)-dev
endif
ifneq ($(strip $(call gar_pathsearch,yum,$(PATH),$(.BINPATTERNS))),)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gsrc-commit] /srv/bzr/gsrc/trunk r1407: improve external dependency handling,
Brandon Invergo <=