From f756851d45556ffae289a1553a9f8242a9b0e8eb Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 9 Nov 2021 21:11:58 +0100 Subject: [PATCH] BLFS tools: do not needlessly validate book With the current Makefile, git-version.sh is run unconditionally, so that the bok is validated each time, even if there is no text change. Change this to only validate if there is a text change (the previous behavior), and run git-version.sh just before validation. --- BLFS/Makefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/BLFS/Makefile b/BLFS/Makefile index 47361c8..2a11fde 100644 --- a/BLFS/Makefile +++ b/BLFS/Makefile @@ -147,7 +147,11 @@ ifneq ($(REV),$(REV1)) $(BLFS_FULL): FORCE $(LFS_FULL): FORCE endif -$(LFS_FULL): $(LFS_XML) $(LFS_XML)/general.ent $(ALLXMLLFS) $(ALLXSLLFS) lfs-version +$(LFS_FULL): $(LFS_XML) $(LFS_XML)/general.ent $(ALLXMLLFS) $(ALLXSLLFS) + $(Q)cd $(LFS_XML) && if [ -x git-version.sh ] ; then \ + echo "Processing LFS version..."; \ + ./git-version.sh $(REV); \ + fi @echo "Processing LFS bootscripts..." $(Q)cd $(LFS_XML) && bash process-scripts.sh $(Q)[ -d $(LFSTMP) ] || mkdir -p $(LFSTMP) @@ -164,7 +168,11 @@ $(LFS_FULL): $(LFS_XML) $(LFS_XML)/general.ent $(ALLXMLLFS) $(ALLXSLLFS) lfs-ver $(Q)cd $(LFS_XML) && ./aux-file-data.sh $@ $(Q)echo $(REV) > $(REVFILE) -$(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL) version +$(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL) + $(Q)cd $(BLFS_XML) && if [ -x git-version.sh ] ; then \ + echo "Processing BLFS version..."; \ + ./git-version.sh $(REV); \ + fi $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) @echo "Adjusting BLFS for revision $(REV)..." $(Q)xsltproc --nonet --xinclude \ @@ -208,17 +216,6 @@ $(BLFS_XML): git checkout $(BLFS-BRANCH); \ fi -# Generate BLFS version from git: -version: - $(Q)cd $(BLFS_XML) && if [ -x git-version.sh ] ; then \ - ./git-version.sh $(REV); \ - fi - -lfs-version: - $(Q)cd $(LFS_XML) && if [ -x git-version.sh ] ; then \ - ./git-version.sh $(REV); \ - fi - # Clean up clean: