michael@0: # -*- makefile -*- 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: Standalone unit tests for makefile rules and target logic michael@0: ########################################################################### michael@0: michael@0: deps =$(NULL) michael@0: tgts =$(NULL) michael@0: michael@0: ifdef VERBOSE michael@0: tgts += show michael@0: endif michael@0: michael@0: # Define macros michael@0: include $(topsrcdir)/config/makefiles/makeutils.mk michael@0: include $(topsrcdir)/config/makefiles/autotargets.mk michael@0: michael@0: ########################## michael@0: ## Verify threadsafe mkdir michael@0: ########################## michael@0: ifdef deps_mkdir_bycall michael@0: deps += $(call mkdir_deps,deps_mkdir_bycall) michael@0: tgts += check_mkdir michael@0: endif michael@0: ifdef deps_mkdir_bydep michael@0: deps += $(foreach dir,$(deps_mkdir_bydep),$(dir)/.mkdir.done) michael@0: tgts += check_mkdir michael@0: endif michael@0: ifdef deps_mkdir_bygen michael@0: GENERATED_DIRS += $(deps_mkdir_bygen) michael@0: tgts += check_mkdir michael@0: endif michael@0: michael@0: ########################### michael@0: ## Minimal environment load michael@0: ########################### michael@0: MKDIR ?= mkdir -p michael@0: TOUCH ?= touch michael@0: michael@0: INCLUDED_CONFIG_MK = 1 michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: ##-------------------## michael@0: ##---] TARGETS [---## michael@0: ##-------------------## michael@0: all:: michael@0: michael@0: # Quarks: michael@0: # o Use of 'all' would trigger export target processing michael@0: checkup: $(tgts) michael@0: michael@0: # AUTO_DEPS - verify GENERATED_DIRS michael@0: check_mkdir: $(deps) $(AUTO_DEPS) michael@0: michael@0: show: michael@0: @echo "tgts=[$(tgts)]" michael@0: @echo "deps=[$(deps)]" michael@0: find $(dir $(deps)) -print