From 6cf916566ebf475646e50f42cc8369d4d8f4d126 Mon Sep 17 00:00:00 2001 From: Vincent Hardy Date: Wed, 3 Apr 2024 16:34:40 +0200 Subject: [PATCH] use-printf-in-Makefile echo -e is not defined by POSIX and varies by shell. Use printf instead for far more portable behaviour. See also : https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo https://bugs.gentoo.org/751472 --- plugins_tools/eid-viewer/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins_tools/eid-viewer/Makefile.am b/plugins_tools/eid-viewer/Makefile.am index 168782f45..a25746d3d 100644 --- a/plugins_tools/eid-viewer/Makefile.am +++ b/plugins_tools/eid-viewer/Makefile.am @@ -142,13 +142,13 @@ AM_CXXFLAGS = $(AM_CFLAGS) -std=c++98 SUBDIRS = . gtk/po test uml resources/%.c: resources/%.png - echo -e "#include \n#if __GNUC__ >= 4\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wpointer-sign\"\n#endif\n" > $@ + printf '%s\n' '#include ' '#if __GNUC__ >= 4' '#pragma GCC diagnostic push' '#pragma GCC diagnostic ignored "-Wpointer-sign"' '#endif' > $@ gdk-pixbuf-csource --struct --extern --name `basename $^ .png` $^ >> $@ - echo -e "#pragma GCC diagnostic pop\n" >> $@ + printf '%s\n' '#pragma GCC diagnostic pop' >> $@ resources/%.c: resources/%.jpg - echo -e "#include \n#if __GNUC__ >= 4\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wpointer-sign\"\n#endif\n" > $@ + printf '%s\n' '#include ' '#if __GNUC__ >= 4' '#pragma GCC diagnostic push' '#pragma GCC diagnostic ignored "-Wpointer-sign"' '#endif' > $@ gdk-pixbuf-csource --struct --extern --name `basename $^ .jpg` $^ >> $@ - echo -e "#pragma GCC diagnostic pop\n" >> $@ + printf '%s\n' '#pragma GCC diagnostic pop' >> $@ BUILT_SOURCES = gtk/viewer_glade.h \ resources/coat_of_arms_nl.c \