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
29 EMACSFLAGS
=-batch
--no-site-file
-l cedet-remove-builtin.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
)))
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
)
47 ifneq (,$(filter $(EMACS_MINOR
),1 2))
51 $(info Emacs version
: $(EMACS_VERSION
))
53 all: touch-makefiles clean-autoloads autoloads compile
info install-info
56 $(EMACS
) -Q
--batch
-l cedet-build.el
-f cedet-build
60 $(MAKE
) -C etc
/fallback-libraries
/eieio
-f Makefile.eieio
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)'
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)'
74 @echo Updating timestamps on
all Makefiles.
75 $(FIND
) lisp
-name
"Makefile" -exec touch
'{}' \
;
78 @echo
"Generating autoloads."
79 @
$(foreach proj
,$(PROJECTS_AUTOLOADS
),cd
$(CURDIR
)/$(proj
) && $(MAKE
) autoloads
;)
82 $(MAKE
) -C doc
-C texi
85 @echo Installing
info files under
$(INFODIR
)
87 @
$(foreach infofile
,$(INFO_FILES
),cp
$(infofile
) $(INFODIR
);$(INSTALL-INFO
) --info-dir
=$(INFODIR
) $(infofile
);)
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;)
97 $(MAKE
) -C etc
/fallback-libraries
/eieio
-f Makefile.eieio
clean
102 $(EMACS
) -Q
-l cedet-devel-load.el
--eval
'$(UTEST)' -f cedet-utest
105 $(EMACS
) $(EMACSFLAGS
) -l cedet-devel-load.el
--eval
'$(UTEST)' -f cedet-utest-batch
107 itest
: itest-make itest-automake itest-cpproot itest-javaroot
110 cd
$(CURDIR
)/tests
;.
/cit-test.sh Make
113 cd
$(CURDIR
)/tests
;.
/cit-test.sh Automake
116 cd
$(CURDIR
)/tests
;.
/cit-test.sh cpproot
119 cd
$(CURDIR
)/tests
;.
/cit-test.sh javaroot
122 cd
$(CURDIR
)/tests
;.
/cit-test.sh Android
125 cd
$(CURDIR
)/tests
;.
/cit-test.sh Arduino
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
133 cd
$(CURDIR
)/tests
;.
/cit-test.sh Make
--batch
135 itest-automake-batch
:
136 cd
$(CURDIR
)/tests
;.
/cit-test.sh Automake
--batch
139 cd
$(CURDIR
)/tests
;.
/cit-test.sh cpproot
--batch
141 itest-javaroot-batch
:
142 cd
$(CURDIR
)/tests
;.
/cit-test.sh javaroot
--batch
145 cd
$(CURDIR
)/tests
;.
/cit-test.sh Android
--batch
148 cd
$(CURDIR
)/tests
;.
/cit-test.sh Arduino
--batch
150 itest-globalref-batch
:
151 cd
$(CURDIR
)/tests
;.
/cit-test.sh globalref
--batch
154 $(EMACS
) $(EMACSFLAGS
) -l cedet-devel-load.el
-l
$(CURDIR
)/tests
/cedet
/semantic
/stltest.el