X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Smake;h=a989f2d078a68402e8111befb01aba764c8903c4;hb=5189d896f623b7db3b7f592c1cdf4cd855add27b;hp=b27456bced1c709447c3f1efec04615c3c9e220b;hpb=d3fef25674baf4f4e25502f257c680b5090535c6;p=pspp diff --git a/Smake b/Smake index b27456bced..a989f2d078 100644 --- a/Smake +++ b/Smake @@ -303,39 +303,11 @@ all: prep_ph icons icons: $(ICONS) src/ui/gui/icons/icon-names.c src/ui/gui/icons/icon-names.c: $(MAKEFILE_LIST) - $(RM) $@ + $(RM) -f $@ printf '/* This is a generated file. Do not edit. */\n' >> $@ - printf '#include "icon-names.h"\n' >> $@ - echo >> $@ - printf 'static const char *action_icon_name[] =' >> $@ - printf '\n{\n' >> $@ - for i in $(ACTION_ICONS) ; do \ - echo $$i; \ - done | sed -e 's%[a-zA-Z/]*/[1-9]*x[1-9]*/\([^ ]*\)\.png%\1%g' | sort -u | while read f ; do \ - printf ' "%s", \n' $$f >> $@ ; \ - done ; \ - printf '};\n\n' >> $@ ; \ - printf 'const struct icon_context action_icon_context = {\n' >> $@ - printf ' action_icon_name,\n' >> $@ - printf " sizeof (action_icon_name) / sizeof (action_icon_name[0]),\n" >> $@ - printf " \"actions\"\n" >> $@ - printf '};\n' >> $@ ; \ - echo >> $@ - printf 'static const char *category_icon_name[] =' >> $@ - printf '\n{\n' >> $@ - for i in $(CATEGORY_ICONS) ; do \ - echo $$i; \ - done | sed -e 's%[a-zA-Z/]*/[1-9]*x[1-9]*/\([^ ]*\)\.png%\1%g' | sort -u | while read f ; do \ - printf ' "%s", \n' $$f >> $@ ; \ - done ; \ - printf '};\n\n' >> $@ ; \ - printf 'const struct icon_context category_icon_context = {\n' >> $@ - printf ' category_icon_name,\n' >> $@ - printf " sizeof (category_icon_name) / sizeof (category_icon_name[0]),\n" >> $@ - printf " \"categories\"\n" >> $@ - printf '};\n' >> $@ ; \ - echo >> $@ - + printf '#include "icon-names.h"\n\n' >> $@ + build-aux/icon-list action actions $(ACTION_ICONS) >> $@ + build-aux/icon-list category categories $(CATEGORY_ICONS) >> $@ src/ui/gui/icons/manifest: $(MAKEFILE_LIST) $(RM) $@ @@ -348,7 +320,8 @@ src/ui/gui/icons/manifest: $(MAKEFILE_LIST) echo >> $@ printf 'icon_srcs = ' >> $@ for i in $(ICONS); do \ - printf ' \\\n\t '$$i | sed -e 's/\.png$$/.svg/' -e 's%/icons/%/artwork/%' >> $@ ; \ + printf ' \\\n\t ' >> $@ ;\ + printf $$i | awk '{ gsub(".png",".svg")gsub("icons","artwork");printf $$0}' >> $@ ; \ done echo ' ' >> $@ echo >> $@ @@ -376,7 +349,7 @@ aclocal.m4: aclocal -I m4 -I gl/m4 configure: configure.ac aclocal.m4 - autoconf + autoconf || rm $@ # autoconf 2.69 has (what I think is) a bug. It will create configure even when failure is detected. config.h.in: configure.ac autoheader