diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index aebefe5a..35b049ee 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -24,7 +24,6 @@ jobs: sudo apt-get install libncurses-dev sudo apt-get install srecord make dist - make clean rm -rf .git* - name: List Output @@ -64,7 +63,6 @@ jobs: export TZ='America/Los_Angeles' brew install srecord make dist - make clean rm -rf .git* - name: List Output diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a814905..6a1b82ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,6 @@ jobs: run: | sudo apt-get install libncurses-dev make dist - make clean rm -rf .git* - name: Upload Artifact diff --git a/Binary/Apps/Makefile b/Binary/Apps/Makefile index 0b913750..940d9ae2 100644 --- a/Binary/Apps/Makefile +++ b/Binary/Apps/Makefile @@ -7,5 +7,5 @@ include $(TOOLS)/Makefile.inc all:: mkdir -p Tunes -clobber:: +clean:: @rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm diff --git a/Binary/Apps/Test/Makefile b/Binary/Apps/Test/Makefile index db06d177..8fc553ae 100644 --- a/Binary/Apps/Test/Makefile +++ b/Binary/Apps/Test/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com) include $(TOOLS)/Makefile.inc -clobber:: +clean:: @rm -f *.com diff --git a/Binary/CPM3/Makefile b/Binary/CPM3/Makefile index 2105f8de..bf98e7ac 100644 --- a/Binary/CPM3/Makefile +++ b/Binary/CPM3/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr) include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.spr +clean:: + @rm -f *.spr *.com *.sys *.dat cpm3fix.pat readme.1st diff --git a/Binary/Makefile b/Binary/Makefile index ea7a0d79..f4d4bec4 100644 --- a/Binary/Makefile +++ b/Binary/Makefile @@ -4,5 +4,5 @@ SUBDIRS = Apps CPM3 ZPM3 include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat \ No newline at end of file +clean:: + @rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat diff --git a/Binary/ZPM3/Makefile b/Binary/ZPM3/Makefile index 2105f8de..95e533a1 100644 --- a/Binary/ZPM3/Makefile +++ b/Binary/ZPM3/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr) include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.spr +clean:: + @rm -f *.spr *.com *.sys *.dat *.zpm diff --git a/Makefile b/Makefile index a9c1abae..487cb9a7 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,18 @@ all: - $(MAKE) --directory Tools/unix + $(MAKE) --directory Tools $(MAKE) --directory Source clean: - $(MAKE) --directory Tools/unix clean + $(MAKE) --directory Tools clean $(MAKE) --directory Source clean $(MAKE) --directory Binary clean -clobber: - $(MAKE) --directory Tools/unix clobber - $(MAKE) --directory Source clobber - $(MAKE) --directory Binary clobber - rm -f typescript +clobber: clean diff: $(MAKE) --directory Source diff dist: $(MAKE) ROM_PLATFORM=dist + $(MAKE) --directory Source clean + $(MAKE) --directory Tools clean diff --git a/Readme.unix b/Readme.unix index 8814e28c..bf6a8478 100644 --- a/Readme.unix +++ b/Readme.unix @@ -47,9 +47,8 @@ the "SCZ180" platform: Please be aware that the make-based build does have a few deficiencies. First and most important, the Makefiles do not handle reruns very well. -To ensure a full buld, use "make clobber" from the top level directory -before running the actual build. For those used to using "make clean", -you can do that but it is not as thorough as "make clobber". +To ensure a full buld, use "make clean" from the top level directory +before running the actual build. Second, there are some build failures that will not stop the make process. Most of this is because real CP/M 2.2 tools are used in @@ -57,7 +56,7 @@ places and CP/M 2.2 does not allow programs to return a result code. Third, not all dependencies are properly handled. So, changes to some files will not cause things to rebuild as appropriate. In general, I -recommend doing a "make clobber" before running "make" to ensure that +recommend doing a "make clean" before running "make" to ensure that everything is fully rebuilt. For macOS users, you may encounter a failure reading or writing files. diff --git a/Source/BPBIOS/Makefile b/Source/BPBIOS/Makefile index 05c064ed..852cb5c7 100644 --- a/Source/BPBIOS/Makefile +++ b/Source/BPBIOS/Makefile @@ -30,7 +30,7 @@ zcpr33n.rel zcpr33t.rel: all:: $(HD0IMG) -clobber:: +clean:: @rm -f $(HD0IMG) %.img: zcpr33n.rel zcpr33t.rel diff --git a/Tools/Makefile b/Tools/Makefile new file mode 100644 index 00000000..b6093e4c --- /dev/null +++ b/Tools/Makefile @@ -0,0 +1,11 @@ +# +# build the tools for linux and Darwin +# +UNAME := $(shell uname) + +all: + $(MAKE) --directory unix + +clean: + $(MAKE) --directory unix clean + @rm -rf $(UNAME) diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index 1a579e50..d52be301 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -156,13 +156,7 @@ clean:: done clobber:: clean - @if [ "$(DEST)" ] ; then for file in $(OBJECTS) ; do \ - rm -f $$($(CASEFN) $(DEST)/$$file) ; \ - done ; fi - @-rm -f $$($(CASEFN) $(filter-out $(NODELETE),$(OBJECTS))) - @for dir in $(SUBDIRS) ; do \ - $(MAKE) --directory $$dir clobber ; \ - done + # # this is used to verify that the unix and windows tool chains are generating # the same objects diff --git a/Tools/unix/Makefile b/Tools/unix/Makefile index 571e876d..bdd56c36 100644 --- a/Tools/unix/Makefile +++ b/Tools/unix/Makefile @@ -15,9 +15,5 @@ all: @chmod +x casefn.sh @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) all;) -clobber: - @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clobber;) - @rm -rf ../$(UNAME) - clean: @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clean;) \ No newline at end of file diff --git a/Tools/unix/bin2asm/Makefile b/Tools/unix/bin2asm/Makefile index 1ffdbd79..85c956d0 100644 --- a/Tools/unix/bin2asm/Makefile +++ b/Tools/unix/bin2asm/Makefile @@ -18,9 +18,6 @@ $(DEST): clean: rm -f $(OBJ_FILES) $(BINARY) -clobber: clean - rm -f $(DEST)/$(BINARY) $(BINARY) - $(BINARY): $(OBJ_FILES) $(CC) -o $@ $^ $(LIBS) diff --git a/Tools/unix/bst/Makefile b/Tools/unix/bst/Makefile index 2e6c8227..f051f892 100644 --- a/Tools/unix/bst/Makefile +++ b/Tools/unix/bst/Makefile @@ -20,9 +20,4 @@ all: $(DEST) $(DEST): mkdir $(DEST) -clobber: clean - -for i in *.$(SUFFIX) ; do \ - rm $(DEST)/$$(basename $$i .$(SUFFIX)) ; \ - done - clean: diff --git a/Tools/unix/cpmtools/Makefile b/Tools/unix/cpmtools/Makefile index 9c850895..7cc055f8 100644 --- a/Tools/unix/cpmtools/Makefile +++ b/Tools/unix/cpmtools/Makefile @@ -54,8 +54,3 @@ $(DEST): clean: -rm -f *.o $(OBJECTS) - -clobber: clean - -for i in $(OBJECTS) ; do \ - rm -f $(DEST)/$$i ; \ - done diff --git a/Tools/unix/lzsa/Makefile b/Tools/unix/lzsa/Makefile index 9f9cd895..80884198 100644 --- a/Tools/unix/lzsa/Makefile +++ b/Tools/unix/lzsa/Makefile @@ -41,6 +41,3 @@ $(APP): $(OBJS) clean: @rm -rf $(APP) $(OBJDIR) - -clobber: clean - rm -f ../../$(UNAME)/$(APP) diff --git a/Tools/unix/uz80as/Makefile b/Tools/unix/uz80as/Makefile index 164ca7e8..2f5b0ec6 100644 --- a/Tools/unix/uz80as/Makefile +++ b/Tools/unix/uz80as/Makefile @@ -49,9 +49,6 @@ all: uz80as $(DEST) $(DEST): mkdir -p $(DEST) -clobber: clean - -rm -f uz80as $(DEST)/uz80as - clean: -rm -f $(OBJECTS) uz80as diff --git a/Tools/unix/zxcc/Makefile b/Tools/unix/zxcc/Makefile index 70420378..3a5ad1e8 100644 --- a/Tools/unix/zxcc/Makefile +++ b/Tools/unix/zxcc/Makefile @@ -25,9 +25,6 @@ $(DEST): clean: -rm -f $(OBJECTS) config.h zxcc bios.bin -clobber: clean - -rm -f $(DEST)/zxcc $(DEST)/bios.bin zxcc - $(OBJECTS): config.h bios.bin zxcc: $(OBJECTS)