config/tests/makefiles/autodeps/testor.tmpl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 # -*- makefile -*-
     2 #
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
     5 # You can obtain one at http://mozilla.org/MPL/2.0/.
     6 #
     8 ###########################################################################
     9 ## Intent: Standalone unit tests for makefile rules and target logic
    10 ###########################################################################
    12 deps =$(NULL)
    13 tgts =$(NULL)
    15 ifdef VERBOSE
    16   tgts += show
    17 endif
    19 # Define macros
    20 include $(topsrcdir)/config/makefiles/makeutils.mk
    21 include $(topsrcdir)/config/makefiles/autotargets.mk
    23 ##########################
    24 ## Verify threadsafe mkdir
    25 ##########################
    26 ifdef deps_mkdir_bycall
    27   deps += $(call mkdir_deps,deps_mkdir_bycall)
    28   tgts += check_mkdir
    29 endif
    30 ifdef deps_mkdir_bydep
    31   deps += $(foreach dir,$(deps_mkdir_bydep),$(dir)/.mkdir.done)
    32   tgts += check_mkdir
    33 endif
    34 ifdef deps_mkdir_bygen
    35   GENERATED_DIRS += $(deps_mkdir_bygen)
    36   tgts += check_mkdir
    37 endif
    39 ###########################
    40 ## Minimal environment load
    41 ###########################
    42 MKDIR ?= mkdir -p
    43 TOUCH ?= touch
    45 INCLUDED_CONFIG_MK = 1
    46 include $(topsrcdir)/config/rules.mk
    48 ##-------------------##
    49 ##---]  TARGETS  [---##
    50 ##-------------------##
    51 all::
    53 # Quarks:
    54 #   o Use of 'all' would trigger export target processing
    55 checkup: $(tgts)
    57 # AUTO_DEPS - verify GENERATED_DIRS
    58 check_mkdir: $(deps) $(AUTO_DEPS)
    60 show:
    61 	@echo "tgts=[$(tgts)]"
    62 	@echo "deps=[$(deps)]"
    63 	find $(dir $(deps)) -print

mercurial