File: Makefile

package info (click to toggle)
cedet 1%3A1.0pre3-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,316 kB
  • ctags: 4,369
  • sloc: lisp: 59,675; cpp: 476; sh: 346; makefile: 154; ansic: 143; java: 15
file content (138 lines) | stat: -rw-r--r-- 3,590 bytes parent folder | download
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
## Makefile --- Definition file for building CEDET
##
## Copyright (C) 2003, 2004, 2005 by David Ponce
##
## Author: David Ponce <david@dponce.com>
## Maintainer: CEDET developers <http://sf.net/projects/cedet>
## Created: 12 Sep 2003
## X-RCS: $Id: Makefile,v 1.12 2005/05/06 00:51:00 zappo Exp $
##
## 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., 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.

######## You can customize this part of the Makefile ########

## The directory where CEDET is installed
CEDET_HOME="$(CURDIR)"

## The CEDET's packages installed
CEDET_PACKAGES=\
common \
ede \
speedbar \
eieio \
semantic \
cogre \
contrib

## Path to your Emacs
EMACS=emacs

## Your shell (On Windows/Cygwin I recommend to use bash)
#SHELL=bash

## Path to your find and rm commands
FIND=find
#RM = rm -f

############### Internal part of the Makefile ###############
CEDET_VERSION=$(shell grep "defconst cedet-version" common/cedet.el | cut -d " " -f 3)

CEDET_FILES=Makefile INSTALL cedet-update-version.el PRERELEASE_CHECKLIST
DIST_ROOT=cedet-$(CEDET_VERSION)
DIST_DIR=$(CEDET_HOME)/$(DIST_ROOT)
DIST_FILE=$(DIST_DIR).tar.gz

__BUILD_AUTOLOADS=$(patsubst %,%-autoloads,$(CEDET_PACKAGES))
__CLEAN_AUTOLOADS=$(patsubst %,clean-%,$(__BUILD_AUTOLOADS))
__DOMAKE=$(MAKE) $(MFLAGS) EMACS="$(EMACS)" SHELL="$(SHELL)"

## Build
##

all: clean-autoloads packages

bootstrap: clean-all packages

packages: $(CEDET_PACKAGES)

.PHONY: $(CEDET_PACKAGES)
$(CEDET_PACKAGES):
	cd $(CEDET_HOME)/$@ && $(__DOMAKE)

## Update
##

autoloads: $(__BUILD_AUTOLOADS)

.PHONY: $(__BUILD_AUTOLOADS)
$(__BUILD_AUTOLOADS):
	cd $(CEDET_HOME)/$(firstword $(subst -, ,$@)) && \
	$(__DOMAKE) autoloads

recompile: autoloads
	cd $(CEDET_HOME) && \
	"$(EMACS)" -batch -q --no-site-file -l common/cedet.el \
	-f batch-byte-recompile-directory $(CEDET_PACKAGES)

## Cleanup
##

clean-autoloads: $(__CLEAN_AUTOLOADS)

.PHONY: $(__CLEAN_AUTOLOADS)
$(__CLEAN_AUTOLOADS):
	$(FIND) $(CEDET_HOME)/$(word 2,$(subst -, ,$@)) -type f \
	-name "*-loaddefs.el" \
	-print -exec $(RM) {} \;

.PHONY: clean-grammars
clean-grammars:
	$(FIND) $(CEDET_HOME) -type f -name "*-[bw]y.el" \
	! -name "semantic-grammar-wy.el" \
	-print -exec $(RM) {} \;

.PHONY: clean-info
clean-info:
	$(FIND) $(CEDET_HOME) -type f -name "*.info*" \
	-print -exec $(RM) {} \;

.PHONY: clean-elc
clean-elc:
	$(FIND) $(CEDET_HOME) -type f -name "*.elc" \
	-print -exec $(RM) {} \;

.PHONY: clean
clean:
	$(FIND) $(CEDET_HOME) -type f \( -name "*-script" -o -name "*~" \) \
	-print -exec $(RM) {} \;

clean-all: clean clean-elc clean-info clean-grammars clean-autoloads

## Build a distribution file.
dist: # $(CEDET_PACKAGES)
	rm -rf $(DIST_DIR)
	mkdir $(DIST_DIR)
	cp $(CEDET_FILES) $(DIST_DIR)
	for package in ${CEDET_PACKAGES}; do \
	   make -C $$package $(MFLAGS) DISTDIR=$(DIST_DIR)/$$package dist; \
	done;
	tar -cvzf $(DIST_FILE) $(DIST_ROOT)
	rm -rf $(DIST_DIR)

testvar:
	@echo "$(TESTVAR)=$($(TESTVAR))"

# Makefile ends here