7e88fd5b88b421a27e9677737bf357fbe29c0e6c braney Sun Sep 6 17:16:14 2026 -0700 makefiles: take out the hand-written header dependencies The compiler records these now, so the lines are only a second copy that can drift. They already had: hg/hgTables named 23 objects as depending on hgTables.h, and thirteen more include it. Touching that header rebuilt 23 objects before this and rebuilds 36 after, and nothing that rebuilt before stops rebuilding. 43 lines go, in hg/hgTables, hg/hgTracks, hg/blastToPsl, hg/genePredToMafFrames, hg/pslDiff and hg/utils/refSeqGet, along with four extraHeaders variables that were the same thing said another way. A hand-written line stays wherever the header is generated, by autoSql, by stringify or by a sed rule. On the first build there is no .d file yet, so nothing else makes the generator run before the compile that needs its output. That leaves hg/hgGeneRing, hg/visiGene/vgLoadMahoney, hg/qaPushQ, hg/lib and hg/hgGateway, and trims extraHeaders down to the generated headers in hg/pslCDnaFilter and hg/utils/overlapSelect. Both of those were cleaned and rebuilt from a tree with no usage.h or algo.h in it to check the ordering still holds. The C++ ones in optimalLeaf and hg/lib/straw stay as well, since -MMD never sees a .cc file. The genbank tree keeps its eleven lines untouched. It is built by no kent target, and it does not compile at all today: mgcStatusTbl.c fails -Werror=format. Nothing there could be verified, so nothing there was changed. inc/userApp.mk now says extraHeaders is for generated headers, so the ordinary ones do not come back. refs #36621 diff --git src/inc/userApp.mk src/inc/userApp.mk index d5983a478c7..b9f6f13ca41 100644 --- src/inc/userApp.mk +++ src/inc/userApp.mk @@ -2,32 +2,35 @@ # user App rules, typical three-line makefile to use this rule set, # # the one program file name is specified by the 'A' variable: # kentSrc = ../.. # A = aveCols # include ${kentSrc}/inc/userApp.mk # # See userAppMulti.mk if multiple programs are required in a single directory. # # Other variables that can be defined, which needs to be done # before including userApp.mk # # for more than one object file for the resulting 'A' program, use # extraObjects = second.o third.o fourth.o etc.o # -# and for extra header files for depenencies -# extraHeaders = second.h third.h fourth.h etc.h +# for headers this directory generates, such as a stringify usage message or an +# autoSql output. Ordinary headers do not belong here: the compiler records +# those itself, see DEPGEN in common.mk. A generated header has to be named, +# because on the first build there is nothing to have recorded yet. +# extraHeaders = usage.h # # to use object files built elsewhere: # externObjects = ../path/other.o # # use other libraries BEFORE jkweb.a # preMyLibs += path/to/lib/other.a # # Note: Reason for restriction on compiling one program.: # Due to the non-standard use of make, the expected behavor is that the # program gets rebuilt if the .o is missing (after make clean), even if the # program in the destination is current with the C file. This doesn't work # with make pattern rules, as it will not rebuild the target in this case. # ifneq ($(words ${A}),1) $(error The A variable should contain only one word, found '${A}')