diff options
Diffstat (limited to 'hacks/images/Makefile.in')
-rw-r--r-- | hacks/images/Makefile.in | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/hacks/images/Makefile.in b/hacks/images/Makefile.in index 9a0375b..6bdfbb0 100644 --- a/hacks/images/Makefile.in +++ b/hacks/images/Makefile.in @@ -1,10 +1,8 @@ -# hacks/images/Makefile.in --- xscreensaver, Copyright (c) 2018 Jamie Zawinski. +# hacks/images/Makefile.in --- xscreensaver, Copyright © 2018-2021 Jamie Zawinski. # the `../configure' script generates `hacks/images/Makefile' from this file. @SET_MAKE@ srcdir = @srcdir@ -VPATH = ${srcdir} ${srcdir}/bubbles ${srcdir}/m6502 \ - ${srcdir}/molecules ${srcdir}/noseguy top_srcdir = @top_srcdir@ UTILS_SRC = $(top_srcdir)/utils RM = rm -f @@ -20,29 +18,38 @@ TARFILES = Makefile \ $(STAR)/$(STAR).pov \ $(STAR)/$(STAR).txt \ -PNG_HDRS = $(shell find $(srcdir) -name \*.png | \ - sed 's@^.*/\(.*\)\.\(png\)$$@gen/\1_\2.h@') - default: all -all: gen $(PNG_HDRS) - -gen: - mkdir gen - -# %.png dependency below works because VPATH contains subdirs -# of 'images' dir not only 'images' itself -gen/%_png.h: %.png - echo $(UTILS_SRC)/bin2c "$<" "$@" - $(UTILS_SRC)/bin2c "$<" "$@" +all: _gen + +_gen: + @\ + DIR="gen" ; \ + if ! [ -d "$$DIR" ]; then \ + echo mkdir "$$DIR" ; \ + mkdir "$$DIR" ; \ + fi ; \ + \ + for png in $$(find $(srcdir) -name \*.png); do \ + h="$${png%.png}"; \ + h="$${h##*/}"; \ + h="$$DIR/$${h}_png.h"; \ + if [ ! -f "$$h" -o "$$png" -nt "$$h" ] ; then \ + echo $(UTILS_SRC)/bin2c "$$png" "$$h"; \ + $(UTILS_SRC)/bin2c "$$png" "$$h"; \ + fi ; \ + done clean: $(RM) -r gen +# Note: don't remove the generated Makefile. We include that in the tar file +# so that OSX and Android can run 'make' in this directory without 'configure'. distclean:: clean + -rm -f TAGS *~ "#"* -echo_tarfiles: - @echo $(TARFILES) +list_tarfiles: + @find $(TARFILES) -type f -print | sort install: install-program: |