avoid redundant unix dependency for tile.o

This commit is contained in:
PatR
2023-10-14 13:48:47 -07:00
parent ef22d87e26
commit db48b92dd3
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
# NetHack Makefile.
# NetHack 3.7 Makefile.src $NHDT-Date: 1696193939 2023/10/01 20:58:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.163 $
# NetHack 3.7 Makefile.src $NHDT-Date: 1697316523 2023/10/14 20:48:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.164 $
# Copyright (c) 2018 by Pasi Kallinen
# NetHack may be freely redistributed. See license for details.
@@ -1069,7 +1069,6 @@ qt_xcmd.moc: ../win/Qt/qt_xcmd.h $(QTn_H)
$(MOCPATH) -o $@ ../win/Qt/qt_xcmd.h
qt_yndlg.moc: ../win/Qt/qt_yndlg.h $(QTn_H)
$(MOCPATH) -o $@ ../win/Qt/qt_yndlg.h
$(TARGETPFX)tile.o: tile.c $(HACK_H)
$(TARGETPFX)wc_chainin.o: ../win/chain/wc_chainin.c $(HACK_H)
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ ../win/chain/wc_chainin.c
$(TARGETPFX)wc_chainout.o: ../win/chain/wc_chainout.c $(HACK_H)

View File

@@ -1,6 +1,6 @@
# depend.awk -- awk script used to construct makefile dependencies
# for nethack's source files (`make depend' support for Makefile.src).
# $NHDT-Date: 1612127123 2021/01/31 21:05:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $
# $NHDT-Date: 1697316508 2023/10/14 20:48:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $
#
# usage:
# awk -f depend.awk ../include/*.h list-of-.c/.cpp-files
@@ -90,7 +90,7 @@ function output_dep( base, targ, moc)
if (moc || base ~ /(.+\/)*qt_.*[.]cpp$/) {
deps[file] = deps[file] " $(QTn_H)"
}
if (base ~ /[.]cp*$/ || moc) {
if ((base ~ /[.]cp*$/ || moc) && !(base in basedone)) {
#prior to very first .c|.cpp file, handle some special header file cases
if (!c_count++)
output_specials()
@@ -98,6 +98,9 @@ function output_dep( base, targ, moc)
targ = base; sub("[.]cp*$", ".o", targ)
#format and write the collected dependencies
format_dep(targ, file)
#generated file tile.c can appear more than once in the list of files
#so track which files have already been handled; can't reuse done[] here
basedone[base]++;
}
}