Makefile.utl dependency bug for dlb.o
For make install or update, dlb.o was being recompiled unnecessarily when building util/dlb because the dependency in Makefile.utl listed hack.h instead of config.h for it. Then attempting to run nethack under debugger control could cause debugger complaints about dlb.o being newer than nethack. Updated for unix and vms.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# Makefile for NetHack's utility programs.
|
# Makefile for NetHack's utility programs.
|
||||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1454376585 2016/02/02 01:29:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.28 $
|
# NetHack 3.6 Makefile.utl $NHDT-Date: 1454712070 2016/02/05 22:41:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.29 $
|
||||||
|
|
||||||
# Root of source tree:
|
# Root of source tree:
|
||||||
NHSROOT=..
|
NHSROOT=..
|
||||||
@@ -351,12 +351,12 @@ tilemap: tilemap.o
|
|||||||
tiletext.o: ../win/share/tiletext.c $(CONFIG_H) ../include/tile.h
|
tiletext.o: ../win/share/tiletext.c $(CONFIG_H) ../include/tile.h
|
||||||
$(CC) $(CFLAGS) -c ../win/share/tiletext.c
|
$(CC) $(CFLAGS) -c ../win/share/tiletext.c
|
||||||
tiletxt.c: ./Makefile
|
tiletxt.c: ./Makefile
|
||||||
echo '/* alternate compilation for tilemap.c to create tiletxt.o' > tiletxt.c
|
@echo '/* alternate compilation for tilemap.c to create tiletxt.o' > tiletxt.c
|
||||||
echo ' that does not rely on "cc -c -o tiletxt.o tilemap.c"' >> tiletxt.c
|
@echo ' that does not rely on "cc -c -o tiletxt.o tilemap.c"' >> tiletxt.c
|
||||||
echo ' since many pre-POSIX compilers did not support that */' >> tiletxt.c
|
@echo ' since many pre-POSIX compilers did not support that */' >> tiletxt.c
|
||||||
echo '#define TILETEXT' >> tiletxt.c
|
echo '#define TILETEXT' >> tiletxt.c
|
||||||
echo '#include "../win/share/tilemap.c"' >> tiletxt.c
|
echo '#include "../win/share/tilemap.c"' >> tiletxt.c
|
||||||
echo '/*tiletxt.c*/' >> tiletxt.c
|
@echo '/*tiletxt.c*/' >> tiletxt.c
|
||||||
tiletxt.o: tiletxt.c ../win/share/tilemap.c $(HACK_H)
|
tiletxt.o: tiletxt.c ../win/share/tilemap.c $(HACK_H)
|
||||||
$(CC) $(CFLAGS) -c tiletxt.c
|
$(CC) $(CFLAGS) -c tiletxt.c
|
||||||
tilemap.o: ../win/share/tilemap.c $(HACK_H)
|
tilemap.o: ../win/share/tilemap.c $(HACK_H)
|
||||||
@@ -413,7 +413,7 @@ $(OBJDIR)/monst.o: ../src/monst.c $(CONFIG_H)
|
|||||||
$(CC) $(CFLAGS) -c ../src/monst.c -o $@
|
$(CC) $(CFLAGS) -c ../src/monst.c -o $@
|
||||||
$(OBJDIR)/objects.o: ../src/objects.c $(CONFIG_H)
|
$(OBJDIR)/objects.o: ../src/objects.c $(CONFIG_H)
|
||||||
$(CC) $(CFLAGS) -c ../src/objects.c -o $@
|
$(CC) $(CFLAGS) -c ../src/objects.c -o $@
|
||||||
$(OBJDIR)/dlb.o: ../src/dlb.c $(HACK_H) ../include/dlb.h
|
$(OBJDIR)/dlb.o: ../src/dlb.c $(CONFIG_H) ../include/dlb.h
|
||||||
$(CC) $(CFLAGS) -c ../src/dlb.c -o $@
|
$(CC) $(CFLAGS) -c ../src/dlb.c -o $@
|
||||||
|
|
||||||
# make sure hack.h dependencies get transitive information
|
# make sure hack.h dependencies get transitive information
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# NetHack Makefile (VMS) - for utility programs.
|
# NetHack Makefile (VMS) - for utility programs.
|
||||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1432512790 2015/05/25 00:13:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $
|
# NetHack 3.6 Makefile.utl $NHDT-Date: 1454712071 2016/02/05 22:41:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.14 $
|
||||||
|
|
||||||
# Copy this file to [.util]Makefile. and then edit it as needed.
|
# Copy this file to [.util]Makefile. and then edit it as needed.
|
||||||
# The default configuration is for building with DEC C (aka Compaq C).
|
# The default configuration is for building with DEC C (aka Compaq C).
|
||||||
@@ -331,7 +331,7 @@ $(SRC)drawing.obj : $(SRC)drawing.c $(HACK_H)
|
|||||||
$(MAKE)$(MAKEFLAGS) drawing.obj
|
$(MAKE)$(MAKEFLAGS) drawing.obj
|
||||||
@ $(CD) $(UTL)
|
@ $(CD) $(UTL)
|
||||||
|
|
||||||
$(SRC)dlb.obj : $(SRC)dlb.c $(HACK_H) $(INC)dlb.h
|
$(SRC)dlb.obj : $(SRC)dlb.c $(CONFIG_H) $(INC)dlb.h
|
||||||
$(CD) $(SRC)
|
$(CD) $(SRC)
|
||||||
$(MAKE)$(MAKEFLAGS) dlb.obj
|
$(MAKE)$(MAKEFLAGS) dlb.obj
|
||||||
@ $(CD) $(UTL)
|
@ $(CD) $(UTL)
|
||||||
|
|||||||
Reference in New Issue
Block a user