michael@0: # -*- makefile -*- michael@0: # vim:set ts=8 sw=8 sts=8 noet: michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: # You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: # michael@0: michael@0: ########################################################################### michael@0: ## Intent: Helper targets for displaying variables and state information michael@0: ########################################################################### michael@0: michael@0: # Support usage outside of config/rules.mk michael@0: ifndef INCLUDED_DEBUGMAKE_MK #{ michael@0: michael@0: define shell_quote michael@0: '$(subst ','\'',$(1))' michael@0: endef michael@0: michael@0: echo-variable-%: michael@0: @echo $(call shell_quote,$($*)) michael@0: michael@0: echo-tiers: michael@0: @echo $(TIERS) michael@0: michael@0: echo-tier-dirs: michael@0: @$(foreach tier,$(TIERS),echo '$(tier):'; echo ' dirs: $(tier_$(tier)_dirs)'; $(if $(tier_$(tier)_staticdirs),echo ' staticdirs: $(tier_$(tier)_staticdirs)';) ) michael@0: michael@0: echo-dirs: michael@0: @echo $(call shell_quote,$(DIRS)) michael@0: michael@0: define print_var michael@0: @printf '%20s = %s\n' $1 $(call shell_quote,$($1)) michael@0: michael@0: endef michael@0: michael@0: define print_vars michael@0: $(foreach var,$1,$(call print_var,$(var))) michael@0: endef michael@0: michael@0: showtargs: michael@0: ifneq (,$(filter $(PROGRAM) $(HOST_PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS))) michael@0: @echo -------------------------------------------------------------------------------- michael@0: $(call print_vars,\ michael@0: PROGRAM \ michael@0: SIMPLE_PROGRAMS \ michael@0: LIBRARY \ michael@0: SHARED_LIBRARY \ michael@0: SHARED_LIBRARY_LIBS \ michael@0: LIBS \ michael@0: DEF_FILE \ michael@0: IMPORT_LIBRARY \ michael@0: STATIC_LIBS \ michael@0: EXTRA_DSO_LDOPTS \ michael@0: DEPENDENT_LIBS \ michael@0: ) michael@0: @echo -------------------------------------------------------------------------------- michael@0: endif michael@0: $(LOOP_OVER_PARALLEL_DIRS) michael@0: $(LOOP_OVER_DIRS) michael@0: $(LOOP_OVER_TOOL_DIRS) michael@0: michael@0: showbuild: michael@0: $(call print_vars,\ michael@0: MOZ_BUILD_ROOT \ michael@0: MOZ_WIDGET_TOOLKIT \ michael@0: CC \ michael@0: CXX \ michael@0: CCC \ michael@0: CPP \ michael@0: LD \ michael@0: AR \ michael@0: IMPLIB \ michael@0: FILTER \ michael@0: MKSHLIB \ michael@0: MKCSHLIB \ michael@0: RC \ michael@0: MC \ michael@0: CFLAGS \ michael@0: OS_CFLAGS \ michael@0: COMPILE_CFLAGS \ michael@0: CXXFLAGS \ michael@0: OS_CXXFLAGS \ michael@0: COMPILE_CXXFLAGS \ michael@0: COMPILE_CMFLAGS \ michael@0: COMPILE_CMMFLAGS \ michael@0: LDFLAGS \ michael@0: OS_LDFLAGS \ michael@0: DSO_LDOPTS \ michael@0: OS_INCLUDES \ michael@0: OS_LIBS \ michael@0: EXTRA_LIBS \ michael@0: BIN_FLAGS \ michael@0: INCLUDES \ michael@0: DEFINES \ michael@0: ACDEFINES \ michael@0: BIN_SUFFIX \ michael@0: LIB_SUFFIX \ michael@0: DLL_SUFFIX \ michael@0: IMPORT_LIB_SUFFIX \ michael@0: INSTALL \ michael@0: VPATH \ michael@0: ) michael@0: michael@0: showhost: michael@0: $(call print_vars,\ michael@0: HOST_CC \ michael@0: HOST_CXX \ michael@0: HOST_CFLAGS \ michael@0: HOST_LDFLAGS \ michael@0: HOST_LIBS \ michael@0: HOST_EXTRA_LIBS \ michael@0: HOST_EXTRA_DEPS \ michael@0: HOST_PROGRAM \ michael@0: HOST_OBJS \ michael@0: HOST_PROGOBJS \ michael@0: HOST_LIBRARY \ michael@0: ) michael@0: michael@0: INCLUDED_DEBUGMAKE_MK = 1 michael@0: endif #}