SCM

SCM Repository

[xemacs] Annotation of /XEmacs/packages/XEmacs.rules
ViewVC logotype

Annotation of /XEmacs/packages/XEmacs.rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (view) (download)

1 : steve 1.1 # Configuration constants for building XEmacs packages
2 :     # Copyright (C) 1997 Free Software Foundation Inc.
3 :    
4 :     # This file is part of XEmacs.
5 :    
6 :     # XEmacs is free software; you can redistribute it and/or modify it
7 :     # under the terms of the GNU General Public License as published by the
8 :     # Free Software Foundation; either version 2, or (at your option) any
9 :     # later version.
10 :    
11 :     # XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 :     # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 :     # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 :     # for more details.
15 :    
16 :     # You should have received a copy of the GNU General Public License
17 :     # along with XEmacs; see the file COPYING. If not, write to
18 :     # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 :     # Boston, MA 02111-1307, USA.
20 :    
21 : andreasj 1.17 # Requires XEmacs 21.0-beta19 or greater and GNU Make 3.78 or greater.
22 : steve 1.1
23 : andreasj 1.17 XEMACS_PACKAGES_BASE := $(shell while [ ! -f XEmacs.rules ]; do \
24 :     cd ..; \
25 :     done; \
26 :     pwd)
27 : steve 1.1
28 : andreasj 1.17 # Make this the first target
29 :     bytecompile:: all
30 : steve 1.1
31 : andreasj 1.17 include ${XEMACS_PACKAGES_BASE}/Local.rules.mk
32 :     -include ${XEMACS_PACKAGES_BASE}/Local.rules
33 : steveb 1.7
34 : steveb 1.14 # Ensure vanilla locale when building
35 : andreasj 1.17 override LANG := C
36 : steve 1.4
37 : steveb 1.11 # Only in rare cases will you need to override this
38 : andreasj 1.17 ifeq ($(AUTOLOAD_PATH),)
39 : steveb 1.11 AUTOLOAD_PATH = .
40 :     endif
41 :    
42 : steveb 1.9 # Override or add to this in the package Makefile if necessary
43 : steveb 1.11 GENERATED = $(AUTOLOAD_PATH)/auto-autoloads.elc
44 : steveb 1.9
45 :     # SOURCE_FILES_TO_COPY = *.el*
46 : steveb 1.11 SOURCE_FILES_TO_COPY = $(ELCS) $(ELCS:.elc=.el) \
47 :     $(MULE_ELCS) $(MULE_ELCS:.elc=.el) \
48 : steveb 1.12 $(GENERATED) $(GENERATED:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el
49 : steveb 1.8
50 : steve 1.1 # Non configurable portion follows
51 :    
52 : steveb 1.9 MANIFEST = pkginfo/MANIFEST.$(PACKAGE)
53 : andreasj 1.17 # This might be a sublevel PWD; that is intentional. Use
54 :     # ${XEMACS_PACKAGES_BASE} for the toplevel directory.
55 :     PWD := $(shell pwd)
56 : steveb 1.9
57 : steve 1.1 .SUFFIXES:
58 :     .SUFFIXES: .info .texi .dvi .elc .el
59 :    
60 :     %.info: %.texi
61 :     $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<
62 :    
63 :     %.elc: %.el
64 : andreasj 1.17 $(XEMACS) -no-autoloads -batch $(PRELOADS) -l $(XEMACS_PACKAGES_BASE)/package-compile.el -- $(REQUIRES) -- $<
65 :    
66 : steve 1.1
67 : steveb 1.12 all:: $(AUTOLOAD_PATH)/_pkg.el
68 : steveb 1.13
69 : steve 1.1 dist:: srckit binkit package-info
70 :    
71 :     clean::
72 : steveb 1.11 rm -f $(ELCS) $(PACKAGE).info* $(AUTOLOAD_PATH)/auto-autoloads.elc \
73 :     $(AUTOLOAD_PATH)/custom-load.elc
74 : steve 1.1
75 :     mostlyclean: clean
76 :    
77 :     extraclean: clean
78 :    
79 :     distclean: extraclean
80 : steveb 1.11 rm -f core *~ $(AUTOLOAD_PATH)/auto-autoloads.el \
81 : steveb 1.12 $(AUTOLOAD_PATH)/custom-load.el package-info \
82 :     $(AUTOLOAD_PATH)/_pkg.el
83 : steve 1.1
84 : steveb 1.11 $(AUTOLOAD_PATH)/auto-autoloads.el : $(ELCS:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el
85 : steve 1.1 $(XEMACS) $(VANILLA) -batch \
86 :     -eval "(setq autoload-package-name \"$(PACKAGE)\")" \
87 : steveb 1.11 -l autoload -f batch-update-directory $(AUTOLOAD_PATH)
88 :     @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
89 : steve 1.1
90 : steveb 1.11 $(AUTOLOAD_PATH)/custom-load.el : $(ELCS:.elc=.el)
91 : steve 1.1 $(XEMACS) $(VANILLA) -batch -l cus-dep \
92 : steveb 1.11 -f Custom-make-dependencies $(AUTOLOAD_PATH)
93 : steve 1.1
94 : andreasj 1.17 pkg_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar
95 :    
96 :     # Make the $(pkg_tar).gz first, then the $(pkg_tar).bz2
97 : steveb 1.12 package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \
98 : andreasj 1.17 $(pkg_tar).gz $(pkg_tar).bz2
99 :    
100 : steve 1.1 $(XEMACS) $(VANILLA) -batch \
101 :     -l package-info.el -f batch-update-package-info \
102 : andreasj 1.17 '$(VERSION)' $(pkg_tar).gz \
103 : steve 1.4 '$(REQUIRES)' \
104 :     '$(AUTHOR_VERSION)' '$(MAINTAINER)' '$(CATEGORY)'
105 : andreasj 1.17
106 : steveb 1.11 $(XEMACS) $(VANILLA) -batch \
107 :     -l ../../hack-package-index.el -f batch-hack-package-index \
108 :     $(PACKAGE) package-info $(STAGING)/package-index
109 :    
110 : andreasj 1.17 ifeq ($(BUILD_TARS),t)
111 :     $(pkg_tar): $(STAGING)/$(MANIFEST)
112 :     @(cd $(STAGING); \
113 :     rm -f $(pkg_tar)*)
114 :    
115 :     (cd $(STAGING); \
116 :     $(TAR) $(EXCLUDES) -cf $(pkg_tar) \
117 :     `cat $(MANIFEST)`)
118 :    
119 :    
120 :     $(pkg_tar).gz: $(pkg_tar)
121 :     ifneq ($(BZIP2),) # need to leave behind the .tar for bzip2 to find.
122 :     (cd $(STAGING); \
123 :     gzip -cv9 $(pkg_tar) > $(pkg_tar).gz;)
124 :     else # BZIP2 is ''
125 :     (cd $(STAGING); \
126 :     gzip -v9 $(pkg_tar);)
127 :     endif
128 :    
129 :     ifneq ($(BZIP2),)
130 :     $(pkg_tar).bz2: $(pkg_tar)
131 :     (cd $(STAGING); \
132 :     $(BZIP2) -v9 $(pkg_tar);)
133 :     else # Don't build a .tar.bz2
134 :     $(pkg_tar).bz2:
135 :    
136 :     .PHONY: $(pkg_tar).bz2
137 :     endif # BZIP2 ?
138 :    
139 :     else # when BUILD_TARS is ''
140 :     # Touch the file so the package-index can be generated
141 :     $(pkg_tar) $(pkg_tar).gz $(pkg_tar).bz2 :
142 :     touch $@
143 :     endif # BUILD_TARS ?
144 :    
145 : steve 1.1
146 : steveb 1.12 $(AUTOLOAD_PATH)/_pkg.el: Makefile
147 :     @echo Creating $(AUTOLOAD_PATH)/_pkg.el
148 :     @echo ";;;###autoload" > $(AUTOLOAD_PATH)/_pkg.el
149 :     @echo "(package-provide '$(PACKAGE)" >> $(AUTOLOAD_PATH)/_pkg.el
150 :     @echo " :version $(VERSION)" >> $(AUTOLOAD_PATH)/_pkg.el
151 :     @echo " :type '$(PKG_TYPE))" >> $(AUTOLOAD_PATH)/_pkg.el
152 : steve 1.1
153 :     .PHONY: srckit-std
154 :     .PHONY: binkit-sourceonly binkit-sourceinfo binkit-sourcedata binkit-sourcedatainfo
155 : steveb 1.12 .PHONY: bindist install autoloads
156 : steve 1.3
157 :     bindist: binkit package-info
158 : steve 1.1
159 : steveb 1.11 install: binkit
160 :    
161 :     autoloads: $(AUTOLOAD_PATH)/auto-autoloads.el
162 :    
163 : andreasj 1.17 src_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-src.tar
164 :    
165 : steve 1.1 srckit-std: distclean
166 :     if [ ! -d $(STAGING) ]; then mkdir -p $(STAGING); fi
167 : andreasj 1.17
168 :     (cd ../..; \
169 :     rm -f $(src_tar)*; \
170 :     $(TAR) $(EXCLUDES) -cf $(src_tar) $(CATEGORY)/$(PACKAGE))
171 :    
172 :     gzip -cv9 $(src_tar) > $(src_tar).gz
173 :    
174 :     ifneq ($(BZIP2),)
175 :     $(BZIP2) -v9 $(src_tar);
176 :     endif
177 :     rm -f $(src_tar)
178 :    
179 : steve 1.1
180 : steveb 1.11 binkit-common: all
181 : andreasj 1.17 (if test -d $(STAGING); then \
182 :     cd $(STAGING); \
183 :     if test -f $(MANIFEST); then \
184 : steveb 1.11 rm -rf `cat $(MANIFEST)`; \
185 : andreasj 1.17 fi; \
186 : steveb 1.11 fi;)
187 : andreasj 1.17 #ifneq ($(ELCS),)
188 : steveb 1.11 @-mkdir -p $(STAGING)/lisp/$(PACKAGE)
189 : steveb 1.15 #endif
190 : andreasj 1.17 ifneq ($(ELCS_1),)
191 : steveb 1.11 @-mkdir -p $(STAGING)/lisp/$(ELCS_1_DEST)
192 :     endif
193 : andreasj 1.17 ifneq ($(INFO_FILES),)
194 : steveb 1.11 @-mkdir -p $(STAGING)/info
195 :     @-mkdir -p $(STAGING)/man/$(PACKAGE)
196 :     endif
197 : andreasj 1.17 ifneq ($(DATA_FILES),)
198 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_DEST)
199 :     endif
200 : andreasj 1.17 ifneq ($(DATA_1_FILES),)
201 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_1_DEST)
202 :     endif
203 : andreasj 1.17 ifneq ($(DATA_2_FILES),)
204 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_2_DEST)
205 :     endif
206 : andreasj 1.17 ifneq ($(DATA_3_FILES),)
207 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_3_DEST)
208 :     endif
209 : andreasj 1.17 ifneq ($(DATA_4_FILES),)
210 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_4_DEST)
211 :     endif
212 : andreasj 1.17 ifneq ($(DATA_5_FILES),)
213 : steveb 1.11 @-mkdir -p $(STAGING)/etc/$(DATA_5_DEST)
214 :     endif
215 : andreasj 1.17 ifneq ($(DATA_6_FILES),)
216 : steveb 1.16 @-mkdir -p $(STAGING)/etc/$(DATA_6_DEST)
217 :     endif
218 : andreasj 1.17 ifneq ($(DATA_7_FILES),)
219 : steveb 1.16 @-mkdir -p $(STAGING)/etc/$(DATA_7_DEST)
220 :     endif
221 : andreasj 1.17 ifneq ($(DATA_8_FILES),)
222 : steveb 1.16 @-mkdir -p $(STAGING)/etc/$(DATA_8_DEST)
223 :     endif
224 : andreasj 1.17 ifneq ($(LIBSRC_FILES),)
225 : steveb 1.11 @-mkdir -p $(STAGING)/lib-src
226 :     endif
227 :     @-mkdir -p $(STAGING)/pkginfo
228 : andreasj 1.17 ifneq ($(ELCS),)
229 :     $(RCOPY) $(addprefix $(PWD)/, ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES)) \
230 :     $(STAGING)/lisp/$(PACKAGE)
231 :     endif
232 :     ifneq ($(ELCS_1),)
233 :     $(RCOPY) $(addprefix $(PWD)/, $(ELCS_1_FILES)) $(STAGING)/lisp/$(ELCS_1_DEST)
234 : steveb 1.11 endif
235 : andreasj 1.17 ifneq ($(INFO_FILES),)
236 :     $(RCOPY) $(addprefix $(PWD)/, $(INFO_FILES)) $(STAGING)/info
237 :     $(RCOPY) $(addprefix $(PWD)/, $(TEXI_FILES)) $(STAGING)/man/$(PACKAGE)
238 : steveb 1.11 endif
239 : andreasj 1.17 ifneq ($(DATA_FILES),)
240 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_FILES)) $(STAGING)/etc/$(DATA_DEST)
241 : steveb 1.11 endif
242 : andreasj 1.17 ifneq ($(DATA_1_FILES),)
243 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_1_FILES)) $(STAGING)/etc/$(DATA_1_DEST)
244 : steveb 1.11 endif
245 : andreasj 1.17 ifneq ($(DATA_2_FILES),)
246 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_2_FILES)) $(STAGING)/etc/$(DATA_2_DEST)
247 : steveb 1.11 endif
248 : andreasj 1.17 ifneq ($(DATA_3_FILES),)
249 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_3_FILES)) $(STAGING)/etc/$(DATA_3_DEST)
250 : steveb 1.11 endif
251 : andreasj 1.17 ifneq ($(DATA_4_FILES),)
252 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_4_FILES)) $(STAGING)/etc/$(DATA_4_DEST)
253 : steveb 1.11 endif
254 : andreasj 1.17 ifneq ($(DATA_5_FILES),)
255 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_5_FILES)) $(STAGING)/etc/$(DATA_5_DEST)
256 : steveb 1.11 endif
257 : andreasj 1.17 ifneq ($(DATA_6_FILES),)
258 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_6_FILES)) $(STAGING)/etc/$(DATA_6_DEST)
259 : steveb 1.16 endif
260 : andreasj 1.17 ifneq ($(DATA_7_FILES),)
261 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_7_FILES)) $(STAGING)/etc/$(DATA_7_DEST)
262 : steveb 1.16 endif
263 : andreasj 1.17 ifneq ($(DATA_8_FILES),)
264 :     $(RCOPY) $(addprefix $(PWD)/, $(DATA_8_FILES)) $(STAGING)/etc/$(DATA_8_DEST)
265 : steveb 1.16 endif
266 : andreasj 1.17 ifneq ($(LIBSRC_FILES),)
267 :     $(RCOPY) $(addprefix $(PWD)/, $(LIBSRC_FILES)) $(STAGING)/lib-src
268 : steveb 1.11 endif
269 : steve 1.1 (cd $(STAGING); \
270 : steveb 1.11 ls -1 $(MANIFEST) > $(MANIFEST))
271 : andreasj 1.18 ifneq ($(ELCS),)
272 : steveb 1.11 @(cd $(STAGING); \
273 :     ls -1 lisp/$(PACKAGE)/ChangeLog \
274 :     $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(SOURCE_FILES_TO_COPY))) \
275 :     $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(EXTRA_SOURCES))) \
276 :     >> $(MANIFEST))
277 : andreasj 1.18 endif
278 : andreasj 1.17 ifneq ($(ELCS_1),)
279 : steveb 1.11 @(cd $(STAGING); \
280 :     ls -1 $(patsubst %, lisp/$(ELCS_1_DEST)/%, $(notdir $(ELCS_1_FILES))) \
281 :     >> $(MANIFEST))
282 :     endif
283 : andreasj 1.17 ifneq ($(INFO_FILES),)
284 : steveb 1.11 @(cd $(STAGING); \
285 :     ls -1 man/$(PACKAGE)/* \
286 :     $(patsubst %,info/%, $(notdir $(INFO_FILES))) >> $(MANIFEST))
287 :     endif
288 : andreasj 1.17 ifneq ($(DATA_FILES),)
289 : steveb 1.11 @(cd $(STAGING); \
290 :     ls -1 $(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
291 :     >> $(MANIFEST))
292 :     endif
293 : andreasj 1.17 ifneq ($(DATA_1_FILES),)
294 : steveb 1.11 @(cd $(STAGING); \
295 :     ls -1 $(patsubst %, etc/$(DATA_1_DEST)/%, $(notdir $(DATA_1_FILES))) \
296 :     >> $(MANIFEST))
297 :     endif
298 : andreasj 1.17 ifneq ($(DATA_2_FILES),)
299 : steveb 1.11 @(cd $(STAGING); \
300 :     ls -1 $(patsubst %, etc/$(DATA_2_DEST)/%, $(notdir $(DATA_2_FILES))) \
301 :     >> $(MANIFEST))
302 :     endif
303 : andreasj 1.17 ifneq ($(DATA_3_FILES),)
304 : steveb 1.11 @(cd $(STAGING); \
305 :     ls -1 $(patsubst %, etc/$(DATA_3_DEST)/%, $(notdir $(DATA_3_FILES))) \
306 :     >> $(MANIFEST))
307 :     endif
308 : andreasj 1.17 ifneq ($(DATA_4_FILES),)
309 : steveb 1.11 @(cd $(STAGING); \
310 :     ls -1 $(patsubst %, etc/$(DATA_4_DEST)/%, $(notdir $(DATA_4_FILES))) \
311 :     >> $(MANIFEST))
312 :     endif
313 : andreasj 1.17 ifneq ($(DATA_5_FILES),)
314 : steveb 1.11 @(cd $(STAGING); \
315 :     ls -1 $(patsubst %, etc/$(DATA_5_DEST)/%, $(notdir $(DATA_5_FILES))) \
316 : steveb 1.16 >> $(MANIFEST))
317 :     endif
318 : andreasj 1.17 ifneq ($(DATA_6_FILES),)
319 : steveb 1.16 @(cd $(STAGING); \
320 :     ls -1 $(patsubst %, etc/$(DATA_6_DEST)/%, $(notdir $(DATA_6_FILES))) \
321 :     >> $(MANIFEST))
322 :     endif
323 : andreasj 1.17 ifneq ($(DATA_7_FILES),)
324 : steveb 1.16 @(cd $(STAGING); \
325 :     ls -1 $(patsubst %, etc/$(DATA_7_DEST)/%, $(notdir $(DATA_7_FILES))) \
326 :     >> $(MANIFEST))
327 :     endif
328 : andreasj 1.17 ifneq ($(DATA_8_FILES),)
329 : steveb 1.16 @(cd $(STAGING); \
330 :     ls -1 $(patsubst %, etc/$(DATA_8_DEST)/%, $(notdir $(DATA_8_FILES))) \
331 : steveb 1.11 >> $(MANIFEST))
332 :     endif
333 : andreasj 1.17
334 :     ifneq ($(LIBSRC_FILES),)
335 : steveb 1.11 @(cd $(STAGING); \
336 :     ls -1 $(patsubst %,lib-src/%, $(notdir $(LIBSRC_FILES))) >> $(MANIFEST))
337 :     endif
338 :    
339 : andreasj 1.17
340 : steveb 1.11 binkit-sourceonly: binkit-common
341 :    
342 :     binkit-sourceinfo: binkit-common
343 :    
344 :     binkit-sourcedata: binkit-common
345 :    
346 :     binkit-sourcedatainfo: binkit-common
347 : andreasj 1.17
348 :     # Local Variables:
349 :     # mode: makefile
350 :     # End:

root@alioth.debian.org
ViewVC Help
Powered by ViewVC 1.0.0  
Powered By FusionForge
Show source