Changeset 41275f9a


Ignore:
Timestamp:
01/23/2023 11:24:38 AM (15 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18, xry111/xf86-video-removal
Children:
bb0d80a8
Parents:
51bec49
git-author:
Xi Ruoyao <xry111@…> (01/23/2023 11:10:21 AM)
git-committer:
Xi Ruoyao <xry111@…> (01/23/2023 11:24:38 AM)
Message:

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

"Move if changed" is a widely use approach for this. And we also need
to detect if BASEDIR has changed.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r51bec49 r41275f9a  
    44xxx
    55*.swp
     6build-env
  • Makefile

    r51bec49 r41275f9a  
    3434  endif
    3535endif
    36 
    37 # Let's get the previous REV: it'll be used to see if we should
    38 # rebuild version.ent
    39 PREVREV != if [ -f conditional.ent ]; then \
    40               gawk '/INCLUDE/{ print $$3 }' conditional.ent; \
    41            fi
    4236
    4337ifeq ($(REV), sysv)
     
    280274        test-links dump-commands  bootscripts systemd-units
    281275
    282 # make version.ent unconditionally if we have changed REV
    283 ifneq ($(REV), $(PREVREV))
    284    .PHONY: version.ent
    285 endif
    286 
    287 version.ent: general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL)
     276version.ent: general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL) build-env
    288277        $(Q)./git-version.sh $(REV)
    289278
     
    310299#                general/prog/python-modules.xml
    311300#       $(Q)mv temp.xml $@
     301
     302.PHONY: update-build-env
     303update-build-env:
     304        $(Q)echo REV=$(REV) > $@.new
     305        $(Q)echo BASEDIR=$(BASEDIR) >> $@.new
     306        $(Q)diff $@.new $@ 2>/dev/null >/dev/null || mv $@.new $@
     307        $(Q)rm -f $@.new
     308
     309build-env: update-build-env
Note: See TracChangeset for help on using the changeset viewer.