From 5ba24f6befb6016410df398a049054cf34365895 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 14 Sep 2011 14:18:13 -0400 Subject: 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. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3