You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
freifunkist-firmware/package/boot/uboot-ar71xx/patches/0002-upstream-Makefile-Repr...

31 lines
1.4 KiB

--- a/Makefile
+++ b/Makefile
@@ -389,8 +389,26 @@ $(VERSION_FILE):
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
$(TIMESTAMP_FILE):
- @date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
- @date +'#define U_BOOT_TIME "%T"' >> $@
+ (if test -n "$${SOURCE_DATE_EPOCH}"; then \
+ SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \
+ DATE=""; \
+ for date in gdate date.gnu date; do \
+ $${date} -u -d "$${SOURCE_DATE}" >/dev/null 2>&1 && DATE="$${date}"; \
+ done; \
+ if test -n "$${DATE}"; then \
+ LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"' > $@; \
+ LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"' >> $@; \
+ LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"' >> $@; \
+ LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"' >> $@; \
+ else \
+ return 42; \
+ fi; \
+ else \
+ LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
+ LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
+ LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \
+ LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
+ fi)
gdbtools:
$(MAKE) -C tools/gdb all || exit 1