Browse Source

Unix 'make clean' bit

When deleting obsolete generated files (monstr.c, vis_tab.[ch])
for src 'make clean' or clean called from src 'make spotless' or
from top Makefile, don't complain if they aren't present.

Deletion failure wasn't stopping 'make' but did result in looking
like something might be wrong.
Before:
 rm monstr.c vis_tab.c ../include/vis_tab.h  #obsolete generated files
 rm: monstr.c: No such file or directory
 rm: vis_tab.c: No such file or directory
 rm: ../include/vis_tab.h: No such file or directory
 make[1]: [clean] Error 1 (ignored)
After:
 rm -f monstr.c vis_tab.c ../include/vis_tab.h #obsolete generated files
(no extra feedback from rm or make).
NetHack-3.7
PatR 2 months ago
parent
commit
9c71b7dc4a
  1. 4
      sys/unix/Makefile.src

4
sys/unix/Makefile.src

@ -1,5 +1,5 @@
# NetHack Makefile.
# NetHack 3.7 Makefile.src $NHDT-Date: 1612127122 2021/01/31 21:05:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.122 $
# NetHack 3.7 Makefile.src $NHDT-Date: 1626967328 2021/07/22 15:22:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $
# Copyright (c) 2018 by Pasi Kallinen
# NetHack may be freely redistributed. See license for details.
@ -754,7 +754,7 @@ tags: $(CSOURCES)
clean:
-rm -f *.o $(HACK_H) $(CONFIG_H)
-rm monstr.c vis_tab.c ../include/vis_tab.h #obsolete generated files
-rm -f monstr.c vis_tab.c ../include/vis_tab.h #obsolete generated files
$(CLEANMORE)
spotless: clean

Loading…
Cancel
Save