]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Fixed printing of "Entering directory" messages with V=2
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 23 Aug 2008 20:46:00 +0000 (20:46 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 23 Aug 2008 20:46:00 +0000 (20:46 +0000)
darcs-hash:20080823204608-f2ef6-ba9871e6568f012df2b03329d862a757f1dc76bf.gz

snippets/base
tests/no-print-directory/Makefile [new file with mode: 0644]
tests/no-print-directory/Makefile.omk [new file with mode: 0644]
tests/no-print-directory/main.c [new file with mode: 0644]
tests/no-print-directory/runtest [new file with mode: 0755]

index 8e893371079963e704a1f877eb61abc86f49aa41..5e1017daf3ac2325f2d1763479b0189afc52f934 100644 (file)
@@ -179,7 +179,7 @@ define mkdir_def
        [ -d $(1) ] || mkdir -p $(1) || exit 1
 endef
 
-ifneq ($(V),2)
+ifneq ($(OMK_VERBOSE),2)
 NO_PRINT_DIRECTORY := --no-print-directory
 endif
 
@@ -233,7 +233,7 @@ $(foreach subdir,$(SUBDIRS),$(eval $(call omk_pass_subdir_template,$(pass),$(2),
 $(pass):
 # Submakes have to be called this way and not as dependecies for pass
 # serialization to work
-       +@$(MAKE) SOURCES_DIR=$(SOURCES_DIR) --no-print-directory \
+       +@$(MAKE) SOURCES_DIR=$(SOURCES_DIR) $(NO_PRINT_DIRECTORY) \
                RELATIVE_DIR=$(RELATIVE_DIR) \
                -f $(SOURCESDIR_MAKEFILE) $(pass)-submakes
 $(pass)-submakes:
diff --git a/tests/no-print-directory/Makefile b/tests/no-print-directory/Makefile
new file mode 100644 (file)
index 0000000..b22a357
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/tests/no-print-directory/Makefile.omk b/tests/no-print-directory/Makefile.omk
new file mode 100644 (file)
index 0000000..e5ee054
--- /dev/null
@@ -0,0 +1,2 @@
+bin_PROGRAMS = main
+main_SOURCES = main.c
diff --git a/tests/no-print-directory/main.c b/tests/no-print-directory/main.c
new file mode 100644 (file)
index 0000000..ab73b3a
--- /dev/null
@@ -0,0 +1 @@
+void main() {}
diff --git a/tests/no-print-directory/runtest b/tests/no-print-directory/runtest
new file mode 100755 (executable)
index 0000000..aa6b4dd
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. ../functions.sh
+
+touch config.omk-default
+make 2>/dev/null|grep "Entering directory.*_build" && error "Entering directory message should be suppressed"
+make distclean
+make V=2 2>/dev/null|grep 'Entering directory.*_build' || error "Entering directory message didn't appear"
+