Stefan Tauner has uploaded this change for review. ( https://review.coreboot.org/21826
Change subject: fixup! Convert flashrom to git ......................................................................
fixup! Convert flashrom to git
Use a more generic file name for the exported VCS data. Currently we only export the flashrom version string and makefile change date but even this later data is not a "version".
Change-Id: Ie57b20dc014ba44ded5783bdb432eb7d0e0e28ad --- M Makefile 1 file changed, 7 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/26/21826/1
diff --git a/Makefile b/Makefile index a649f38..62a3869 100644 --- a/Makefile +++ b/Makefile @@ -526,10 +526,10 @@
CLI_OBJS = cli_classic.o cli_output.o cli_common.o print.o
-# Makefile.version is used when packaging flashrom and is generated by the -# export rule. If Makefile.version is not found, version info will be obtained +# Makefile.VCS is used when packaging flashrom and is generated by the +# export rule. If Makefile.VCS is not found, version info will be obtained # using util/getrevision.sh or "unknown" if SCM metadata directory isn't found. -ifeq ($(wildcard Makefile.version),) +ifeq ($(wildcard Makefile.VCS),) ifeq ($(wildcard .git),) VERSION ?= unknown MAN_DATE ?= unknown @@ -540,7 +540,7 @@ $(shell ./util/git-hooks/install.sh) endif else -include Makefile.version +include Makefile.VCS endif
# VERSION equals "offline" if online access is required but the respective git @@ -1402,10 +1402,9 @@ @rm -rf "$(EXPORTDIR)/flashrom-$(RELEASENAME)" @mkdir -p "$(EXPORTDIR)/flashrom-$(RELEASENAME)" @git archive HEAD | tar -x -C "$(EXPORTDIR)/flashrom-$(RELEASENAME)" -# Generate Makefile.version since SCM metadata won't be available in -# exported sources. - @echo "VERSION = $(VERSION)" > "$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile.version" - @echo "MAN_DATE = $(MAN_DATE)" >> "$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile.version" +# Generate Makefile.VCS containing metadata that would not be available in exported sources otherwise. + @echo "VERSION = $(VERSION)" > "$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile.VCS" + @echo "MAN_DATE = $(MAN_DATE)" >> "$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile.VCS" # Restore modification date of all tracked files not marked 'export-ignore' in .gitattributes. # sed is required to filter out file names having the attribute set. # The sed program saves the file name in the hold buffer and then checks if the respective value is 'set'.