Fix: Use 'echo' in a portable way
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 14 Oct 2015 17:33:59 +0000 (13:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Oct 2015 03:39:45 +0000 (23:39 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/Makefile.am

index fd9d8d02391a8db0232b9ac0c842791fdca76df9..b67d262bc7918b608c1003c063f737e9592490b9 100644 (file)
@@ -14,7 +14,7 @@ version.h:
        ## We first create variables for the current git version and
        ## the locations of the version.h and version.h.tmpl files.
        ##
-       @echo -n "Generating version.h... "
+       @echo $(ECHO_N) "Generating version.h... $(ECHO_C)"
        @(version_h_tmpl="$(top_srcdir)/include/version.h.tmpl"; \
        if [ -f "$${version_h_tmpl}" ]; then \
                version_h="$(top_builddir)/include/version.h"; \
@@ -35,7 +35,7 @@ version.h:
                        [ "$${version_h_tmpl}" -nt "$${version_h}" ]; then \
                        cp "$${version_h_tmpl}" "$${version_h}"; \
                fi; \
-               echo -n "git version: \"$${git_version}\""; \
+               echo $(ECHO_N) "git version: \"$${git_version}\"$(ECHO_C)"; \
                ##
                ## We verify that git_version isn't the same as the one
                ## currently in the file (if there is one), as we don't
@@ -47,11 +47,11 @@ version.h:
                if [ x"$${old_version}" != x"$${new_version}" ]; then \
                        $(SED) -i "s'$${version_match}'$${new_version}'" "$${version_h}"; \
                else \
-                       echo -n " (cached)"; \
+                       echo $(ECHO_N) " (cached)$(ECHO_C)"; \
                fi; \
-               echo -n "... "; \
+               echo $(ECHO_N) "... $(ECHO_C)"; \
        fi)
-       @echo "ok"
+       @echo "$(ECHO_T)ok"
 
 ##
 ## version.h is defined as a .PHONY file even if it's a real file as
This page took 0.027255 seconds and 5 git commands to generate.