]> rtime.felk.cvut.cz Git - omk.git/commitdiff
include-pass: Move the comment to separate line
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Apr 2010 12:33:56 +0000 (14:33 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 Apr 2010 14:40:05 +0000 (16:40 +0200)
When the comment was on the command line, shell has often been invoked
to just "interpret" the comment (when there were no commands before
the comment). Now, if there are no commands, shell is not invoked.

snippets/include.omk

index 4e00b0df17f966f39a420e426842a53718eb3a2b..ea39b1b0078025e2f7b150338c491409f7750e67 100644 (file)
@@ -22,7 +22,8 @@ define include-pass-template
 include-pass-local: include-pass-local-$(2)
 include-pass-local-$(2): $$($(2)_GEN_HEADERS) $$(foreach f,$$(renamed_$(2)_GEN_HEADERS),$$(shell echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'))
        @$$(foreach f, $$($(2)_HEADERS),$$(call cp_cmd,$$(SOURCES_DIR)/$$(f),$(1)/$$(notdir $$(f))); )
-       @$$(foreach f, $$($(2)_GEN_HEADERS),$$(call cp_cmd,$$(LOCAL_BUILD_DIR)/$$(f),$(1)/$$(notdir $$(f))); ) # FIXME: Use correct build dir, then document it
+# FIXME: Use correct build dir, then document it (in the line bellow)
+       @$$(foreach f, $$($(2)_GEN_HEADERS),$$(call cp_cmd,$$(LOCAL_BUILD_DIR)/$$(f),$(1)/$$(notdir $$(f))); )
        @$$(foreach f, $$(nobase_$(2)_HEADERS),if mkdir -p $(1)/$$(dir $$(f)); then $$(call cp_cmd,$$(SOURCES_DIR)/$$(f),$(1)/$$(f)); fi; )
        @$$(foreach f, $$(renamed_$(2)_HEADERS), \
           srcfname=`echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'` ; destfname=`echo '$$(f)' | sed -e 's/^.*->\(.*\)$$$$/\1/'` ; \
@@ -30,4 +31,6 @@ include-pass-local-$(2): $$($(2)_GEN_HEADERS) $$(foreach f,$$(renamed_$(2)_GEN_H
        @$$(foreach f, $$(renamed_$(2)_GEN_HEADERS), \
           srcfname=`echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'` ; destfname=`echo '$$(f)' | sed -e 's/^.*->\(.*\)$$$$/\1/'` ; \
           if mkdir -p `dirname $(1)/$$$${destfname}`; then  $$(call cp_cmd,$$(LOCAL_BUILD_DIR)/$$$${srcfname},$(1)/$$$${destfname}); fi; )
+# Suppress "Nothing to be done for `include-pass-local'" message if no headers are defined in Makefile.omk
+       @$$(if $$($(2)_HEADERS)$$($(2)_GEN_HEADERS)$$(nobase_$(2)_HEADERS)$$(renamed_$(2)_HEADERS)$$(renamed_$(2)_GEN_HEADERS),,true)
 endef