From b9771ab1ff4a3c19e8ead3914cd80569cb778ddb Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 2 Aug 2014 17:55:41 -0700 Subject: [PATCH] Fix build of resource files on OS-X OS-X's 'echo' command does not have a -e option, so it was included in the files. --- configure.ac | 4 ++++ gtk/Makefile.am | 45 +++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 058fe4725f..cd3f6fc78f 100644 --- a/configure.ac +++ b/configure.ac @@ -184,6 +184,9 @@ case $host in *-*-linux*) os_linux=yes ;; + *-*-darwin*) + os_darwin=yes + ;; esac dnl @@ -245,6 +248,7 @@ AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes") AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes") +AM_CONDITIONAL(OS_DARWIN, test "$os_darwin" = "yes") if test "$os_win32" = "yes"; then AC_CHECK_TOOL(WINDRES, windres, no) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index b67b8a645d..2dac40d423 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -19,6 +19,11 @@ GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings % endif SUBDIRS = inspector native . +if OS_DARWIN + ECHO="echo" +else + ECHO="echo -e" +endif if HAVE_CLOUDPRINT if HAVE_PAPI_CUPS @@ -1377,47 +1382,43 @@ gtktypebuiltins.c: $(gtk_public_h_sources) $(a11y_h_sources) $(deprecated_h_sour && rm -f xgen-gtbc gtk.gresource.xml: Makefile.am - $(AM_V_GEN) echo -e "" > $@; \ - echo -e "" >> $@; \ - echo -e " " >> $@; \ + $(AM_V_GEN) $(ECHO) "" > $@; \ + $(ECHO) "" >> $@; \ + $(ECHO) " " >> $@; \ for f in $(srcdir)/resources/theme/Raleigh/*.css; do \ n=`basename $$f`; \ - echo -e " theme/Raleigh/$$n" >> $@; \ + $(ECHO) " theme/Raleigh/$$n" >> $@; \ done; \ - echo -e " theme/Adwaita/gtk.css" >> $@; \ - echo -e " theme/Adwaita/gtk-dark.css" >> $@; \ - echo -e " theme/Adwaita/gtk-contained.css" >> $@; \ - echo -e " theme/Adwaita/gtk-contained-dark.css" >> $@; \ + $(ECHO) " theme/Adwaita/gtk.css" >> $@; \ + $(ECHO) " theme/Adwaita/gtk-dark.css" >> $@; \ + $(ECHO) " theme/Adwaita/gtk-contained.css" >> $@; \ + $(ECHO) " theme/Adwaita/gtk-contained-dark.css" >> $@; \ for f in $(srcdir)/resources/theme/Adwaita/assets/*; do \ n=`basename $$f`; \ - echo -e " theme/Adwaita/assets/$$n" >> $@; \ + $(ECHO) " theme/Adwaita/assets/$$n" >> $@; \ done; \ if test "$(win32_theme)" = "yes"; then \ for f in $(srcdir)/resources/theme/win32/*.css; do \ n=`basename $$f`; \ - echo -e " theme/win32/$$n" >> $@; \ + $(ECHO) " theme/win32/$$n" >> $@; \ done; \ fi; \ for f in $(srcdir)/resources/cursor/*.png; do \ n=`basename $$f`; \ - echo -e " cursor/$$n" >> $@; \ + $(ECHO) " cursor/$$n" >> $@; \ done; \ for f in $(srcdir)/resources/ui/*.ui; do \ n=`basename $$f`; \ - echo -e " ui/$$n" >> $@; \ + $(ECHO) " ui/$$n" >> $@; \ done; \ - for c in actions status; do \ - for s in 16x16 22x22 24x24 32x32 48x48; do \ - if test -d $(srcdir)/resources/icons/$$s/$$c; then \ - for f in $(srcdir)/resources/icons/$$s/$$c/*.png; do \ - n=`basename $$f`; \ - echo -e " icons/$$s/$$c/$$n" >> $@; \ - done; \ - fi; \ + for s in 16x16 22x22 24x24 32x32; do \ + for f in $(srcdir)/resources/icons/$$s/actions/*.png; do \ + n=`basename $$f`; \ + $(ECHO) " icons/$$s/actions/$$n" >> $@; \ done; \ done; \ - echo -e " " >> $@; \ - echo -e "" >> $@; + $(ECHO) " " >> $@; \ + $(ECHO) "" >> $@; win32_theme_sources = \ resources/theme/win32/gtk-win32.css \