Browse Source

Makefile Improvements

The clobber target has been removed and the clean target now does what most people would expect (actually cleans the entire build tree).
patch
Wayne Warthen 4 years ago
parent
commit
d241db5c11
  1. 2
      .github/workflows/commit.yml
  2. 1
      .github/workflows/release.yml
  3. 2
      Binary/Apps/Makefile
  4. 2
      Binary/Apps/Test/Makefile
  5. 4
      Binary/CPM3/Makefile
  6. 4
      Binary/Makefile
  7. 4
      Binary/ZPM3/Makefile
  8. 12
      Makefile
  9. 7
      Readme.unix
  10. 2
      Source/BPBIOS/Makefile
  11. 11
      Tools/Makefile
  12. 8
      Tools/Makefile.inc
  13. 4
      Tools/unix/Makefile
  14. 3
      Tools/unix/bin2asm/Makefile
  15. 5
      Tools/unix/bst/Makefile
  16. 5
      Tools/unix/cpmtools/Makefile
  17. 3
      Tools/unix/lzsa/Makefile
  18. 3
      Tools/unix/uz80as/Makefile
  19. 3
      Tools/unix/zxcc/Makefile

2
.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

1
.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

2
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

2
Binary/Apps/Test/Makefile

@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com)
include $(TOOLS)/Makefile.inc
clobber::
clean::
@rm -f *.com

4
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

4
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
clean::
@rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat

4
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

12
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

7
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.

2
Source/BPBIOS/Makefile

@ -30,7 +30,7 @@ zcpr33n.rel zcpr33t.rel:
all:: $(HD0IMG)
clobber::
clean::
@rm -f $(HD0IMG)
%.img: zcpr33n.rel zcpr33t.rel

11
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)

8
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

4
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;)

3
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)

5
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:

5
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

3
Tools/unix/lzsa/Makefile

@ -41,6 +41,3 @@ $(APP): $(OBJS)
clean:
@rm -rf $(APP) $(OBJDIR)
clobber: clean
rm -f ../../$(UNAME)/$(APP)

3
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

3
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)

Loading…
Cancel
Save