The old behaviour of building with `__DATE__` and
`__TIME__` is still the default, but now it's
possible to use `-DREPRODUCIBLE=1` and the
`REPRODUCIBLE=1` parameter to `make` and `nmake`.
Specifically, this replaces the value of
`FACTOR_COMPILE_TIME` with the string constant
`"[reproducible]"`. This is purely a cosmetic
change.
ifdef CONFIG
VERSION = 0.99
GIT_LABEL = $(shell echo `git describe --all`-`git rev-parse HEAD`)
+ REPRODUCIBLE ?= 0
BUNDLE = Factor.app
-pedantic \
-DFACTOR_VERSION="$(VERSION)" \
-DFACTOR_GIT_LABEL="$(GIT_LABEL)" \
+ -DFACTOR_REPRODUCIBLE="$(REPRODUCIBLE)" \
$(SITE_CFLAGS)
CXXFLAGS += -std=c++11
CL_FLAGS = $(CL_FLAGS) /Zi /DFACTOR_DEBUG
!ENDIF
+!IF DEFINED(REPRODUCIBLE)
+CL_FLAGS = $(CL_FLAGS) /DFACTOR_REPRODUCIBLE=1
+!ENDIF
+
ML_FLAGS = /nologo /safeseh
EXE_OBJS = vm\main-windows.obj vm\factor.res
#define FACTOR_COMPILER_VERSION "unknown"
#endif
-// Record compilation time
-#define FACTOR_COMPILE_TIME __DATE__ " " __TIME__
+#if (FACTOR_REPRODUCIBLE == 1)
+ #pragma message "REPRODUCIBLE"
+ #define FACTOR_COMPILE_TIME "[reproducible]"
+#else
+ // Record compilation time
+ #define FACTOR_COMPILE_TIME __DATE__ " " __TIME__
+#endif
// Detect target CPU type
#if defined(__arm__)