From dd464df687faf544e83684d0c0e4da87c05f8bfe Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 10 May 2010 20:11:56 +0000 Subject: Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently: - Disables 'Built on ...' in 'foo --version'. - Disables timestamps from being embedded into .dir files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103423 91177308-0d34-0410-b5e6-96231b3b80d8 --- Makefile.rules | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index d70215e94a..d77fe27b27 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -447,6 +447,14 @@ else endif endif +# Support makefile variable to disable any kind of timestamp/non-deterministic +# info from being used in the build. +ifeq ($(ENABLE_TIMESTAMPS),1) + DOTDIR_TIMESTAMP_COMMAND := $(DATE) +else + DOTDIR_TIMESTAMP_COMMAND := echo 'Created.' +endif + ifeq ($(HOST_OS),MingW) # Work around PR4957 CPP.Defines += -D__NO_CTYPE_INLINE @@ -779,7 +787,7 @@ $(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $ # To create other directories, as needed, and timestamp their creation %/.dir: $(Verb) $(MKDIR) $* > /dev/null - $(Verb) $(DATE) > $@ + $(Verb) $(DOTDIR_TIMESTAMP_COMMAND) > $@ .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir -- cgit v1.2.3