Files
epics-base/configure/RULES_COMMON
Andrew Johnson 11ba48232c Add RULES_COMMON
This adds new make targets 'PRINT.<var-name>' and 'show-makefiles'
which are useful for debugging build problems.
2018-10-19 14:23:18 -05:00

34 lines
1.0 KiB
Plaintext

#*************************************************************************
# Copyright (c) 2018 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# These rules show the set of Makefiles, config files and
# rules files loaded by GNUmake.
SHOW_MAKEFILES = $(MAKEFILE_LIST:%=show-makefile.%)
show-makefiles: $(SHOW_MAKEFILES)
# The sort prevents warnings about duplicate targets:
$(sort $(SHOW_MAKEFILES)): show-makefile.%:
@echo " $(@:show-makefile.%=%)"
.PHONY: show-makefiles show-makefile.%
# These rules support printing a Makefile variable values.
# Many variables are only set inside an O.<arch> build directory.
# make PRINT.T_A
PRINT_Var = $(@:PRINT.%=%)
PRINT.%:
@echo "$(PRINT_Var) = '$($(PRINT_Var))'"
.PHONY: PRINT PRINT.%
# User specific rules
#
-include $(HOME)/configure/RULES_USER