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