mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -04:00
build: Fix 'make -j' handling.
Some build targets create multiple outputs, which can cause problems when doing parallel builds. Clean up the build system so that all subdir invocations come from the top-level Makefile and use $(MAKE). Also fix the FREEDOOM/FREEDM lumps to really include the version number by using $(shell ...) syntax.
This commit is contained in:
parent
d9b4c2530a
commit
d241e7f326
4 changed files with 44 additions and 51 deletions
|
@ -39,9 +39,22 @@ GRAPHICS = \
|
|||
|
||||
all: $(GRAPHICS)
|
||||
|
||||
$(GRAPHICS): config.py fontchars ../../lumps/fraggle/freedoom.bex
|
||||
# textgen creates multiple outputs, which is awkward to express in
|
||||
# make. Use a witness file (graphics.stamp) as suggested in the
|
||||
# automake manual: "Handling Tools that Produce Many Outputs"
|
||||
|
||||
$(GRAPHICS): graphics.stamp
|
||||
@if test -f $@; then :; else \
|
||||
rm -f graphics.stamp; \
|
||||
$(MAKE) data.stamp; \
|
||||
fi
|
||||
|
||||
graphics.stamp: config.py fontchars ../../lumps/fraggle/freedoom.bex
|
||||
@rm -f graphics.tmp
|
||||
@touch graphics.tmp
|
||||
./textgen
|
||||
@mv graphics.tmp $@
|
||||
|
||||
clean:
|
||||
rm -f $(GRAPHICS)
|
||||
rm -f $(GRAPHICS) graphics.stamp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue