]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Print hints for users before starting compilation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Apr 2010 13:44:14 +0000 (15:44 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Apr 2010 14:54:08 +0000 (16:54 +0200)
This feature was inspired by Makefiles in notmuch project.

snippets/base.omk

index 7bb99a1ffe78f2ea277b3a8d458902eced76930b..517c96497d2fe3a68b84b6fce74f7e695611d97a 100644 (file)
@@ -37,7 +37,7 @@ INVOCATION_DIR := $(INVOCATION_DIR:/%=%)
 INVOCATION_DIR := $(INVOCATION_DIR:\\%=%)
 endif
 
-.PHONY: all default check-make-ver omkize
+.PHONY: all default check-make-ver print-hints omkize
 
 ifdef W
   ifeq ("$(origin W)", "command line")
@@ -49,7 +49,7 @@ ifndef OMK_WHOLE_TREE
 endif
 
 ifneq ($(OMK_WHOLE_TREE),1)
-all: check-make-ver default
+all: check-make-ver print-hints default
        @echo "Compilation finished"
 else
 # Run make in the top-level directory
@@ -163,6 +163,9 @@ endif
 OMK_INCLUDED := 1
 endif
 
+print-hints:
+       @echo 'Use "make V=1" to see the verbose compile lines.'
+
 check-make-ver:
        @GOOD_MAKE_VERSION=`echo $(MAKE_VERSION) | sed -n -e 's/^[4-9]\..*\|^3\.9[0-9].*\|^3\.8[1-9].*/y/p'` ; \
        if [ x$$GOOD_MAKE_VERSION != xy ] ; then \