[csw-devel] SF.net SVN: gar:[14855] csw/mgar/gar/v2/category.mk
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Tue Jun 21 23:48:27 CEST 2011
Revision: 14855
http://gar.svn.sourceforge.net/gar/?rev=14855&view=rev
Author: skayser
Date: 2011-06-21 21:48:27 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
gar/v2: add sanity checks for required make features
Modified Paths:
--------------
csw/mgar/gar/v2/category.mk
Modified: csw/mgar/gar/v2/category.mk
===================================================================
--- csw/mgar/gar/v2/category.mk 2011-06-21 13:29:21 UTC (rev 14854)
+++ csw/mgar/gar/v2/category.mk 2011-06-21 21:48:27 UTC (rev 14855)
@@ -5,7 +5,20 @@
# is slightly misleading and could be subject to future change.
#
-# Determine this file's directory, i.e. the GAR base directory
+# Safety check, we need GNU make >= 3.81 for the magic further below,
+# more precisly: 3.80 for $(MAKEFILE_LIST), 3.81 for $(lastword ...)
+# c.f.: http://cvs.savannah.gnu.org/viewvc/make/NEWS?root=make&view=markup
+ifeq (,$(and $(MAKEFILE_LIST),$(lastword test)))
+define error_msg
+GNU make >= 3.81 required.
+Try "pkgutil -i gmake" and prepend /opt/csw/bin to your $$PATH.
+endef
+ $(error $(error_msg))
+endif
+
+# Determine this file's directory, i.e. the GAR base directory. We
+# need to do this dynamically as we don't want to rely on the presence
+# of gar/ symlinks in each build directory.
GARDIR := $(dir $(lastword $(MAKEFILE_LIST)))
ifeq (,$(wildcard $(GARDIR)/categories/$(CATEGORIES)/category.mk))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list