From 77d1b8f60427f0df04d0b1ec1b63725b553289a8 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Thu, 17 Aug 2017 09:58:46 -0600 Subject: [PATCH] Added ability to compile w/o timestamps. - Compiling binaries without timestamps is useful for testing and being able to compare binaries using diff. --- Marlin/Conditionals_LulzBot.h | 2 +- Marlin/Makefile | 5 +++++ build-lulzbot-firmware.sh | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 880b999be..34b7c0e16 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -200,7 +200,7 @@ /* Endstop settings are determined by printer model, except for the * X_MAX which varies by toolhead. */ -if defined(LULZBOT_USE_NORMALLY_CLOSED_ENDSTOPS) +#if defined(LULZBOT_USE_NORMALLY_CLOSED_ENDSTOPS) // TAZ 6+ and Huerfano Mini onwards use normally closed endstops. // This is safer, as a loose connector or broken wire will halt // the axis diff --git a/Marlin/Makefile b/Marlin/Makefile index 14e68973e..3ba11b08f 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -338,6 +338,11 @@ LD_PREFIX=-nodefaultlibs LD_SUFFIX=-lm -lgcc -lc -lgcc endif +#Disabling the timestamp is useful for diffing binaries between different builds. +ifeq ($(NO_TIMESTAMP), 1) +CDEFS +=-D__DATE__="??? ?? ????" -D__TIME__="??:??:??" +endif + #Check for Arduino 1.0.0 or higher and use the correct source files for that version ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) CXXSRC += main.cpp diff --git a/build-lulzbot-firmware.sh b/build-lulzbot-firmware.sh index b4844f8f0..fb2482ccd 100755 --- a/build-lulzbot-firmware.sh +++ b/build-lulzbot-firmware.sh @@ -147,7 +147,14 @@ check_avr_tools rm -rf build mkdir build -if [ $# -eq 2 ]; then +if [ "$1" = "--no-timestamp" ] +then + shift + MAKEOPTS="NO_TIMESTAMP=1" +fi + +if [ $# -eq 2 ] +then build_firmware $1 $2 else build_for_mini