2012-05-16 22:46:28 +04:00
|
|
|
# -*- makefile -*-
|
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
## Intent: Helper targets for displaying variables and state information
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Support usage outside of config/rules.mk
|
|
|
|
ifndef INCLUDED_DEBUGMAKE_MK #{
|
|
|
|
|
2014-07-16 11:36:30 +04:00
|
|
|
define CR
|
|
|
|
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2013-12-01 02:20:19 +04:00
|
|
|
define shell_quote
|
2014-07-16 11:36:30 +04:00
|
|
|
'$(subst $(CR),\$(CR),$(subst ','\'',$(1)))'
|
2013-12-01 02:20:19 +04:00
|
|
|
endef
|
|
|
|
|
2012-05-16 22:46:28 +04:00
|
|
|
echo-variable-%:
|
2013-12-01 02:20:19 +04:00
|
|
|
@echo $(call shell_quote,$($*))
|
2012-05-16 22:46:28 +04:00
|
|
|
|
|
|
|
echo-dirs:
|
2013-12-01 02:20:19 +04:00
|
|
|
@echo $(call shell_quote,$(DIRS))
|
2012-05-16 22:46:28 +04:00
|
|
|
|
2013-12-01 02:20:19 +04:00
|
|
|
define print_var
|
|
|
|
@printf '%20s = %s\n' $1 $(call shell_quote,$($1))
|
2012-05-16 22:46:28 +04:00
|
|
|
|
2013-12-01 02:20:19 +04:00
|
|
|
endef
|
2012-05-16 22:46:28 +04:00
|
|
|
|
2013-12-01 02:20:19 +04:00
|
|
|
define print_vars
|
|
|
|
$(foreach var,$1,$(call print_var,$(var)))
|
|
|
|
endef
|
2012-05-16 22:46:28 +04:00
|
|
|
|
|
|
|
showtargs:
|
2018-12-22 02:00:00 +03:00
|
|
|
ifneq (,$(filter $(PROGRAM) $(HOST_PROGRAM) $(SIMPLE_PROGRAMS) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))
|
2012-05-16 22:46:28 +04:00
|
|
|
@echo --------------------------------------------------------------------------------
|
2013-12-01 02:20:19 +04:00
|
|
|
$(call print_vars,\
|
|
|
|
PROGRAM \
|
|
|
|
SIMPLE_PROGRAMS \
|
|
|
|
LIBRARY \
|
|
|
|
SHARED_LIBRARY \
|
|
|
|
LIBS \
|
|
|
|
DEF_FILE \
|
|
|
|
IMPORT_LIBRARY \
|
|
|
|
STATIC_LIBS \
|
2014-07-29 03:59:56 +04:00
|
|
|
SHARED_LIBS \
|
2013-12-01 02:20:19 +04:00
|
|
|
EXTRA_DSO_LDOPTS \
|
|
|
|
DEPENDENT_LIBS \
|
|
|
|
)
|
2012-05-16 22:46:28 +04:00
|
|
|
@echo --------------------------------------------------------------------------------
|
|
|
|
endif
|
|
|
|
$(LOOP_OVER_DIRS)
|
|
|
|
|
2015-12-30 11:49:55 +03:00
|
|
|
showbuild showhost: _DEPEND_CFLAGS=
|
2016-02-03 11:05:56 +03:00
|
|
|
showbuild showhost: COMPILE_PDB_FLAG=
|
2012-05-16 22:46:28 +04:00
|
|
|
showbuild:
|
2013-12-01 02:20:19 +04:00
|
|
|
$(call print_vars,\
|
|
|
|
MOZ_WIDGET_TOOLKIT \
|
|
|
|
CC \
|
|
|
|
CXX \
|
|
|
|
CCC \
|
|
|
|
CPP \
|
|
|
|
LD \
|
|
|
|
AR \
|
|
|
|
IMPLIB \
|
|
|
|
FILTER \
|
|
|
|
MKSHLIB \
|
|
|
|
MKCSHLIB \
|
|
|
|
RC \
|
|
|
|
CFLAGS \
|
|
|
|
OS_CFLAGS \
|
|
|
|
COMPILE_CFLAGS \
|
|
|
|
CXXFLAGS \
|
|
|
|
OS_CXXFLAGS \
|
|
|
|
COMPILE_CXXFLAGS \
|
|
|
|
COMPILE_CMFLAGS \
|
|
|
|
COMPILE_CMMFLAGS \
|
|
|
|
LDFLAGS \
|
|
|
|
OS_LDFLAGS \
|
|
|
|
DSO_LDOPTS \
|
|
|
|
OS_INCLUDES \
|
|
|
|
OS_LIBS \
|
|
|
|
BIN_FLAGS \
|
|
|
|
INCLUDES \
|
|
|
|
DEFINES \
|
|
|
|
ACDEFINES \
|
|
|
|
BIN_SUFFIX \
|
|
|
|
LIB_SUFFIX \
|
|
|
|
DLL_SUFFIX \
|
|
|
|
IMPORT_LIB_SUFFIX \
|
|
|
|
INSTALL \
|
|
|
|
VPATH \
|
|
|
|
)
|
2012-05-16 22:46:28 +04:00
|
|
|
|
|
|
|
showhost:
|
2013-12-01 02:20:19 +04:00
|
|
|
$(call print_vars,\
|
|
|
|
HOST_CC \
|
|
|
|
HOST_CXX \
|
|
|
|
HOST_CFLAGS \
|
|
|
|
HOST_LDFLAGS \
|
|
|
|
HOST_LIBS \
|
|
|
|
HOST_EXTRA_LIBS \
|
|
|
|
HOST_EXTRA_DEPS \
|
|
|
|
HOST_PROGRAM \
|
|
|
|
HOST_OBJS \
|
|
|
|
HOST_PROGOBJS \
|
|
|
|
)
|
2012-05-16 22:46:28 +04:00
|
|
|
|
|
|
|
INCLUDED_DEBUGMAKE_MK = 1
|
|
|
|
endif #}
|