ifdef CONFIG
VERSION = 0.99
GIT_LABEL = $(shell echo `git describe --all`-`git rev-parse HEAD`)
- REPRODUCIBLE ?= 0
-
BUNDLE = Factor.app
+ DEBUG ?= 0
+ REPRODUCIBLE ?= 0
include $(CONFIG)
-pedantic \
-DFACTOR_VERSION="$(VERSION)" \
-DFACTOR_GIT_LABEL="$(GIT_LABEL)" \
- -DFACTOR_REPRODUCIBLE="$(REPRODUCIBLE)" \
$(SITE_CFLAGS)
CXXFLAGS += -std=c++11
- ifdef DEBUG
+ ifneq ($(DEBUG), 0)
CFLAGS += -g -DFACTOR_DEBUG
else
CFLAGS += -O3
endif
+ ifneq ($(REPRODUCIBLE), 0)
+ CFLAGS += -DFACTOR_REPRODUCIBLE -Wno-builtin-macro-redefined
+ endif
+
ENGINE = $(DLL_PREFIX)factor$(DLL_SUFFIX)$(DLL_EXTENSION)
EXECUTABLE = factor$(EXE_SUFFIX)$(EXE_EXTENSION)
CONSOLE_EXECUTABLE = factor$(EXE_SUFFIX)$(CONSOLE_EXTENSION)
@echo "Additional modifiers:"
@echo ""
@echo "DEBUG=1 compile VM with debugging information"
+ @echo "REPRODUCIBLE=1 compile VM without timestamp"
@echo "SITE_CFLAGS=... additional optimization flags"
@echo "X11=1 force link with X11 libraries instead of Cocoa (only on Mac OS X)"
$ECHO NUM_CORES=$NUM_CORES
$ECHO WORD=$WORD
$ECHO DEBUG=$DEBUG
+ $ECHO REPRODUCIBLE=$REPRODUCIBLE
$ECHO CURRENT_BRANCH=$CURRENT_BRANCH
$ECHO FACTOR_BINARY=$FACTOR_BINARY
$ECHO FACTOR_LIBRARY=$FACTOR_LIBRARY
$ECHO " bootstrap - bootstrap with existing boot image"
$ECHO " net-bootstrap - recompile, download a boot image, bootstrap"
$ECHO " make-target - find and print the os-arch-cpu string"
- $ECHO " report - print the build variables"
+ $ECHO " report|info - print the build variables"
$ECHO " update-boot-image - get the boot image for the current branch of for master"
$ECHO ""
$ECHO "If you are behind a firewall, invoke as:"
if [[ -n "$2" ]] ; then
parse_build_info $2
fi
+$ECHO "args $#"
+if [ "$#" -gt 3 ]; then
+ usage
+ $ECHO "error: too many arguments"
+ exit 1
+fi
+
set_copy
set_delete
deps-pkg) install_deps_pkg ;;
self-update) update; make_boot_image; bootstrap;;
quick-update) update; refresh_image ;;
- update) update; download_and_bootstrap ;;
- latest) update; download_and_bootstrap ;;
+ update|latest) update; download_and_bootstrap ;;
compile) find_build_info; make_factor ;;
bootstrap) get_config_info; bootstrap ;;
net-bootstrap) net_bootstrap_no_pull ;;
make-target) FIND_MAKE_TARGET=true; ECHO=false; find_build_info; exit_script ;;
- report) find_build_info ;;
+ report|info) find_build_info ;;
full-report) find_build_info; check_installed_programs; check_libraries ;;
update-boot-image) find_build_info; check_installed_programs; update_boot_image;;
*) usage ;;
#define FACTOR_COMPILER_VERSION "unknown"
#endif
-#if (FACTOR_REPRODUCIBLE == 1)
- #pragma message "REPRODUCIBLE"
+#if defined(FACTOR_REPRODUCIBLE)
#define FACTOR_COMPILE_TIME "[reproducible]"
#else
// Record compilation time