diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-11 22:42:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-11 22:42:59 -0700 |
commit | e2699f281ab50a2f2fe620fd5926ad0c64afecbd (patch) | |
tree | 4a5bc96aec952c2ae37c2500f3aa79c297b19936 /Makefile | |
parent | 8f0676b0790b8ae015be20c3c2ca56ab4649d317 (diff) | |
download | txr-e2699f281ab50a2f2fe620fd5926ad0c64afecbd.tar.gz txr-e2699f281ab50a2f2fe620fd5926ad0c64afecbd.tar.bz2 txr-e2699f281ab50a2f2fe620fd5926ad0c64afecbd.zip |
New: build-id feature.
A build-id is a string optionally embedded into TXR at build
time which can be displayed with a command line option. It can
help developers who are juggling multiple builds in their
workspace to identify what they are running.
* Makefile (txr.o, txr-win.o): If a build_id has been
defined, then define the TXR_BUILD_ID macro on the command
line when compiling these object files.
* configure (build_id): New variable.
(help) Describe build_id.
(gen_config_make): Generate build_id and build_id_exp make
variables.
* txr.1: Documented --build-id option.
* tsr.c (build_id): Conditionally defined global variable.
(help): Brief help string for --build-id.
(txr_main): Process --build-id option.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -329,6 +329,9 @@ opt/txr-win.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)-win\" \ -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)-win$(EXE)\" dbg/txr-win.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)-win-dbg\" \ -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)-win-dbg$(EXE)\" +ifneq ($(build_id_exp),) +$(call EACH_CONF,txr.o txr-win.o): TXR_CFLAGS += -DTXR_BUILD_ID=\"$(build_id_exp)\" +endif $(call EACH_CONF,txr.o txr-win.o): TXR_CFLAGS += -DEXE_SUFF=\"$(EXE)\" $(call EACH_CONF,txr.o txr-win.o): TXR_CFLAGS += -DTXR_VER=\"$(txr_ver)\" |