From 9a353bdacc4d1d9ed3602eced9f62169d7fd151e Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sat, 2 Jun 2012 13:32:53 +0200 Subject: [PATCH] Add configuration checks to build system * targets.mk: Add targets "config", "config-test", "config-exe", "config-cmd", "config-all" and "config-eol" (all .PHONY). These echo various configuration dependent variables so they can be more easily checked for correctness. * Makefile: Document the new targets, "config" with "help" and the rest with "helpall". --- Makefile | 11 +++++++++++ targets.mk | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 02c634fd9..5222e71f8 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,17 @@ helpall:: $(info make cleantest - remove check remnants) $(info make clean-install - remove previous Org installation) $(info ) + $(info Configuration Check) + $(info ===================) +help helpall:: + $(info make config - check main configuration) +helpall:: + $(info make config-test - check test configuration) + $(info make config-exe - check executables configuration) + $(info make config-cmd - check command configuration) + $(info make config-all - check all configuration) + $(info make config-eol - check all configuration, mark end-of-line) + $(info ) $(info Documentation) $(info =============) help helpall:: diff --git a/targets.mk b/targets.mk index 680af0547..16c71d813 100644 --- a/targets.mk +++ b/targets.mk @@ -23,10 +23,36 @@ ifneq ($(GITSTATUS),) endif .PHONY: all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \ - check test install info html pdf card doc docs $(INSTSUB) \ - autoloads cleanall clean cleancontrib cleanutils cleanrel clean-install \ - cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest - compile compile-dirty uncompiled + check test install info html pdf card doc docs $(INSTSUB) \ + autoloads cleanall clean cleancontrib cleanutils cleanrel clean-install \ + cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest \ + compile compile-dirty uncompiled \ + config config-test config-exe config-all config-eol + +CONF_BASE = EMACS lispdir infodir datadir testdir +CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA +CONF_EXEC = CP MKDIR RM RMR FIND SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO +CONF_CALL = BATCH BATCHL ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION +config-eol:: EOL = \# +config-eol:: config-all +config config-all:: + $(info ) + $(info ========= Emacs executable and Installation paths) + $(foreach var,$(CONF_BASE),$(info $(var) = $($(var))$(EOL))) +config-test config-all:: + $(info ) + $(info ========= Test configuration) + $(foreach var,$(CONF_TEST),$(info $(var) = $($(var))$(EOL))) +config-exe config-all:: + $(info ) + $(info ========= Executables used by make) + $(foreach var,$(CONF_EXEC),$(info $(var) = $($(var))$(EOL))) +config-cmd config-all:: + $(info ) + $(info ========= Commands used by make) + $(foreach var,$(CONF_CALL),$(info $(var) = $($(var))$(EOL))) +config config-test config-exe config-all:: + $(info ) oldorg: compile info # what the old makefile did when no target was specified uncompiled: cleanlisp autoloads # for developing