chiark / gitweb /
remove .submakefile shell thing; use $(eval ) instead
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 31 Oct 2010 22:01:11 +0000 (22:01 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 31 Oct 2010 22:07:14 +0000 (22:07 +0000)
cebpic/.gitignore
cebpic/manypics.make
detpic/.gitignore

index 707e6a2ab1ff085281ed95c31df87a05ee224102..46f2be4e7c6f43f5c6dd409334d7143181b9dccc 100644 (file)
@@ -3,7 +3,6 @@
 *.hex
 *.lst
 *.map
-.submakefile
 blank[0246].asm
 gpsim.log
 idlocs*.asm
index c08e4851a02c4def26273f68cf217daeb5152e49..258e6ff02a0d9f63d688fd66c800897e6ae556ef 100644 (file)
@@ -40,21 +40,14 @@ $(1).hex:   $(1).asm $$(INCLUDES)
                $$(ASSEMBLE) $$<
 endef
 
-define makesubmakefile
-set -e; d=.submakefile.new; rm -f $$d; for f in "$$@";do echo "$$f" >>$$d; done
---
+define submakefiletext
 $(foreach prog, $(PROGRAMS), $(call define_prog,$(prog)))
 $(foreach da, idlocs% config %+morse %+pindata blank%,
    $(call define_directasm,$(da)))
 endef
+export submakefiletext
 
-.submakefile:  $(CEBPIC)manypics.make Makefile
-               : $(shell $(makesubmakefile)) ... generate .submakefile
-               @mv -f $@.new $@
-
-ifneq ($(MAKECMDGOALS),clean)
-include .submakefile
-endif
+$(eval $(submakefiletext))
 
 blank0.asm blank2.asm blank4.asm blank6.asm: blank%.asm: $(CEBPIC)manypics.make
                echo >$@.new " org 0x$*000"
@@ -73,19 +66,19 @@ morse+auto.inc:     $(CEBPIC)morse-generator morse.messages
                ./$^ inc $o
 
 %+vars.inc:    %.asm $(CEBPIC)manypics.make
-               perl -ne '                                      \
-                       BEGIN { print "; autogenerated - do not edit\n"; } \
-                       next unless m/^\w+\s+equ\s+/;           \
-                       print $$_ or die $$!;                   \
-               <$< $o
+               perl -n                                         \
+               -e '    BEGIN { print "; autogenerated - do not edit\n"; } '\
+               -e '    next unless m/^\w+\s+equ\s+/;           '\
+               -e '    print $$_ or die $$!;                   '\
+               <$< $o
 
 %+vars.fin:    %.asm $(CEBPIC)manypics.make
-               perl -ne '                                              \
-                       BEGIN { print "; autogenerated - do not edit\n"; } \
-                       next unless m/^(\w+)\s/;                        \
-                       next if m/^\w+\s+(?:equ|udata|udata_acs)\s+/;   \
-                       print "  extern $$1\n" or die $$!;              \
-               ' <$< $o
+               perl -n                                                 \
+               -e '    BEGIN { print "; autogenerated - do not edit\n"; } '\
+               -e '    next unless m/^(\w+)\s/;                        '\
+               -e '    next if m/^\w+\s+(?:equ|udata|udata_acs)\s+/;   '\
+               -e '    print "  extern $$1\n" or die $$!;              '\
+                <$< $o
 
 %+morse.asm:   $(CEBPIC)morse-generator morse.messages %+program.map
                ./$^ asm -I$(MORSE_INCLUDE) $o
index 854df3e99f19f5cd5488d433729c439b7ba2f9a3..74f5e58904318611dfd7cac93f1459c592535519 100644 (file)
@@ -7,7 +7,6 @@
 *.map
 variables+*.fin
 variables+*.inc
-.submakefile
 blank[0246].asm
 gpsim.log
 idlocs*.asm