]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/base.omk
Always use OMK_*FLAGS instead of *FLAGS
[omk.git] / snippets / base.omk
index ff5d24d631a6ea7140d2fd536fad770e4ee2eb7d..d43428f90dbb664a849bee04682f9702e8205025 100644 (file)
@@ -1,7 +1,7 @@
 #  Makefile.rules - OCERA make framework common project rules -*- makefile-gmake -*-
 #
 #  (C) Copyright 2003, 2006, 2007, 2008, 2009  by Pavel Pisa - OCERA team member
-#  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011 by Michal Sojka - Czech Technical University, FEE, DCE
+#  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2015 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
 #  Version:  @git-describe@
@@ -181,7 +181,7 @@ print-hints:
 check-make-ver:
        @GOOD_MAKE_VERSION=`echo $(MAKE_VERSION) | $(SED4OMK) -n -e 's/^[4-9]\..*\|^3\.9[0-9].*\|^3\.8[1-9].*/y/p'` ; \
        if [ x$$GOOD_MAKE_VERSION != xy ] ; then \
-               echo "Your make program version is too old and does not support OMK system." ; \
+               echo "Your make program version ($(MAKE_VERSION)) is too old and does not support OMK system." ; \
                echo "Please update to make program 3.81beta1 or newer." ; exit 1 ; \
        fi
 
@@ -267,8 +267,10 @@ $(pass)-this-dir: $(foreach subdir,$(SUBDIRS),$(pass)-$(subdir)-subdir)
        @$(call mkdir_def,$(2))
        +@$(MAKE) --no-builtin-rules $(NO_PRINT_DIRECTORY) SOURCES_DIR=$(SOURCES_DIR) RELATIVE_DIR=$(RELATIVE_DIR) -C $(2) \
                -f $(SOURCESDIR_MAKEFILE) $(3) $(check-target) $(1:%=%-local)
+ifneq ($(pass),clean)
 $(pass)-local: $($(pass)_HOOKS)
 endif
+endif
 endef
 
 # =======================
@@ -298,7 +300,7 @@ omkize:
        fi
        $(Q)for i in `find -L . -name Makefile.omk` ; do \
           d=`dirname $${i}`; \
-          if ! test -f "$${d}/Makefile.rules" && ( test -f "$${d}/Makefile" && ! cmp --silent Makefile "$${d}/Makefile" ); then \
+          if ! test -f "$${d}/Makefile.rules" && ! cmp -s Makefile "$${d}/Makefile"; then \
              rm -f "$${d}/Makefile"; \
              cp -v Makefile "$${d}/Makefile"; \
           fi \