-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
103 lines (80 loc) · 3.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Toplevel Makefile
#
# (C) 2011, 2012 CEDET Developers
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
PROJECTS=lisp/cedet lisp/eieio lisp/speedbar lisp/cedet/cogre lisp/cedet/semantic \
lisp/cedet/ede lisp/cedet/srecode lisp/cedet/semantic/bovine lisp/cedet/semantic/wisent \
lisp/cedet/semantic/analyze lisp/cedet/semantic/decorate lisp/cedet/semantic/ectags \
lisp/cedet/semantic/symref doc/texi doc/texi/semantic
PROJECTS_AUTOLOADS=lisp/cedet lisp/eieio lisp/speedbar lisp/cedet/cogre lisp/cedet/semantic \
lisp/cedet/ede lisp/cedet/srecode
EMACS=emacs
EMACSFLAGS=-batch --no-site-file -l cedet-remove-builtin.el
LOADDEFS=loaddefs.el
BOOTSTRAP=(progn (global-ede-mode) (find-file "$(CURDIR)/lisp/Project.ede") (ede-proj-regenerate) (find-file "$(CURDIR)/doc/texi/Project.ede") (ede-proj-regenerate))
UTEST=(progn (add-to-list (quote load-path) "$(CURDIR)/tests") (add-to-list (quote load-path) "$(CURDIR)/tests/eieio") (require (quote cedet-utests)) (semantic-mode))
RM=rm
FIND=find
INSTALL-INFO=install-info
INFO_FILES=$(shell $(FIND) $(CURDIR)/doc/texi -type f -name '*.info')
INFODIR=$(CURDIR)/doc/info
all: clean-autoloads autoloads touch-makefiles compile info install-info
compile:
$(MAKE) -C lisp
makefiles: $(addsuffix /Makefile,$(PROJECTS))
$(addsuffix /Makefile,$(PROJECTS)): $(addsuffix /Project.ede,$(PROJECTS))
@echo "Creating Makefiles using EDE."
@$(EMACS) $(EMACSFLAGS) --eval '(setq cedet-bootstrap-in-progress t ede-project-directories t)' -f toggle-debug-on-error -l cedet-devel-load.el --eval '$(BOOTSTRAP)'
makefiles-bootstrap:
@echo "Creating Makefiles using EDE and builtin Emacs-CEDET as fallback."
@$(EMACS) -batch --no-site-file --eval '(setq cedet-bootstrap-in-progress t ede-project-directories t)' -l cedet-devel-load.el --eval '$(BOOTSTRAP)'
touch-makefiles:
@echo Updating timestamps on all Makefiles.
$(FIND) . -name "Makefile" -exec touch '{}' \;
autoloads:
@echo "Generating autoloads."
@$(foreach proj,$(PROJECTS_AUTOLOADS),cd $(CURDIR)/$(proj) && $(MAKE) autoloads;)
info:
$(MAKE) -C doc -C texi
install-info:
@echo Installing info files under $(INFODIR)
@mkdir -p $(INFODIR)
@$(foreach infofile,$(INFO_FILES),cp $(infofile) $(INFODIR);$(INSTALL-INFO) --info-dir=$(INFODIR) $(infofile);)
clean-autoloads:
@echo Removing loaddefs.el files from subprojects.
@$(foreach proj,$(PROJECTS_AUTOLOADS),cd $(CURDIR)/$(proj) && if [ -f $(LOADDEFS) ];then $(RM) -f $(LOADDEFS);fi;)
clean-all: clean-autoloads
@echo Calling \"$(MAKE) clean\" in all projects.
@$(foreach proj,$(PROJECTS),echo " > $(proj)";cd $(CURDIR)/$(proj) && $(MAKE) clean;)
utest:
$(EMACS) -Q -l cedet-devel-load.el --eval '$(UTEST)' -f cedet-utest
utest-batch:
$(EMACS) $(EMACSFLAGS) -l cedet-devel-load.el --eval '$(UTEST)' -f cedet-utest-batch
itest: itest-make itest-automake
itest-make:
cd $(CURDIR)/tests;./cit-test.sh Make
itest-automake:
cd $(CURDIR)/tests;./cit-test.sh Automake
itest-android:
cd $(CURDIR)/tests;./cit-test.sh Android
itest-batch: itest-make-batch itest-automake-batch
itest-make-batch:
cd $(CURDIR)/tests;./cit-test.sh Make --batch
itest-automake-batch:
cd $(CURDIR)/tests;./cit-test.sh Automake --batch
itest-android-batch:
cd $(CURDIR)/tests;./cit-test.sh Android --batch