aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-14 14:18:13 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-09-14 14:18:13 -0400
commit22d4c0f7055f1dbdb45230c118e985ac48ec7f92 (patch)
treea936174e66e85776472d5a5111da3c774f42624a /Makefile
parent0ae1bcb110eec198e1efcbf3ddb8fe3e88b03fbe (diff)
Make it easier to use the libmaple build system externally.
It's been tricky for users to start their own projects while still using our build system. The current recommended practice to get this done involves modifying the top-level Makefile to add their module into LIBMAPLE_MODULES, and include their own rules.mk. Editing the repository Makefile is stupid and shouldn't be a necessary step. Instead of that, allow the environment to provide the initial value for LIBMAPLE_MODULES. This allows users to specify it on the command line. Also add WIRISH_PATH to the initial set of "useful" paths.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6d49e01..fc36667 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ SRCROOT := $(LIB_MAPLE_HOME)
endif
BUILD_PATH = build
LIBMAPLE_PATH := $(SRCROOT)/libmaple
+WIRISH_PATH := $(SRCROOT)/wirish
SUPPORT_PATH := $(SRCROOT)/support
# Support files for linker
LDDIR := $(SUPPORT_PATH)/ld
@@ -66,7 +67,12 @@ include $(SUPPORT_PATH)/make/build-templates.mk
## Set all submodules here
##
-LIBMAPLE_MODULES := $(SRCROOT)/libmaple
+# Try to keep LIBMAPLE_MODULES a simply-expanded variable
+ifeq ($(LIBMAPLE_MODULES),)
+ LIBMAPLE_MODULES := $(SRCROOT)/libmaple
+else
+ LIBMAPLE_MODULES += $(SRCROOT)/libmaple
+endif
LIBMAPLE_MODULES += $(SRCROOT)/wirish
# Official libraries:
LIBMAPLE_MODULES += $(SRCROOT)/libraries/Servo