~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/config/makefiles/test/check-autotargets.mk

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
7
ifdef VERBOSE
 
8
  $(warning loading test)
 
9
endif
 
10
 
 
11
space=$(null) $(null)
 
12
GENERATED_DIRS = bogus # test data
 
13
 
 
14
NOWARN_AUTOTARGETS = 1 # Unit test includes makefile twice.
 
15
 
 
16
undefine USE_AUTOTARGETS_MK
 
17
undefine INCLUDED_AUTOTARGETS_MK
 
18
include $(topsrcdir)/config/makefiles/autotargets.mk
 
19
 
 
20
ifndef INCLUDED_AUTOTARGETS_MK
 
21
  $(error autotargets.mk was not included
 
22
endif
 
23
 
 
24
$(call requiredfunction,mkdir_deps)
 
25
 
 
26
 
 
27
# Verify test data populated makefile vars correctly
 
28
vars = AUTO_DEPS GARBAGE_DIRS GENERATED_DIRS_DEPS 
 
29
$(foreach var,$(vars),$(call errorIfEmpty,$(var)))
 
30
 
 
31
# Data should also be valid
 
32
ifneq (bogus,$(findstring bogus,$(AUTO_DEPS)))
 
33
  $(error AUTO_DEPS=[$(AUTO_DEPS)] is not set correctly)
 
34
endif
 
35
 
 
36
 
 
37
# relpath
 
38
path  := foo/bar.c
 
39
exp   := foo/.mkdir.done
 
40
found := $(call mkdir_deps,$(dir $(path)))
 
41
ifneq ($(exp),$(found))
 
42
  $(error mkdir_deps($(path))=$(exp) not set correctly [$(found)])
 
43
endif
 
44
 
 
45
# abspath
 
46
path  := /foo//bar/
 
47
exp   := /foo/bar/.mkdir.done
 
48
found := $(call mkdir_deps,$(path))
 
49
ifneq ($(exp),$(found))
 
50
  $(error mkdir_deps($(path))=$(exp) not set correctly [$(found)])
 
51
endif
 
52
 
 
53
 
 
54
## verify strip_slash
 
55
#####################
 
56
 
 
57
path  := a/b//c///d////e/////
 
58
exp   := a/b/c/d/e/.mkdir.done
 
59
found := $(call mkdir_deps,$(path))
 
60
ifneq ($(exp),$(found))
 
61
  $(error mkdir_deps($(path))=$(exp) not set correctly [$(found)])
 
62
endif
 
63
 
 
64
 
 
65
## verify mkdir_stem()
 
66
######################
 
67
path  := verify/mkdir_stem
 
68
pathD = $(call mkdir_deps,$(path))
 
69
pathS = $(call mkdir_stem,$(pathD))
 
70
exp   := $(path)
 
71
 
 
72
ifeq ($(pathD),$(pathS))
 
73
  $(error mkdir_deps and mkdir_stem should not match [$(pathD)])
 
74
endif
 
75
ifneq ($(pathS),$(exp))
 
76
  $(error mkdir_stem=[$(pathS)] != exp=[$(exp)])
 
77
endif
 
78
 
 
79
 
 
80
## Verify embedded whitespace has been protected
 
81
path  := a/b$(space)c//d
 
82
exp   := a/b$(space)c/d
 
83
found := $(call slash_strip,$(path))
 
84
ifneq ($(exp),$(found))
 
85
  $(error slash_strip($(path))=$(exp) not set correctly [$(found)])
 
86
endif