-
Notifications
You must be signed in to change notification settings - Fork 200
Fix reproducibility issues #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ endif | |
# Build date changes at every change | ||
EXTRA_DIST=strversionnumber.m4 | ||
BUILT_SOURCES=strversionnumber.cpp | ||
BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)" | ||
strversionnumber.cpp: $(libff_a_SOURCES2) ../../Makefile | ||
m4 -DVersionFreeFemDate="`date`" -DGitVersion="`git describe --tags 2>/dev/null|| echo 'no git'`" strversionnumber.m4 > $@ | ||
m4 -DVersionFreeFemDate="$(BUILD_DATE)" -DGitVersion="`git describe --tags 2>/dev/null|| echo 'no git'`" strversionnumber.m4 > $@ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not work on even on Debian. $ make strversionnumber.cpp
m4 -DVersionFreeFemDate="""" -DGitVersion="`git describe --tags 2>/dev/null|| echo 'no git'`" strversionnumber.m4 > strversionnumber.cpp Any suggestion @mzf-guest? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed! This code does not work when The Makefile example from this page seems to work better, at least in a minimal test. But I can't make it work from the Makefile.am file. When running
Unfortunately, I'm not very skilled with autotools. Do you have any hints? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahah, no, I faced the exact same issue. Maybe this should be put a static makefile, like $ cat Makefile.date
DATE_FMT = +%Y-%m-%d
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
else
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
endif
date:
echo $(BUILD_DATE) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any update about this @mzf-guest? |
||
FORCE: |
Uh oh!
There was an error while loading. Please reload this page.