summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorJon <[email protected]>2012-05-23 11:09:07 -0400
committerJon <[email protected]>2012-05-23 13:19:16 -0400
commit6f00683e8729ad2a834de80ef312711d56a23d67 (patch)
treea7021ad4b4a5686630563f4551754cdb88cedbaf /Makefile
parent265ff670c8545a6ebaba7c13d946fc3c70eef36f (diff)
downloadmruby-6f00683e8729ad2a834de80ef312711d56a23d67.tar.gz
mruby-6f00683e8729ad2a834de80ef312711d56a23d67.zip
Add `help` and `showconfig` targets to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fc22089a9..dbb2f173a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,12 @@ else
endif
##############################
+# internal variables
+
+export MSG_BEGIN = @for line in
+export MSG_END = ; do echo "$$line"; done
+
+##############################
# generic build targets, rules
.PHONY : all
@@ -39,3 +45,29 @@ clean :
@$(MAKE) clean -C tools/mruby $(MAKE_FLAGS)
@$(MAKE) clean -C tools/mirb $(MAKE_FLAGS)
@$(MAKE) clean -C test $(MAKE_FLAGS)
+
+# display help for build configuration and interesting targets
+.PHONY : showconfig
+showconfig :
+ $(MSG_BEGIN) \
+ "" \
+ " CC = $(CC)" \
+ " LL = $(LL)" \
+ " MAKE = $(MAKE)" \
+ "" \
+ " CFLAGS = $(CFLAGS)" \
+ " ALL_CFLAGS = $(ALL_CFLAGS)" \
+ $(MSG_END)
+
+.PHONY : help
+help :
+ $(MSG_BEGIN) \
+ "" \
+ " Basic mruby Makefile" \
+ "" \
+ "targets:" \
+ " all (default): build all targets, install (locally) in-repo" \
+ " clean: clean all built and in-repo installed artifacts" \
+ " showconfig: show build config summary" \
+ " test: run all mruby tests" \
+ $(MSG_END)