Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2021 21:49:26 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c50c8502cb62 - main - awk: Fix dependencies
Message-ID:  <202107312149.16VLnQ2K059229@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c50c8502cb629571f35089690d6e9a9bc4d60813

commit c50c8502cb629571f35089690d6e9a9bc4d60813
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-07-31 21:41:29 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-07-31 21:48:26 +0000

    awk: Fix dependencies
    
    proctab.c is generated from awktab.h, so needs to depend on it.
    maketab does not depend on awktab.h, and gets the maketab.c dependency
    automatically, so remove them both.
    
    Normally, these don't matter. However, for a meta build, they can cause
    us to build maketab twice (once host, once for target) resulting in a
    binary that can't run on the host due to proctab.c racing maketab in
    parallel legs. In stable/12, this was a reliably lost race, while in
    main I've been unable to trigger the race at all (maybe due to dirdep
    changes making main more robust).
    
    MFC After:      1 day (build breakage)
    Reported by:    kp
    Sponsored by:   Netflix
---
 usr.bin/awk/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile
index 82de7d56a415..cc740a46b82c 100644
--- a/usr.bin/awk/Makefile
+++ b/usr.bin/awk/Makefile
@@ -22,12 +22,12 @@ CLEANFILES= maketab proctab.c awkgram.tab.h
 awkgram.tab.h: awkgram.h
 	ln -sf ${.ALLSRC:M*.h} ${.TARGET}
 
-proctab.c: maketab
+proctab.c: maketab awkgram.h
 	${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c
 
 DEPENDOBJS+= maketab
 build-tools: maketab
-maketab: awkgram.tab.h maketab.c ${BUILD_TOOLS_META}
+maketab: ${BUILD_TOOLS_META}
 
 # awk needs some work before we can connect these tests to the build
 #HAS_TESTS=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107312149.16VLnQ2K059229>