Bug 616542 - Shorten file path length of mochitest; r=ted
[gecko.git] / toolkit / components / ctypes / tests / Makefile.in
blobe28cc2feb117cbf9b1a335295634bfd4594c3993
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is js-ctypes.
16 # The Initial Developer of the Original Code is
17 # The Mozilla Foundation <http://www.mozilla.org/>.
18 # Portions created by the Initial Developer are Copyright (C) 2009
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
23 # Dan Witte <dwitte@mozilla.com>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../../../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
43 relativesrcdir = toolkit/components/ctypes/tests
45 include $(DEPTH)/config/autoconf.mk
47 MODULE = jsctypes-test
48 LIBRARY_NAME = jsctypes-test
49 SHORT_LIBNAME = jscttest
50 FORCE_SHARED_LIB = 1
51 NO_DIST_INSTALL = 1
53 CPPSRCS = jsctypes-test.cpp
55 LOCAL_INCLUDES = \
56 -I$(topsrcdir)/js/src/ctypes \
57 $(NULL)
59 EXTRA_DSO_LDOPTS += \
60 $(XPCOM_STANDALONE_GLUE_LDOPTS) \
61 $(MOZALLOC_LIB) \
62 $(NSPR_LIBS) \
63 $(NULL)
65 XPCSHELL_TESTS = unit
67 _CHROME_TEST_FILES = \
68 xpcshellTestHarnessAdaptor.js \
69 ctypes_worker.js \
70 test_ctypes.xul \
71 $(NULL)
73 include $(topsrcdir)/config/rules.mk
75 xpctestdir = $(testxpcobjdir)/$(relativesrcdir)/unit
77 chrometestdir = \
78 $(DEPTH)/$(mochitestdir)/chrome/toolkit/components/$(relativesrcdir)
80 # preprocess and install our unit test into the appropriate directory,
81 # and install the test library as well. the xpcshell test rules will
82 # install the .js.in from the tests srcdir, so remove it when we're done.
83 libs:: unit/test_jsctypes.js.in
84 $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
85 $^ > $(xpctestdir)/test_jsctypes.js
86 $(INSTALL) $(SHARED_LIBRARY) $(xpctestdir)
87 $(INSTALL) $(SHARED_LIBRARY) $(DEPTH)/$(mochitestdir)/chrome/libraries
88 $(INSTALL) $(xpctestdir)/test_jsctypes.js $(chrometestdir)
89 $(INSTALL) $(xpctestdir)/$(SHARED_LIBRARY) $(chrometestdir)
90 $(RM) $(xpctestdir)/test_jsctypes.js.in
92 libs:: $(_CHROME_TEST_FILES)
93 $(INSTALL) $(foreach f,$^,"$f") $(chrometestdir)
95 GARBAGE += \
96 $(xpctestdir)/test_jsctypes.js \
97 $(xpctestdir)/$(SHARED_LIBRARY) \
98 $(chrometestdir)/test_jsctypes.js \
99 $(chrometestdir)/$(SHARED_LIBRARY) \
100 $(NULL)