From 5588d9d7828ad6a734a75b6246381f7efc350534 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Wed, 29 Sep 2010 18:46:34 -0400 Subject: [PATCH] find $GNUSTEP_MAKEFILES Enable locating the GNUstep makefiles using the various schemes available (in order of reliability), eventually reaching a hardcoded default. --- tools/Forge/Bundles/MapEdit/GNUmakefile | 2 ++ tools/Forge/Bundles/MapEdit/GNUmakefile.bundle | 2 ++ .../Bundles/MapEdit/GNUmakefile.find-makefiles | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 tools/Forge/Bundles/MapEdit/GNUmakefile.find-makefiles diff --git a/tools/Forge/Bundles/MapEdit/GNUmakefile b/tools/Forge/Bundles/MapEdit/GNUmakefile index 69bad11c5..70573b3bf 100644 --- a/tools/Forge/Bundles/MapEdit/GNUmakefile +++ b/tools/Forge/Bundles/MapEdit/GNUmakefile @@ -1,3 +1,5 @@ +include GNUmakefile.find-makefiles + include $(GNUSTEP_MAKEFILES)/common.make # diff --git a/tools/Forge/Bundles/MapEdit/GNUmakefile.bundle b/tools/Forge/Bundles/MapEdit/GNUmakefile.bundle index 5483856ab..96effd62e 100644 --- a/tools/Forge/Bundles/MapEdit/GNUmakefile.bundle +++ b/tools/Forge/Bundles/MapEdit/GNUmakefile.bundle @@ -1,3 +1,5 @@ +include GNUmakefile.find-makefiles + include $(GNUSTEP_MAKEFILES)/common.make BUNDLE_NAME= MapEdit diff --git a/tools/Forge/Bundles/MapEdit/GNUmakefile.find-makefiles b/tools/Forge/Bundles/MapEdit/GNUmakefile.find-makefiles new file mode 100644 index 000000000..3d7f8f4e4 --- /dev/null +++ b/tools/Forge/Bundles/MapEdit/GNUmakefile.find-makefiles @@ -0,0 +1,13 @@ +# Make sure that GNUSTEP_MAKEFILES is set. +# First, try the "gnustep-config" program which should be in the path somewhere. +# If that fails, try sourcing the GNUstep.conf file (which should be a legal Make fragment). +# Finally, just give up and assume the default value. +ifeq ($(GNUSTEP_MAKEFILES),) +GNUSTEP_MAKEFILES=$(shell gnustep-config --variable=GNUSTEP_MAKEFILES) +ifeq ($(GNUSTEP_MAKEFILES),) +-include /etc/GNUstep/GNUstep.conf +ifeq ($(GNUSTEP_MAKEFILES),) +GNUSTEP_MAKEFILES=/usr/GNUstep/Library/Makefiles +endif +endif +endif