common/environment: empty file before writing.
Emptying the headerfile before writing into it. This prevents defining/undefining a macro multiple times. addresses #3765.
This commit is contained in:
parent
1da2309458
commit
15f26298aa
1 changed files with 1 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
if [ -n "$SOURCE_DATE_EPOCH" ]; then
|
||||
CFLAGS+=" -Wno-builtin-macro-redefined -include$XBPS_STATEDIR/timestamp-macros.h"
|
||||
CXXFLAGS+=" -Wno-builtin-macro-redefined -include$XBPS_STATEDIR/timestamp-macros.h"
|
||||
printf > $XBPS_STATEDIR/timestamp-macros.h
|
||||
for i in "DATE,%b %d %Y" "TIME,%H:%M:%S" "DATETIME,%b %d %Y %H:%M:%S"; do
|
||||
mcr=${i%%,*}
|
||||
val=$(LC_ALL=C date --date "@$SOURCE_DATE_EPOCH" +"${i#*,}")
|
||||
|
|
Loading…
Reference in a new issue