(scheme-in-list): Add a fallback to create an error tag.
[cedet.git] / Makefile
blob105db46252d66374058994c057f3ea4cc2a1b0e5
1 # Toplevel Makefile
3 # (C) 2011, 2012 CEDET Developers
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; either version 2, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Emacs; see the file COPYING. If not, write to the
17 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 # Boston, MA 02110-1301, USA.
20 PROJECTS=lisp/cedet lisp/speedbar lisp/cedet/cogre lisp/cedet/semantic \
21 lisp/cedet/ede lisp/cedet/srecode lisp/cedet/semantic/bovine lisp/cedet/semantic/wisent \
22 lisp/cedet/semantic/analyze lisp/cedet/semantic/decorate lisp/cedet/semantic/ectags \
23 lisp/cedet/semantic/symref doc/texi doc/texi/semantic
25 PROJECTS_AUTOLOADS=lisp/cedet lisp/speedbar lisp/cedet/cogre lisp/cedet/semantic \
26 lisp/cedet/ede lisp/cedet/srecode
28 EMACS=emacs
29 EMACSFLAGS=-batch --no-site-file -l cedet-remove-builtin.el
30 LOADDEFS=loaddefs.el
31 BOOTSTRAP=(progn (global-ede-mode) (find-file "$(CURDIR)/lisp/Project.ede") (ede-proj-regenerate) (find-file "$(CURDIR)/doc/texi/Project.ede") (ede-proj-regenerate))
32 UTEST=(progn (add-to-list (quote load-path) "$(CURDIR)/tests") (require (quote cedet-utests)) (semantic-mode))
33 GETVERSION=(princ (format "%s %s %s" emacs-major-version emacs-minor-version (bound-and-true-p emacs-repository-version)))
34 RM=rm
35 FIND=find
36 INSTALL-INFO=install-info
37 INFO_FILES=$(shell $(FIND) $(CURDIR)/doc/texi -type f -name '*.info')
38 INFODIR=$(CURDIR)/doc/info
39 EMACS_VERSION=$(shell $(EMACS) -Q --batch --eval '$(GETVERSION)')
40 EMACS_MAJOR=$(firstword $(EMACS_VERSION))
41 EMACS_MINOR=$(word 2,$(EMACS_VERSION))
43 ifeq ($(EMACS_MAJOR),23)
44 $(error Aborting: CEDET needs Emacs 24.x)
45 endif
47 ifneq (,$(filter $(EMACS_MINOR),1 2))
48 FALLBACK_EIEIO=1
49 endif
51 $(info Emacs version: $(EMACS_VERSION))
53 all: touch-makefiles clean-autoloads autoloads compile info install-info
55 ebuild:
56 $(EMACS) -Q --batch -l cedet-build.el -f cedet-build
58 compile:
59 ifdef FALLBACK_EIEIO
60 $(MAKE) -C etc/fallback-libraries/eieio -f Makefile.eieio
61 endif
62 $(MAKE) -C lisp
64 makefiles: $(addsuffix /Makefile,$(PROJECTS))
65 $(addsuffix /Makefile,$(PROJECTS)): $(addsuffix /Project.ede,$(PROJECTS))
66 @echo "Creating Makefiles using EDE."
67 @$(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)'
69 makefiles-bootstrap:
70 @echo "Creating Makefiles using EDE and builtin Emacs-CEDET as fallback."
71 @$(EMACS) -batch --no-site-file --eval '(setq cedet-bootstrap-in-progress t ede-project-directories t)' -l cedet-devel-load.el --eval '$(BOOTSTRAP)'
73 touch-makefiles:
74 @echo Updating timestamps on all Makefiles.
75 $(FIND) lisp -name "Makefile" -exec touch '{}' \;
77 autoloads:
78 @echo "Generating autoloads."
79 @$(foreach proj,$(PROJECTS_AUTOLOADS),cd $(CURDIR)/$(proj) && $(MAKE) autoloads;)
81 info:
82 $(MAKE) -C doc -C texi
84 install-info:
85 @echo Installing info files under $(INFODIR)
86 @mkdir -p $(INFODIR)
87 @$(foreach infofile,$(INFO_FILES),cp $(infofile) $(INFODIR);$(INSTALL-INFO) --info-dir=$(INFODIR) $(infofile);)
89 clean-autoloads:
90 @echo Removing loaddefs.el files from subprojects.
91 @$(foreach proj,$(PROJECTS_AUTOLOADS),cd $(CURDIR)/$(proj) && if [ -f $(LOADDEFS) ];then $(RM) -f $(LOADDEFS);fi;)
93 clean-all: clean-autoloads
94 @echo Calling \"$(MAKE) clean\" in all projects.
95 @$(foreach proj,$(PROJECTS),echo " > $(proj)";cd $(CURDIR)/$(proj) && $(MAKE) clean;)
96 ifdef FALLBACK_EIEIO
97 $(MAKE) -C etc/fallback-libraries/eieio -f Makefile.eieio clean
98 endif
101 utest:
102 $(EMACS) -Q -l cedet-devel-load.el --eval '$(UTEST)' -f cedet-utest
104 utest-batch:
105 $(EMACS) $(EMACSFLAGS) -l cedet-devel-load.el --eval '$(UTEST)' -f cedet-utest-batch
107 itest: itest-make itest-automake itest-cpproot itest-javaroot
109 itest-make:
110 cd $(CURDIR)/tests;./cit-test.sh Make
112 itest-automake:
113 cd $(CURDIR)/tests;./cit-test.sh Automake
115 itest-cpproot:
116 cd $(CURDIR)/tests;./cit-test.sh cpproot
118 itest-javaroot:
119 cd $(CURDIR)/tests;./cit-test.sh javaroot
121 itest-android:
122 cd $(CURDIR)/tests;./cit-test.sh Android
124 itest-arduino:
125 cd $(CURDIR)/tests;./cit-test.sh Arduino
127 itest-globalref:
128 cd $(CURDIR)/tests;./cit-test.sh globalref
130 itest-batch: itest-make-batch itest-automake-batch itest-cpproot-batch itest-javaroot-batch itest-android-batch itest-arduino-batch # itest-globalref-batch itest-stl-batch
132 itest-make-batch:
133 cd $(CURDIR)/tests;./cit-test.sh Make --batch
135 itest-automake-batch:
136 cd $(CURDIR)/tests;./cit-test.sh Automake --batch
138 itest-cpproot-batch:
139 cd $(CURDIR)/tests;./cit-test.sh cpproot --batch
141 itest-javaroot-batch:
142 cd $(CURDIR)/tests;./cit-test.sh javaroot --batch
144 itest-android-batch:
145 cd $(CURDIR)/tests;./cit-test.sh Android --batch
147 itest-arduino-batch:
148 cd $(CURDIR)/tests;./cit-test.sh Arduino --batch
150 itest-globalref-batch:
151 cd $(CURDIR)/tests;./cit-test.sh globalref --batch
153 itest-stl-batch:
154 $(EMACS) $(EMACSFLAGS) -l cedet-devel-load.el -l $(CURDIR)/tests/cedet/semantic/stltest.el