From 8a684ecabd5bcec4e673cd97173c878712bac275 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 31 Oct 2010 22:01:11 +0000 Subject: [PATCH] remove .submakefile shell thing; use $(eval ) instead --- cebpic/.gitignore | 1 - cebpic/manypics.make | 35 ++++++++++++++--------------------- detpic/.gitignore | 1 - 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/cebpic/.gitignore b/cebpic/.gitignore index 707e6a2..46f2be4 100644 --- a/cebpic/.gitignore +++ b/cebpic/.gitignore @@ -3,7 +3,6 @@ *.hex *.lst *.map -.submakefile blank[0246].asm gpsim.log idlocs*.asm diff --git a/cebpic/manypics.make b/cebpic/manypics.make index c08e485..258e6ff 100644 --- a/cebpic/manypics.make +++ b/cebpic/manypics.make @@ -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 diff --git a/detpic/.gitignore b/detpic/.gitignore index 854df3e..74f5e58 100644 --- a/detpic/.gitignore +++ b/detpic/.gitignore @@ -7,7 +7,6 @@ *.map variables+*.fin variables+*.inc -.submakefile blank[0246].asm gpsim.log idlocs*.asm -- 2.30.2