Removed shell for-loop.
Just a few of the many reasons why shell for-loops have no place in (GNUmake) Makefiles: * They don't conform to https://www.gnu.org/software/make/manual/html_node/Utilities-in-Makefiles.html * They break Windows builds for sure * They don't fit to make's approach of working with sets * They break make parallelism
This commit is contained in:
@@ -35,8 +35,8 @@ ifdef CC65_HOME
|
|||||||
installdir = $(CC65_HOME)
|
installdir = $(CC65_HOME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MOUS = $(installdir)/target/$(SYS)/drv/mou/$(SYS)*.mou
|
MOUS := $(wildcard $(installdir)/target/$(SYS)/drv/mou/$(SYS)*.mou)
|
||||||
TGI = $(installdir)/target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
TGI := $(wildcard $(installdir)/target/$(SYS)/drv/tgi/$(SYS)*.tgi)
|
||||||
CLIB = --lib $(SYS).lib
|
CLIB = --lib $(SYS).lib
|
||||||
CL = cl65
|
CL = cl65
|
||||||
CC = cc65
|
CC = cc65
|
||||||
@@ -46,8 +46,8 @@ LD = ld65
|
|||||||
else
|
else
|
||||||
# "samples/" is a part of a complete source tree.
|
# "samples/" is a part of a complete source tree.
|
||||||
export CC65_HOME := $(abspath ..)
|
export CC65_HOME := $(abspath ..)
|
||||||
MOUS = ../target/$(SYS)/drv/mou/$(SYS)*.mou
|
MOUS := $(wildcard ../target/$(SYS)/drv/mou/$(SYS)*.mou)
|
||||||
TGI = ../target/$(SYS)/drv/tgi/$(SYS)*.tgi
|
TGI := $(wildcard ../target/$(SYS)/drv/tgi/$(SYS)*.tgi)
|
||||||
CLIB = ../lib/$(SYS).lib
|
CLIB = ../lib/$(SYS).lib
|
||||||
CL = ../bin/cl65
|
CL = ../bin/cl65
|
||||||
CC = ../bin/cc65
|
CC = ../bin/cc65
|
||||||
@@ -140,14 +140,16 @@ ovrldemo: overlaydemo.o
|
|||||||
|
|
||||||
d64: samples.d64
|
d64: samples.d64
|
||||||
|
|
||||||
|
define D64_WRITE_recipe
|
||||||
|
|
||||||
|
$(C1541) -attach $@ -write $(file) $(notdir $(file)) >$(NULLDEV)
|
||||||
|
|
||||||
|
endef # D64_WRITE_recipe
|
||||||
|
|
||||||
samples.d64: samples
|
samples.d64: samples
|
||||||
@$(C1541) -format samples,AA d64 $@ >$(NULLDEV)
|
@$(C1541) -format samples,AA d64 $@ >$(NULLDEV)
|
||||||
@for exe in $(EXELIST); do\
|
$(foreach file,$(EXELIST),$(D64_WRITE_recipe))
|
||||||
$(C1541) -attach $@ -write $$exe >$(NULLDEV) || exit $$?;\
|
$(foreach file,$(TGI) $(MOUS),$(D64_WRITE_recipe))
|
||||||
done
|
|
||||||
@for mod in $(TGI) $(MOUS); do\
|
|
||||||
$(C1541) -attach $@ -write $$mod >$(NULLDEV) || exit $$?;\
|
|
||||||
done
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Installation rules
|
# Installation rules
|
||||||
|
|||||||
Reference in New Issue
Block a user