[Buildroot] Global definition of Today's date.

Ulf Samuelsson ulf at atmel.com
Mon Jul 9 12:01:50 UTC 2007


Think I am going to need today's date in a few other places.
The date seems to be defined in mtd/mtd.mk, but
I think the top Makefile is more appropriate for this.
Anyone has a problem with me applying this patch?



Index: package/mtd/mtd.mk
===================================================================
--- package/mtd/mtd.mk  (revision 19054)
+++ package/mtd/mtd.mk  (arbetskopia)
@@ -5,8 +5,8 @@
 #############################################################
 ifeq ($(strip $(BR2_PACKAGE_MTD_SNAPSHOT)),y)
 # Be aware that this changes daily....
-TODAY:=$(shell date -u +%Y%m%d)
-MTD_DL_SOURCE:=mtd-snapshot-$(TODAY).tar.bz2
+
+MTD_DL_SOURCE:=mtd-snapshot-$(DATE).tar.bz2
 MTD_CAT:=$(BZCAT)
 MTD_SOURCE:=mtd-snapshot.tar.bz2
 MTD_SITE:=ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs
Index: Makefile
===================================================================
--- Makefile    (revision 19054)
+++ Makefile    (arbetskopia)
@@ -25,6 +25,7 @@
 CONFIG_CONFIG_IN = Config.in
 CONFIG_DEFCONFIG = .defconfig
 CONFIG = package/config
+DATE:=$(shell date -u +%Y%m%d)
 
 noconfig_targets := menuconfig config oldconfig randconfig \
        defconfig allyesconfig allnoconfig release tags    \


Best Regards
Ulf Samuelsson





More information about the buildroot mailing list