aboutsummaryrefslogtreecommitdiffstats
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
commit5ba24f6befb6016410df398a049054cf34365895 (patch)
treea936174e66e85776472d5a5111da3c774f42624a /Makefile
parent8a86c2f1b6001e1762826696cc7cfecd52e31d3c (diff)
downloadlibrambutan-5ba24f6befb6016410df398a049054cf34365895.tar.gz
librambutan-5ba24f6befb6016410df398a049054cf34365895.zip
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