Commit | Line | Data |
---|---|---|
a4100ebe CY |
1 | # test.make --- Semantic unit test for Make -*- makefile -*- |
2 | ||
ab422c4d | 3 | # Copyright (C) 2001-2002, 2010-2013 Free Software Foundation, Inc. |
a4100ebe CY |
4 | |
5 | # Author: Eric M. Ludlam <eric@siege-engine.com> | |
6 | ||
7 | # This file is part of GNU Emacs. | |
8 | ||
9 | # GNU Emacs is free software: you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation, either version 3 of the License, or | |
12 | # (at your option) any later version. | |
13 | ||
14 | # GNU Emacs is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | ||
19 | # You should have received a copy of the GNU General Public License | |
20 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |
74ea13c1 CY |
21 | |
22 | top= | |
23 | ede_FILES=Project.ede Makefile | |
24 | ||
25 | example_MISC=semantic-skel.el skeleton.bnf | |
26 | init_LISP=semantic-load.el | |
27 | DISTDIR=$(top)semantic-$(VERSION) | |
28 | ||
29 | # really goofy & variables tabs | |
30 | A= B | |
31 | A =B | |
32 | A=B C | |
33 | A=B\ | |
34 | C | |
35 | ||
36 | A= http://${B} \ | |
37 | ftp://${B} | |
38 | B= test | |
39 | ||
40 | all: example semantic Languages tools senator semantic.info | |
41 | ||
42 | test ${B}: foo bar | |
43 | @echo ${A} | |
44 | ||
45 | example: | |
46 | @ | |
47 | ||
48 | init: $(init_LISP) | |
49 | @echo "(add-to-list 'load-path nil)" > $@-compile-script | |
50 | @if test ! -z "${LOADPATH}" ; then\ | |
51 | for loadpath in ${LOADPATH}; do \ | |
52 | echo "(add-to-list 'load-path \"$$loadpath\")" >> $@-compile-script; \ | |
53 | done;\ | |
54 | fi | |
55 | @echo "(setq debug-on-error t)" >> $@-compile-script | |
56 | $(EMACS) -batch -l $@-compile-script -f batch-byte-compile $^ | |
57 | ||
58 | include tesset.mk tusset.mk | |
59 | include oneset.mk | |
60 | ||
61 | ifdef SOME_SYMBOL | |
62 | VAR1 = foo | |
63 | else | |
64 | VAR1 = bar | |
65 | endif | |
66 | ||
67 | ifndef SOME_OTHER_SYMBOL | |
68 | VAR1 = baz | |
69 | endif | |
70 | ||
71 | ifeq ($(VAR1), foo) | |
72 | VAR2 = gleep | |
73 | else | |
74 | ifneq ($(VAR1), foo) | |
75 | VAR2 = glop | |
76 | endif | |
77 | endif | |
78 | ||
79 | # End of Makefile |