Revert "Makefile: use a "by-the-book" way to detect build environment change"

This reverts commit 41275f9aac.
This commit is contained in:
Xi Ruoyao 2023-01-25 09:51:58 +08:00
parent f6065b4995
commit 05d5b11202
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
2 changed files with 12 additions and 11 deletions

1
.gitignore vendored
View File

@ -3,4 +3,3 @@ version.ent
blfs-bootscripts*
xxx
*.swp
build-env

View File

@ -34,6 +34,12 @@ ifneq ($(REV), sysv)
endif
endif
# Let's get the previous REV: it'll be used to see if we should
# rebuild version.ent
PREVREV != if [ -f conditional.ent ]; then \
gawk '/INCLUDE/{ print $$3 }' conditional.ent; \
fi
ifeq ($(REV), sysv)
BASEDIR ?= $(HOME)/public_html/blfs-book
NOCHUNKS_OUTPUT ?= blfs-book.html
@ -273,7 +279,12 @@ $(DUMPDIR): $(RENDERTMP)/$(BLFSFULL)
validate profile-html blfs-patch-list wget-list \
test-links dump-commands bootscripts systemd-units
version.ent: general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL) build-env
# make version.ent unconditionally if we have changed REV
ifneq ($(REV), $(PREVREV))
.PHONY: version.ent
endif
version.ent: general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL)
$(Q)./git-version.sh $(REV)
#ALL_PYTHON_DEPS := $(filter-out $(PYHOSTED), \
@ -298,12 +309,3 @@ version.ent: general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL) build-env
# stylesheets/pythonhosted.xsl \
# general/prog/python-modules.xml
# $(Q)mv temp.xml $@
.PHONY: update-build-env
update-build-env:
$(Q)echo REV=$(REV) > $@.new
$(Q)echo BASEDIR=$(BASEDIR) >> $@.new
$(Q)diff $@.new $@ 2>/dev/null >/dev/null || mv $@.new $@
$(Q)rm -f $@.new
build-env: update-build-env