]> rtime.felk.cvut.cz Git - omk.git/commitdiff
FreeBSD compatibility: Don't use GNU specific cmp and install options
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 4 Oct 2013 12:46:43 +0000 (14:46 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 4 Oct 2013 12:46:43 +0000 (14:46 +0200)
snippets/base.omk
snippets/config_h.omk
snippets/include.omk

index 1f096828897de102b3b763dcfe766a0f81ecb622..a50de01d065d11af357b64d9b69b2ed8d1090031 100644 (file)
@@ -298,7 +298,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" && ( test -f "$${d}/Makefile" && ! cmp -s Makefile "$${d}/Makefile" ); then \
              rm -f "$${d}/Makefile"; \
              cp -v Makefile "$${d}/Makefile"; \
           fi \
index 3d78d43119ef026ac612f3a6f4a42b00fc16bbc4..863567f6a4e463f55a4ecc71880867fb197aec75 100644 (file)
@@ -27,7 +27,7 @@ $(addprefix $(1)/,$(notdir $(addsuffix .stamp,$(2)))) : $(CONFIG_FILES)
                  >> "$(2).tmp"
        @echo "#endif /*$(4)*/" >> "$(2).tmp"
        @touch "$$@"
-       @if cmp --quiet "$(2).tmp" "$(2)" ; then rm "$(2).tmp"; \
+       @if cmp -s "$(2).tmp" "$(2)" ; then rm "$(2).tmp"; \
        else mv "$(2).tmp" "$(2)" ; \
        echo "Updated configuration $(2)" ; fi
 
index 5ac92aa1b25ffdc4ef9e902cc0313efcec9e8c7b..477fb13a8fcc56ad2341a432039d0314c554d180 100644 (file)
@@ -6,14 +6,15 @@ endif
 
 ifneq ($(LN_HEADERS),y)
 define cp_cmd
-if ! cmp --quiet $(1) $(2); then \
+if ! cmp -s $(1) $(2); then \
     echo "  CP      $(1:$(OUTPUT_DIR)/%=%) -> $(2:$(OUTPUT_DIR)/%=%)"; \
-    install -D $(CPHEADER_FLAGS) $(1) $(2) || exit 1; \
+    install -d $(CPHEADER_FLAGS) $(dir $(2)) && \
+    install $(CPHEADER_FLAGS) $(1) $(2) || exit 1; \
 fi
 endef
 else
 define cp_cmd
-if ! cmp --quiet $(1) $(2); then \
+if ! cmp -s $(1) $(2); then \
     echo "  LN      $(1:$(OUTPUT_DIR)/%=%) -> $(2:$(OUTPUT_DIR)/%=%)"; \
     if [ -f $(1) ]; then d=$(2); mkdir -p $${d%/*} && ln -sf $(LNHEADER_FLAGS) $(1) $(2) || exit 1; else exit 1; fi; \
 fi