Last active
January 24, 2021 11:04
-
-
Save DanielG/d12035ea90eefd87d6ba1aad2ed2477f to your computer and use it in GitHub Desktop.
Revisions
-
DanielG revised this gist
Jan 24, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ F:=$$F dollar := $$ # This stuff gets expanded at git-archive(1) time due to the export-subst # setting for this file in .gitattributes. See gitattributes(5) GIT_COMMIT := $Format:%H$ GIT_DATE := $Format:%cD$ GIT_TIMESTAMP := $Format:%ct$ -
DanielG revised this gist
Jan 24, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ GIT_TIMESTAMP := $Format:%ct$ GIT_SUBJ := $Format:%s$ GIT_DIRTY := # If the above wasn't expanded get version info straight from git ifeq ($(GIT_COMMIT),$(dollar)Format:%H$(dollar)) GIT_COMMIT := $(shell git rev-parse HEAD) GIT_DATE := $(shell git show -s --pretty=format:%cD) -
DanielG revised this gist
Jan 24, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,7 @@ GIT_TIMESTAMP := $Format:%ct$ GIT_SUBJ := $Format:%s$ GIT_DIRTY := # If the above didn't get expanded get version info straight from git ifeq ($(GIT_COMMIT),$(dollar)Format:%H$(dollar)) GIT_COMMIT := $(shell git rev-parse HEAD) GIT_DATE := $(shell git show -s --pretty=format:%cD) -
DanielG revised this gist
Jan 24, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # SPDX-License-Identifier: MIT OR FSFAP OR CC0-1.0 F:=$$F dollar := $$ -
DanielG revised this gist
Jan 24, 2021 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # SPDX-License-Identifier: FSFAP OR CC0-1.0 F:=$$F dollar := $$ -
DanielG created this gist
Jan 24, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ /git.mk export-subst This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ F:=$$F dollar := $$ # This stuff gets expanded at git-archive(1) time due to the export-subst # setting for this file in .gitattributes GIT_COMMIT := $Format:%H$ GIT_DATE := $Format:%cD$ GIT_TIMESTAMP := $Format:%ct$ GIT_SUBJ := $Format:%s$ GIT_DIRTY := ifeq ($(GIT_COMMIT),$(dollar)Format:%H$(dollar)) GIT_COMMIT := $(shell git rev-parse HEAD) GIT_DATE := $(shell git show -s --pretty=format:%cD) GIT_TIMESTAMP := $(shell git show -s --pretty=format:%ct) GIT_SUBJ := $(shell git show -s --pretty=format:%s) GIT_DIRTY := -dirty endif .PHONY: FORCE git.h: FORCE @printf ' GIT\t$@\n' @echo '#pragma once' > $@ @echo '#define GIT_COMMIT "commit $(GIT_COMMIT)$(GIT_DIRTY)"' >> $@ @echo '#define GIT_SUBJ "$(GIT_SUBJ)"' >> $@ @echo '#define GIT_DATE "$(GIT_DATE)"' >> $@