Some repo admin -- .gitignore updates
[packages] / XEmacs.rules
1 # Common Makefile material for package Makefiles
2 # Copyright (C) 1997 Free Software Foundation Inc.
3 # Copyright (C) 2002, 2003, 2005 Ben Wing.
4
5 # This file is part of XEmacs.
6
7 # XEmacs is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 2, or (at your option) any
10 # later version.
11
12 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 # for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with XEmacs; see the file COPYING.  If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
21
22 # Requires XEmacs 21.0-beta19 or greater and GNU Make 3.78 or greater.
23
24 # Settings that a Makefile can specify (all settings need to be done
25 # BEFORE including XEmacs.rules; if you need something from Local.rules
26 # in order to determine the settings properly -- e.g. BUILD_WITHOUT_MULE --
27 # include Local.rules.inc at the top of your Makefile):
28 #
29 # At the top of every Makefile:
30 # -----------------------------
31 #
32 # VERSION = 1.10
33 # MAINTAINER = Joe Shmoe <joe@shmoe.org>, or
34 # MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
35 # PACKAGE = my-package
36 # PKG_TYPE = regular or single-file (each file is a separate package)
37 # REQUIRES = list of packages that must be available to compile the .elcs
38 # CATEGORY = standard, mule, or unsupported
39 #
40 # Optionally:
41 # -----------
42 #
43 # AUTHOR_VERSION = 1.4.9
44 # PACKAGE_SUPPRESS = calls to `package-suppress' to indicate packages that
45 #  should be available only in particular versions of XEmacs, e.g.:
46 #
47 # PACKAGE_SUPPRESS = \
48 #  (package-suppress 'xemacs-base \"regexp-opt\" '(emacs-version>= 21 5 11)) \
49 #  (package-suppress 'xemacs-base \"easy-mmode\" '(emacs-version>= 21 5 11))
50 #
51 #
52 # Lisp files:
53 # -----------
54 #
55 # ELCS = .elc files to compile
56 # ELCS_1 = more .elc files to compile, to be installed in a subdirectory of
57 #   lisp/
58 # ELCS_1_DEST = name of subdirectory to install them into; include
59 #   $(PACKAGE) in the name
60 # EARLY_GENERATED_LISP = additional .el files that will be generated before
61 #   any byte-compilation (use this for autoloads-type files); rules must be
62 #   given to build them.  XEmacs.rules will automatically add auto-autoloads,
63 #   custom-load, and custom-defines to this list, so don't include them.
64 # GENERATED_LISP = additional .el files that will be generated at
65 #   byte-compilation time; rules must be given to build them
66 # PRELOADS = additional command-line arguments needed when compiling .elcs
67 # AUTOLOAD_PATH = subdirectory in source tree where .elcs are located (this
68 #   is where auto-autoloads.el, etc. will be placed)
69 #
70 # Doc files (see below):
71 # ----------------------
72 #
73 # (1) The preferred way:
74 #
75 # EXPLICIT_DOCS, STANDARD_DOCS, EXTRA_TEXI_FILES, EXTRA_HTML_FILES,
76 #   DOCS_TEXINFO_EXTENSION, DOCS_TXI_EXTENSION
77 #
78 # (2) The hard way:
79 #
80 # TEXI_FILES, INFO_FILES, INFO_DEP, HTML_FILES, HTML_DEP
81 #
82 # Also: EXTRA_DOC_FILES
83 #
84 # Other files to build:
85 # ---------------------
86 #
87 # EXTRA_DEPENDENCIES = additional files to build; rules must be given to
88 #   build them
89 #
90 # Files to install, besides the .elcs, docs, ChangeLog and _pkg.el:
91 # -----------------------------------------------------------------
92 #
93 # EXTRA_SOURCES = files installed under lisp/$(PACKAGE)
94 # LIBSRC_FILES = files installed under lib-src/
95 # DATA_FILES, DATA_DEST = files installed under a subdirectory of etc/; include
96 #   $(PACKAGE) in the name
97 # DATA_1_FILES, DATA_1_DEST ... DATA_35_FILES, DATA_35_DEST = files to be
98 #   installed in other subdirectories of etc/
99
100 XEMACS_PACKAGES_BASE := $(shell while [ ! -f XEmacs.rules ]; do \
101                                     cd ..;      \
102                                 done;           \
103                                 pwd)
104
105 include ${XEMACS_PACKAGES_BASE}/Local.rules.inc
106
107 # Ensure vanilla locale when building
108 override LANG := C
109
110 # Only in rare cases will you need to override this
111 ifeq ($(AUTOLOAD_PATH),)
112 AUTOLOAD_PATH = .
113 endif
114
115 # Set this in the package Makefile if necessary (BEFORE including this file)
116 EARLY_GENERATED_LISP := $(AUTOLOAD_PATH)/auto-autoloads.el \
117         $(AUTOLOAD_PATH)/custom-load.el $(EARLY_GENERATED_LISP)
118 ifeq ($(or $(XEMACS_21_5),$(BUILD_WITH_SXEMACS)),t)
119 EARLY_GENERATED_LISP += $(AUTOLOAD_PATH)/custom-defines.el
120 endif
121
122 EARLY_GENERATED_ELCS = $(EARLY_GENERATED_LISP:.el=.elc)
123 GENERATED_ELCS = $(GENERATED_LISP:.el=.elc)
124
125 # SOURCE_FILES_TO_COPY = *.el*
126 SOURCE_FILES_TO_COPY = $(ELCS) $(ELCS:.elc=.el) \
127         $(MULE_ELCS) $(MULE_ELCS:.elc=.el) \
128         $(EARLY_GENERATED_ELCS) $(EARLY_GENERATED_LISP) \
129         $(GENERATED_ELCS) $(GENERATED_LISP) $(AUTOLOAD_PATH)/_pkg.el
130
131 # Non configurable portion follows
132
133 MANIFEST = pkginfo/MANIFEST.$(PACKAGE)
134 # This might be a sublevel PWD; that is intentional.  Use
135 # ${XEMACS_PACKAGES_BASE} for the toplevel directory.
136 PWD      := $(shell pwd)
137
138 .SUFFIXES:
139 .SUFFIXES: .html .info .txi .texi .texinfo .dvi .ps .pdf .elc .el
140
141 # STAGING is the top of the directory tree where a particular package's
142 # files are installed, or where tarballs are installed using `make bindist'.
143
144 # 'make bindist' needs STAGING to be set to NONMULE_INSTALLED_PACKAGES_ROOT
145 # if we are building a Mule package so we don't end up with 2 package-index
146 # files. 
147
148 ifeq ('$(MAKECMDGOALS)','bindist')
149 STAGING:= $(NONMULE_INSTALLED_PACKAGES_ROOT)
150 else
151  ifeq ('$(CATEGORY)','mule')
152 STAGING:= $(MULE_INSTALLED_PACKAGES_ROOT)
153  else
154 STAGING:= $(NONMULE_INSTALLED_PACKAGES_ROOT)
155  endif
156 endif
157
158 # We should strive to use XEMACS_BATCH_CLEAN as much as possible, so we have
159 # no possible contamination from outside packages.  We should rewrite the
160 # others to load the appropriate autoloads from our own built package tree.
161
162 ifeq ($(BUILD_WITHOUT_MULE),t)
163 LISP_DIRECTORIES= (list lisp-directory)
164 else
165 LISP_DIRECTORIES= (list (expand-file-name "mule" lisp-directory) lisp-directory)
166 endif
167 XEMACS_BATCH_CLEAN = $(XEMACS) -no-autoloads $(BATCH) -eval '(setq load-path $(LISP_DIRECTORIES))'
168 # The following works more or less the same and with less fuss, but only in
169 # 21.5 and above
170 # XEMACS_BATCH_CLEAN = $(XEMACS) -no-autoloads $(BATCH) -no-packages
171 XEMACS_BATCH_DIRTY = $(XEMACS) $(BATCH)
172 LOAD_AUTOLOADS= -eval '(packages-load-package-auto-autoloads load-path)'
173
174 #####################################
175 #            Handle docs            #
176 #####################################
177
178 # If something goes wrong and $(STAGING) is blank, the commands below will
179 # attempt to install files into absolute paths /lisp/* and /etc/* -- not
180 # a good idea at all.
181
182 check-staging:
183 ifeq ($(STAGING),)
184         $(error STAGING is not set; potential major filesystem trashing!  Fix this)
185 endif
186
187 check-mule:
188 ifeq ($(CATEGORY),mule)
189 ifneq ($(BUILD_WITHOUT_MULE),)
190         $(error This package needs Mule support in order to be compiled)
191 endif
192 endif
193
194 # Possibilities for building the docs:
195 #
196 # (1) EXPLICIT_DOCS = <texi files>
197 #     Build the specified .texi files.  Info and HTML files automatically
198 #     computed from the .texi files.
199 # (2) STANDARD_DOCS = t
200 #     Same as EXPLICIT_DOCS = $(PACKAGE).texi
201 # (3) Manual: Specify TEXI_FILES, INFO_FILES, INFO_DEP, HTML_FILES, and
202 #     HTML_DEP by yourself.  Do not explicitly add any doc targets to
203 #     compile::.
204 #
205 # When EXPLICIT_DOCS or STANDARD_DOCS is given:
206 #
207 # (1) you can specify other .texi files included in the files specified in
208 #     EXPLICIT_DOCS using EXTRA_TEXI_FILES (they will be listed as
209 #     dependencies of the info and html files)
210 # (2) you can specify extra .html output files using EXTRA_HTML_FILES
211 # (3) you can use `DOCS_TEXINFO_EXTENSION = t' to indicate that the
212 #     explicitly specified docs have .texinfo as the extension instead of
213 #    .texi.  Similarly for `DOCS_TXI_EXTENSION = t'.
214 #
215 # You can also specify EXTRA_DOC_FILES in all cases to indicate extra files
216 # to be copied into the man/ directory at installation time.
217
218 ifeq ($(STANDARD_DOCS),t)
219 EXPLICIT_DOCS = $(PACKAGE).texi
220 endif
221
222 ifneq ($(EXPLICIT_DOCS),)
223 ifeq ($(DOCS_TEXINFO_EXTENSION),t)
224 EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS:%.texinfo=%.texi)
225 else
226 ifeq ($(DOCS_TXI_EXTENSION),t)
227 EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS:%.txi=%.texi)
228 else
229 EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS)
230 endif
231 endif
232
233 # Ensure the correct setting of $TEXI_FILES. --SY.
234 TEXI_FILES = $(EXPLICIT_DOCS)
235 ifeq ($(DOCS_TEXINFO_EXTENSION),t)
236   TEXI_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.texinfo)
237 endif
238 ifeq ($(DOCS_TXI_EXTIONSION),t)
239   TEXI_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.txi)
240 endif
241
242 TEXI_FILES += $(EXTRA_TEXI_FILES)
243 INFO_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.info*)
244 INFO_DEP = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.info)
245
246 $(INFO_DEP): $(EXTRA_TEXI_FILES)
247
248 mostlyclean::
249         rm -f $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.toc) \
250         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.aux) \
251         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.oaux) \
252         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.log) \
253         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.cp) \
254         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.cps) \
255         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.fn) \
256         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.fns) \
257         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.tp) \
258         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.tps) \
259         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.vr) \
260         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.vrs) \
261         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.pg) \
262         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.pgs) \
263         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.ky) \
264         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.kys)
265
266 clean::
267         rm -f $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.dvi) \
268         $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.ps)
269
270 HTML_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%*.html) $(EXTRA_HTML_FILES)
271 HTML_DEP = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%_toc.html)
272
273 $(HTML_DEP): $(EXTRA_TEXI_FILES)
274
275 endif
276
277 html: $(HTML_DEP)
278
279 XEMACS_BATCH_PREPARE_FOR_TEXINFO = $(XEMACS_BATCH_CLEAN) -eval '(setq load-path (append (list "$(XEMACS_PACKAGES_BASE)/xemacs-packages/texinfo" "$(XEMACS_PACKAGES_BASE)/xemacs-packages/text-modes" "$(XEMACS_PACKAGES_BASE)/xemacs-packages/xemacs-base") load-path))' $(LOAD_AUTOLOADS)
280
281 ifeq ($(XEMACS_21_5),t)
282 INFO_ENCODING = utf-8
283 else
284 INFO_ENCODING = iso-2022-7
285 endif
286
287 FORMAT_INFO_USING_XEMACS_ARGS = -l informat -l texinfmt -f texinfo-format-buffer
288
289 FORMAT_INFO_USING_XEMACS = \
290         $(XEMACS_BATCH_PREPARE_FOR_TEXINFO) -insert $< \
291         $(FORMAT_INFO_USING_XEMACS_ARGS) -f save-buffer
292
293 FORMAT_MULE_INFO_USING_XEMACS = \
294         $(XEMACS_BATCH_PREPARE_FOR_TEXINFO) -insert $< \
295                 -eval '(unless (featurep (quote mule)) (kill-emacs 0))' \
296                 -eval '(cd "$(<D)")' \
297                 $(FORMAT_INFO_USING_XEMACS_ARGS) \
298                 -eval '(setq file-coding-system (quote $(INFO_ENCODING)))' \
299                 -eval '(save-buffer 0)'
300
301 # makeinfo doesn't seem able to handle Mule-formatted files correctly, so
302 # we need to use the texinfo package. #### Switch to UTF-8 and this should
303 # go away.
304 ifeq ($(COMPILE_INFO_AS_MULE),t)
305 FORMAT_INFO = $(FORMAT_MULE_INFO_USING_XEMACS)
306 else
307 FORMAT_INFO = cd $(@D) && $(MAKEINFO) $(MAKEINFO_FLAGS) -o $(@F) $(<F)
308 endif
309
310 %-ja.info: %-ja.texi
311         $(FORMAT_MULE_INFO_USING_XEMACS)
312
313 %.info: %.txi
314         $(FORMAT_INFO)
315 %.info: %.texi
316         $(FORMAT_INFO)
317 %.info: %.texinfo
318         $(FORMAT_INFO)
319
320 ## Make sure to cd into the directory before running texi2html because it
321 ## puts its results in the current directory, not the directory of the
322 ## source file.
323
324 ifeq ($(COMPILE_INFO_AS_MULE),t)
325 ifeq ($(XEMACS_21_5),t)
326 PREPARE_MULE_UCS =
327 else
328 PREPARE_MULE_UCS = -eval '(setq load-path (append (list "$(XEMACS_PACKAGES_BASE)/mule-packages/mule-base" "$(XEMACS_PACKAGES_BASE)/mule-packages/mule-ucs/lisp" "$(XEMACS_PACKAGES_BASE)/mule-packages/latin-euro-standards") load-path))' $(LOAD_AUTOLOADS) -l tae -l un-define
329 endif
330 RUN_TEXI2HTML = for fil in $< $(EXTRA_TEXI_FILES); do \
331         $(XEMACS_BATCH_PREPARE_FOR_TEXINFO) $(PREPARE_MULE_UCS) \
332         -eval '(unless (featurep (quote mule)) (kill-emacs 0))' \
333         -eval "(find-file \"$$fil\")" \
334         -eval '(setq file-coding-system (quote utf-8))' \
335         -eval '(progn (goto-char (point-min)) (when (search-forward "@setfilename" nil t) (forward-line) (insert "@documentencoding UTF-8\n")))' \
336         -eval '(save-buffer 16)'; done && \
337         pushd $(@D) && $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(<F) && popd && \
338         for fil in $< $(EXTRA_TEXI_FILES); do mv -f $$fil~ $$fil; done
339 else
340 RUN_TEXI2HTML = cd $(@D) && $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(<F)
341 endif
342
343 %_toc.html: %.txi
344         $(RUN_TEXI2HTML)
345 %_toc.html: %.texi
346         $(RUN_TEXI2HTML)
347 %_toc.html: %.texinfo
348         $(RUN_TEXI2HTML)
349
350 # #### I'm not sure if this is correct.  xslt-process seems to think it
351 # needs to be run twice.
352 ifneq ($(TEXI2DVI),)
353 RUN_TEXI2DVI = cd $(@D) && $(TEXI2DVI) $(<F) && $(TEXI2DVI) $(<F)
354 else
355 RUN_TEXI2DVI = -
356 endif
357
358 %.dvi: %.txi
359         $(RUN_TEXI2DVI)
360 %.dvi: %.texi
361         $(RUN_TEXI2DVI)
362 %.dvi: %.texinfo
363         $(RUN_TEXI2DVI)
364
365 ifneq ($(TEXI2PDF),)
366 RUN_TEXI2PDF = cd $(@D) && $(TEXI2PDF) $(<F)
367 else
368 RUN_TEXI2PDF = -
369 endif
370
371 %.pdf: %.txi
372         $(RUN_TEXI2PDF)
373 %.pdf: %.texi
374         $(RUN_TEXI2PDF)
375 %.pdf: %.texinfo
376         $(RUN_TEXI2PDF)
377
378 ifneq ($(DVIPS),)
379 RUN_DVIPS = cd $(@D) && $(DVIPS) -o $(@F) $(<F)
380 else
381 RUN_DVIPS = -
382 endif
383
384 %.ps: %.dvi
385         $(RUN_DVIPS)
386
387 ifeq ($(XEMACS_NATIVE_NT),t)
388 # Convert UNIX-path (containing output of `pwd') to windows-path, so
389 # that XEmacs native NT can handle it.
390 PACKAGE_COMPILE = \
391 "$(shell cygpath --windows $(XEMACS_PACKAGES_BASE)/package-compile.el)"
392 PACKAGE_CLEAN = \
393 "$(shell cygpath --windows $(XEMACS_PACKAGES_BASE)/package-clean.el)"
394 PACKAGE_NET_PACKAGES = \
395 "$(shell cygpath --windows $(XEMACS_PACKAGES_BASE)/package-net-packages.el)"
396 PACKAGE_STAGING = \
397 "$(shell cygpath --windows $(STAGING))"
398 HACK_PACKAGE_INDEX = \
399 "$(shell cygpath --windows $(XEMACS_PACKAGES_BASE)/hack-package-index.el)"
400 else
401 PACKAGE_COMPILE = $(XEMACS_PACKAGES_BASE)/package-compile.el
402 PACKAGE_CLEAN = $(XEMACS_PACKAGES_BASE)/package-clean.el
403 PACKAGE_NET_PACKAGES = $(XEMACS_PACKAGES_BASE)/package-net-packages.el
404 PACKAGE_STAGING = $(STAGING)
405 HACK_PACKAGE_INDEX = $(XEMACS_PACKAGES_BASE)/hack-package-index.el
406 endif
407
408 # Behaves like an XEmacs with the required packages set up
409 BOOT_XEMACS= $(XEMACS_BATCH_CLEAN) -l $(PACKAGE_COMPILE) -- $(REQUIRES) -- $(PRELOADS)
410
411 %.elc: %.el
412         $(BOOT_XEMACS) -f batch-byte-compile $<
413
414 # compile must be :: because some packages (e.g. psgml-dtd?) put separate
415 # commands that apply only to those particular dependencies.
416 compile:: check-mule
417
418 # Build the generated stuff if we're in the top-level of a package directory
419 # but not otherwise.
420 ifneq ($(PACKAGE),)
421 compile:: $(AUTOLOAD_PATH)/_pkg.el
422 endif
423
424 ## first, the byte-compile the files generated earlier (auto-autoloads.el,
425 ## etc.), now that we have all of them and hence can handle dependencies.
426 ## then, generate and compile the other generated files.
427 compile:: $(EARLY_GENERATED_ELCS) $(GENERATED_ELCS)
428
429 ## now compile the main Lisp
430 compile:: $(ELCS) $(ELCS_1)
431
432 ## now the docs, info format.
433 compile:: $(INFO_DEP)
434
435 ## now the docs, html format (maybe).
436 ifeq ($(INSTALL_HTML),t)
437 compile:: html
438 endif
439
440 ## now, any extra dependencies specified by the Makefiles.
441 compile:: $(EXTRA_DEPENDENCIES)
442
443 dist:: binkit package-info
444
445 mostlyclean::
446
447 # Remove the generated files.
448 genclean:
449         rm -f $(GENERATED_LISP) $(EARLY_GENERATED_LISP) $(GENERATED_ELCS) $(EARLY_GENERATED_ELCS) package-info $(AUTOLOAD_PATH)/_pkg.el
450
451 clean:: mostlyclean
452         rm -f $(GENERATED_ELCS) $(EARLY_GENERATED_ELCS) $(ELCS) $(ELCS_1) \
453         $(HTML_FILES) $(INFO_FILES) $(DEPENDS_FILE_NAME) $(EXTRA_DEPENDENCIES)
454
455 # distclean is what you use when making a distribution.  everything that
456 # can get rebuilt should be killed.  everything.
457
458 distclean:: clean genclean
459
460 # extraclean means distclean plus removal of backup files, etc.
461 extraclean: distclean
462         rm -f core *~ .*~ .\#*
463
464 # [[ elcclean is for when you want to rebuild after having made a small
465 # change, e.g. you cvs updated and got new versions of some files.
466 # The problem is that if you just `make', you may have the situation
467 # where a file that needs to be compiled depends on some other
468 # just-updated .el file, and in particular on the features that were
469 # added in the update.  In such a case, the .elc file is out-of-date
470 # w.r.t the .el file, and you'd get the .elc file (missing the
471 # necessary features), and error.  So we remove the minimum number of
472 # .elc required to ensure that the build will always succeed
473 # correctly. ]]
474
475 # This is less of an issue now that we ignore out-of-date .elc files. --ben
476
477 elcclean:
478         $(XEMACS_BATCH_CLEAN) -l $(PACKAGE_CLEAN)
479
480 GENERATED_ELC_DEPENDENCIES = $(ELCS:.elc=.el) $(ELCS_1:.elc=.el) \
481         $(AUTOLOAD_PATH)/_pkg.el
482
483 # If Makefile or _pkg.el has changed (Makefile will trigger _pkg.el
484 # rebuilding), then our suppress forms may have changed.  Just rebuilding
485 # the autoload file normally isn't enough as the old suppress forms will
486 # still sit there, so nuke it first.
487
488 # We include xemacs-base in the load path so as to get the operator
489 # definitions in autoload-operators.el.
490 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(AUTOLOAD_PATH)/_pkg.el
491         rm -f $(AUTOLOAD_PATH)/auto-autoloads.el
492
493 ifeq ($(or $(XEMACS_21_5),$(BUILD_WITH_SXEMACS)),t)
494 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(GENERATED_ELC_DEPENDENCIES)
495         $(XEMACS_BATCH_CLEAN) \
496         -eval '(setq load-path (cons "$(XEMACS_PACKAGES_BASE)/xemacs-packages/xemacs-base" load-path)))' \
497         $(LOAD_AUTOLOADS) \
498                 -l autoload -f batch-update-directory-autoloads \
499                 $(PACKAGE) $(AUTOLOAD_PATH)
500         # The equivalent of `touch' is done automatically
501         @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
502
503 $(AUTOLOAD_PATH)/custom-defines.el : $(GENERATED_ELC_DEPENDENCIES)
504         $(XEMACS_BATCH_CLEAN) $(LOAD_AUTOLOADS) \
505                 -l autoload -f batch-update-directory-custom-defines \
506                 $(PACKAGE) $(AUTOLOAD_PATH)
507         @rm -f $(AUTOLOAD_PATH)/custom-defines.el~
508
509 else
510 AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"$(PACKAGE)\")
511 AUTOLOAD_FILE = (setq generated-autoload-file \
512         \"$(AUTOLOAD_PATH)/auto-autoloads.el\")
513
514 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(GENERATED_ELC_DEPENDENCIES)
515         $(XEMACS_BATCH_CLEAN) \
516         -eval '(setq load-path (cons "$(XEMACS_PACKAGES_BASE)/xemacs-packages/xemacs-base" load-path)))' \
517         $(LOAD_AUTOLOADS) \
518                 -eval "$(AUTOLOAD_PACKAGE_NAME)" \
519                 -eval "$(AUTOLOAD_FILE)" \
520                 -l autoload -f batch-update-autoloads $^
521         @touch $(AUTOLOAD_PATH)/auto-autoloads.el
522         @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
523 endif
524
525 $(AUTOLOAD_PATH)/custom-load.el : $(GENERATED_ELC_DEPENDENCIES)
526         $(XEMACS_BATCH_CLEAN) $(LOAD_AUTOLOADS) -l cus-dep \
527                 -f Custom-make-dependencies $(AUTOLOAD_PATH)
528         @touch $(AUTOLOAD_PATH)/custom-load.el
529         @rm -f $(AUTOLOAD_PATH)/custom-load.el~
530
531 pkg_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar
532
533 ifeq ($(XEMACS_NATIVE_NT),t)
534 # Convert UNIX-path (containing output of `pwd') to windows-path,
535 # so that XEmacs native NT can handle it.
536 PKG_TAR_GZ = "$(shell cygpath --windows $(pkg_tar)).gz"
537 PACKAGE_INFO = "$(shell cygpath --windows $(STAGING)/$(PACKAGE_INDEX))"
538 else
539 PKG_TAR_GZ = $(pkg_tar).gz
540 PACKAGE_INFO = $(STAGING)/$(PACKAGE_INDEX)
541 endif
542
543 # Make the $(pkg_tar).gz first, then the $(pkg_tar).bz2
544 package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \
545                 $(pkg_tar).gz $(pkg_tar).bz2
546         #  #### See if we can't CLEAN this up
547         $(XEMACS_BATCH_DIRTY) \
548                 -l package-info.elc -f batch-update-package-info \
549                 '$(VERSION)' $(PKG_TAR_GZ) \
550                 '$(REQUIRES)' \
551                 '$(AUTHOR_VERSION)' '$(MAINTAINER)' '$(CATEGORY)'
552         #  #### See if we can't CLEAN this up
553         $(XEMACS_BATCH_DIRTY) \
554                 -l $(HACK_PACKAGE_INDEX) -f batch-hack-package-index \
555                         $(PACKAGE) package-info $(PACKAGE_INFO) $(CATEGORY)
556
557 ifeq ($(BUILD_TARS),t)
558 $(pkg_tar): $(STAGING)/$(MANIFEST)
559         @(cd $(STAGING);                        \
560            rm -f $(pkg_tar)*)
561
562         (cd $(STAGING);                         \
563           $(TAR) $(EXCLUDES) --create --owner=0 --group=0 --file $(pkg_tar) \
564                 `cat $(MANIFEST)`)
565
566
567 $(pkg_tar).gz: $(pkg_tar)
568 ifneq ($(BZIP2),) # need to leave behind the .tar for bzip2 to find.
569         (cd $(STAGING);                         \
570           gzip -cv9 $(pkg_tar) > $(pkg_tar).gz;)
571 else # BZIP2 is ''
572         (cd $(STAGING);                         \
573           gzip -v9 $(pkg_tar);)
574 endif
575
576 ifneq ($(BZIP2),)
577 $(pkg_tar).bz2: $(pkg_tar)
578         (cd $(STAGING);                         \
579           $(BZIP2) -v9 $(pkg_tar);)
580 else # Don't build a .tar.bz2
581 $(pkg_tar).bz2:
582
583 .PHONY: $(pkg_tar).bz2
584 endif # BZIP2 ?
585
586 else # when BUILD_TARS  is ''
587 # Touch the file so the package-index can be generated
588 $(pkg_tar) $(pkg_tar).gz $(pkg_tar).bz2 :
589         touch $@
590 endif # BUILD_TARS ?
591
592 ifeq ($(AUTHOR_VERSION),)
593 AUTHOR_VERSION = No-Upstream-Ver
594 endif
595
596 $(AUTOLOAD_PATH)/_pkg.el: Makefile
597         @echo Creating $(AUTOLOAD_PATH)/_pkg.el
598         @echo ";;;###autoload" > $(AUTOLOAD_PATH)/_pkg.el
599         @echo "(package-provide '$(PACKAGE)" >> $(AUTOLOAD_PATH)/_pkg.el
600         @echo "          :version $(VERSION)" >> $(AUTOLOAD_PATH)/_pkg.el
601         @echo "          :author-version \"$(AUTHOR_VERSION)\"" >> $(AUTOLOAD_PATH)/_pkg.el
602         @echo "          :type '$(PKG_TYPE))" >> $(AUTOLOAD_PATH)/_pkg.el
603 ifneq ($(PACKAGE_SUPPRESS),)
604         @echo "" >> $(AUTOLOAD_PATH)/_pkg.el
605         @echo ";;;###autoload" >> $(AUTOLOAD_PATH)/_pkg.el
606         @echo "(when (fboundp 'package-suppress)" >> $(AUTOLOAD_PATH)/_pkg.el
607         @echo "      $(PACKAGE_SUPPRESS)" >> $(AUTOLOAD_PATH)/_pkg.el
608         @echo ")" >> $(AUTOLOAD_PATH)/_pkg.el
609 endif
610
611 setup-info: #  #### See if we can't CLEAN this up
612         $(XEMACS_BATCH_DIRTY) -l $(PACKAGE_NET_PACKAGES) \
613                 -l $(PACKAGE_INFO) \
614                 -f package-net-packages-batch-convert-index-to-ini $(PACKAGE_STAGING) $(CATEGORY)
615
616 .PHONY: binkit-with-html install-for-bindist autoloads
617
618 # A target that _only_ installs and doesn't build _anything_
619 install-only: binkit
620
621 binkit: binkit-1
622
623 ifeq ($(INSTALL_HTML),t)
624 binkit: install-html
625 endif
626
627 binkit-with-html: binkit-1 install-html
628
629 install-for-bindist: binkit package-info setup-info
630
631 ## Do not byte-compile as that could require stuff from elsewhere, and you
632 ## get dependency circles.
633 autoloads: $(EARLY_GENERATED_LISP)
634
635 binkit-1: check-staging
636         (if test -d $(STAGING); then            \
637                 cd $(STAGING);                  \
638                 if test -f $(MANIFEST); then    \
639                         rm -rf `cat $(MANIFEST)`; \
640                 fi;                             \
641         fi;)
642 ifneq ($(PACKAGE),)
643         @-mkdir -p $(STAGING)/lisp/$(PACKAGE)
644 endif
645 ifneq ($(ELCS_1),)
646         @-mkdir -p $(STAGING)/lisp/$(ELCS_1_DEST)
647 endif
648 ifneq ($(INFO_FILES),)
649         @-mkdir -p $(STAGING)/info
650         @-mkdir -p $(STAGING)/man/$(PACKAGE)
651 endif
652 ifneq ($(DATA_FILES),)
653         @-mkdir -p $(STAGING)/etc/$(DATA_DEST)
654 endif
655 ifneq ($(DATA_1_FILES),)
656         @-mkdir -p $(STAGING)/etc/$(DATA_1_DEST)
657 endif
658 ifneq ($(DATA_2_FILES),)
659         @-mkdir -p $(STAGING)/etc/$(DATA_2_DEST)
660 endif
661 ifneq ($(DATA_3_FILES),)
662         @-mkdir -p $(STAGING)/etc/$(DATA_3_DEST)
663 endif
664 ifneq ($(DATA_4_FILES),)
665         @-mkdir -p $(STAGING)/etc/$(DATA_4_DEST)
666 endif
667 ifneq ($(DATA_5_FILES),)
668         @-mkdir -p $(STAGING)/etc/$(DATA_5_DEST)
669 endif
670 ifneq ($(DATA_6_FILES),)
671         @-mkdir -p $(STAGING)/etc/$(DATA_6_DEST)
672 endif
673 ifneq ($(DATA_7_FILES),)
674         @-mkdir -p $(STAGING)/etc/$(DATA_7_DEST)
675 endif
676 ifneq ($(DATA_8_FILES),)
677         @-mkdir -p $(STAGING)/etc/$(DATA_8_DEST)
678 endif
679 ifneq ($(DATA_9_FILES),)
680         @-mkdir -p $(STAGING)/etc/$(DATA_9_DEST)
681 endif
682 ifneq ($(DATA_10_FILES),)
683         @-mkdir -p $(STAGING)/etc/$(DATA_10_DEST)
684 endif
685 ifneq ($(DATA_11_FILES),)
686         @-mkdir -p $(STAGING)/etc/$(DATA_11_DEST)
687 endif
688 ifneq ($(DATA_12_FILES),)
689         @-mkdir -p $(STAGING)/etc/$(DATA_12_DEST)
690 endif
691 ifneq ($(DATA_13_FILES),)
692         @-mkdir -p $(STAGING)/etc/$(DATA_13_DEST)
693 endif
694 ifneq ($(DATA_14_FILES),)
695         @-mkdir -p $(STAGING)/etc/$(DATA_14_DEST)
696 endif
697 ifneq ($(DATA_15_FILES),)
698         @-mkdir -p $(STAGING)/etc/$(DATA_15_DEST)
699 endif
700 ifneq ($(DATA_16_FILES),)
701         @-mkdir -p $(STAGING)/etc/$(DATA_16_DEST)
702 endif
703 ifneq ($(DATA_17_FILES),)
704         @-mkdir -p $(STAGING)/etc/$(DATA_17_DEST)
705 endif
706 ifneq ($(DATA_18_FILES),)
707         @-mkdir -p $(STAGING)/etc/$(DATA_18_DEST)
708 endif
709 ifneq ($(DATA_19_FILES),)
710         @-mkdir -p $(STAGING)/etc/$(DATA_19_DEST)
711 endif
712 ifneq ($(DATA_20_FILES),)
713         @-mkdir -p $(STAGING)/etc/$(DATA_20_DEST)
714 endif
715 ifneq ($(DATA_21_FILES),)
716         @-mkdir -p $(STAGING)/etc/$(DATA_21_DEST)
717 endif
718 ifneq ($(DATA_22_FILES),)
719         @-mkdir -p $(STAGING)/etc/$(DATA_22_DEST)
720 endif
721 ifneq ($(DATA_23_FILES),)
722         @-mkdir -p $(STAGING)/etc/$(DATA_23_DEST)
723 endif
724 ifneq ($(DATA_24_FILES),)
725         @-mkdir -p $(STAGING)/etc/$(DATA_24_DEST)
726 endif
727 ifneq ($(DATA_25_FILES),)
728         @-mkdir -p $(STAGING)/etc/$(DATA_25_DEST)
729 endif
730 ifneq ($(DATA_26_FILES),)
731         @-mkdir -p $(STAGING)/etc/$(DATA_26_DEST)
732 endif
733 ifneq ($(DATA_27_FILES),)
734         @-mkdir -p $(STAGING)/etc/$(DATA_27_DEST)
735 endif
736 ifneq ($(DATA_28_FILES),)
737         @-mkdir -p $(STAGING)/etc/$(DATA_28_DEST)
738 endif
739 ifneq ($(DATA_29_FILES),)
740         @-mkdir -p $(STAGING)/etc/$(DATA_29_DEST)
741 endif
742 ifneq ($(DATA_30_FILES),)
743         @-mkdir -p $(STAGING)/etc/$(DATA_30_DEST)
744 endif
745 ifneq ($(DATA_31_FILES),)
746         @-mkdir -p $(STAGING)/etc/$(DATA_31_DEST)
747 endif
748 ifneq ($(DATA_32_FILES),)
749         @-mkdir -p $(STAGING)/etc/$(DATA_32_DEST)
750 endif
751 ifneq ($(DATA_33_FILES),)
752         @-mkdir -p $(STAGING)/etc/$(DATA_33_DEST)
753 endif
754 ifneq ($(DATA_34_FILES),)
755         @-mkdir -p $(STAGING)/etc/$(DATA_34_DEST)
756 endif
757 ifneq ($(DATA_35_FILES),)
758         @-mkdir -p $(STAGING)/etc/$(DATA_35_DEST)
759 endif
760 ifneq ($(LIBSRC_FILES),)
761         @-mkdir -p $(STAGING)/lib-src
762 endif
763         @-mkdir -p $(STAGING)/pkginfo
764 ifneq ($(PACKAGE),)
765         $(RCOPY) $(addprefix $(PWD)/, ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES)) \
766           $(STAGING)/lisp/$(PACKAGE)
767 endif
768 ifneq ($(ELCS_1),)
769         $(RCOPY) $(addprefix $(PWD)/, $(ELCS_1_FILES)) $(STAGING)/lisp/$(ELCS_1_DEST)
770 endif
771 ifneq ($(INFO_FILES),)
772         $(RCOPY) $(addprefix $(PWD)/, $(INFO_FILES)) $(STAGING)/info
773         $(RCOPY) $(addprefix $(PWD)/, $(TEXI_FILES)) $(STAGING)/man/$(PACKAGE)
774 ifneq ($(EXTRA_DOC_FILES),)
775         $(RCOPY) $(addprefix $(PWD)/, $(EXTRA_DOC_FILES)) $(STAGING)/man/$(PACKAGE)
776 endif
777 endif
778 ifneq ($(DATA_FILES),)
779         $(RCOPY) $(addprefix $(PWD)/, $(DATA_FILES)) $(STAGING)/etc/$(DATA_DEST)
780 endif
781 ifneq ($(DATA_1_FILES),)
782         $(RCOPY) $(addprefix $(PWD)/, $(DATA_1_FILES)) $(STAGING)/etc/$(DATA_1_DEST)
783 endif
784 ifneq ($(DATA_2_FILES),)
785         $(RCOPY) $(addprefix $(PWD)/, $(DATA_2_FILES)) $(STAGING)/etc/$(DATA_2_DEST)
786 endif
787 ifneq ($(DATA_3_FILES),)
788         $(RCOPY) $(addprefix $(PWD)/, $(DATA_3_FILES)) $(STAGING)/etc/$(DATA_3_DEST)
789 endif
790 ifneq ($(DATA_4_FILES),)
791         $(RCOPY) $(addprefix $(PWD)/, $(DATA_4_FILES)) $(STAGING)/etc/$(DATA_4_DEST)
792 endif
793 ifneq ($(DATA_5_FILES),)
794         $(RCOPY) $(addprefix $(PWD)/, $(DATA_5_FILES)) $(STAGING)/etc/$(DATA_5_DEST)
795 endif
796 ifneq ($(DATA_6_FILES),)
797         $(RCOPY) $(addprefix $(PWD)/, $(DATA_6_FILES)) $(STAGING)/etc/$(DATA_6_DEST)
798 endif
799 ifneq ($(DATA_7_FILES),)
800         $(RCOPY) $(addprefix $(PWD)/, $(DATA_7_FILES)) $(STAGING)/etc/$(DATA_7_DEST)
801 endif
802 ifneq ($(DATA_8_FILES),)
803         $(RCOPY) $(addprefix $(PWD)/, $(DATA_8_FILES)) $(STAGING)/etc/$(DATA_8_DEST)
804 endif
805 ifneq ($(DATA_9_FILES),)
806         $(RCOPY) $(addprefix $(PWD)/, $(DATA_9_FILES)) $(STAGING)/etc/$(DATA_9_DEST)
807 endif
808 ifneq ($(DATA_10_FILES),)
809         $(RCOPY) $(addprefix $(PWD)/, $(DATA_10_FILES)) $(STAGING)/etc/$(DATA_10_DEST)
810 endif
811 ifneq ($(DATA_11_FILES),)
812         $(RCOPY) $(addprefix $(PWD)/, $(DATA_11_FILES)) $(STAGING)/etc/$(DATA_11_DEST)
813 endif
814 ifneq ($(DATA_12_FILES),)
815         $(RCOPY) $(addprefix $(PWD)/, $(DATA_12_FILES)) $(STAGING)/etc/$(DATA_12_DEST)
816 endif
817 ifneq ($(DATA_13_FILES),)
818         $(RCOPY) $(addprefix $(PWD)/, $(DATA_13_FILES)) $(STAGING)/etc/$(DATA_13_DEST)
819 endif
820 ifneq ($(DATA_14_FILES),)
821         $(RCOPY) $(addprefix $(PWD)/, $(DATA_14_FILES)) $(STAGING)/etc/$(DATA_14_DEST)
822 endif
823 ifneq ($(DATA_15_FILES),)
824         $(RCOPY) $(addprefix $(PWD)/, $(DATA_15_FILES)) $(STAGING)/etc/$(DATA_15_DEST)
825 endif
826 ifneq ($(DATA_16_FILES),)
827         $(RCOPY) $(addprefix $(PWD)/, $(DATA_16_FILES)) $(STAGING)/etc/$(DATA_16_DEST)
828 endif
829 ifneq ($(DATA_17_FILES),)
830         $(RCOPY) $(addprefix $(PWD)/, $(DATA_17_FILES)) $(STAGING)/etc/$(DATA_17_DEST)
831 endif
832 ifneq ($(DATA_18_FILES),)
833         $(RCOPY) $(addprefix $(PWD)/, $(DATA_18_FILES)) $(STAGING)/etc/$(DATA_18_DEST)
834 endif
835 ifneq ($(DATA_19_FILES),)
836         $(RCOPY) $(addprefix $(PWD)/, $(DATA_19_FILES)) $(STAGING)/etc/$(DATA_19_DEST)
837 endif
838 ifneq ($(DATA_20_FILES),)
839         $(RCOPY) $(addprefix $(PWD)/, $(DATA_20_FILES)) $(STAGING)/etc/$(DATA_20_DEST)
840 endif
841 ifneq ($(DATA_21_FILES),)
842         $(RCOPY) $(addprefix $(PWD)/, $(DATA_21_FILES)) $(STAGING)/etc/$(DATA_21_DEST)
843 endif
844 ifneq ($(DATA_22_FILES),)
845         $(RCOPY) $(addprefix $(PWD)/, $(DATA_22_FILES)) $(STAGING)/etc/$(DATA_22_DEST)
846 endif
847 ifneq ($(DATA_23_FILES),)
848         $(RCOPY) $(addprefix $(PWD)/, $(DATA_23_FILES)) $(STAGING)/etc/$(DATA_23_DEST)
849 endif
850 ifneq ($(DATA_24_FILES),)
851         $(RCOPY) $(addprefix $(PWD)/, $(DATA_24_FILES)) $(STAGING)/etc/$(DATA_24_DEST)
852 endif
853 ifneq ($(DATA_25_FILES),)
854         $(RCOPY) $(addprefix $(PWD)/, $(DATA_25_FILES)) $(STAGING)/etc/$(DATA_25_DEST)
855 endif
856 ifneq ($(DATA_26_FILES),)
857         $(RCOPY) $(addprefix $(PWD)/, $(DATA_26_FILES)) $(STAGING)/etc/$(DATA_26_DEST)
858 endif
859 ifneq ($(DATA_27_FILES),)
860         $(RCOPY) $(addprefix $(PWD)/, $(DATA_27_FILES)) $(STAGING)/etc/$(DATA_27_DEST)
861 endif
862 ifneq ($(DATA_28_FILES),)
863         $(RCOPY) $(addprefix $(PWD)/, $(DATA_28_FILES)) $(STAGING)/etc/$(DATA_28_DEST)
864 endif
865 ifneq ($(DATA_29_FILES),)
866         $(RCOPY) $(addprefix $(PWD)/, $(DATA_29_FILES)) $(STAGING)/etc/$(DATA_29_DEST)
867 endif
868 ifneq ($(DATA_30_FILES),)
869         $(RCOPY) $(addprefix $(PWD)/, $(DATA_30_FILES)) $(STAGING)/etc/$(DATA_30_DEST)
870 endif
871 ifneq ($(DATA_31_FILES),)
872         $(RCOPY) $(addprefix $(PWD)/, $(DATA_31_FILES)) $(STAGING)/etc/$(DATA_31_DEST)
873 endif
874 ifneq ($(DATA_32_FILES),)
875         $(RCOPY) $(addprefix $(PWD)/, $(DATA_32_FILES)) $(STAGING)/etc/$(DATA_32_DEST)
876 endif
877 ifneq ($(DATA_33_FILES),)
878         $(RCOPY) $(addprefix $(PWD)/, $(DATA_33_FILES)) $(STAGING)/etc/$(DATA_33_DEST)
879 endif
880 ifneq ($(DATA_34_FILES),)
881         $(RCOPY) $(addprefix $(PWD)/, $(DATA_34_FILES)) $(STAGING)/etc/$(DATA_34_DEST)
882 endif
883 ifneq ($(DATA_35_FILES),)
884         $(RCOPY) $(addprefix $(PWD)/, $(DATA_35_FILES)) $(STAGING)/etc/$(DATA_35_DEST)
885 endif
886 ifneq ($(LIBSRC_FILES),)
887         $(RCOPY) $(addprefix $(PWD)/, $(LIBSRC_FILES)) $(STAGING)/lib-src
888 endif
889         (cd $(STAGING); \
890         ls -1 $(MANIFEST) > $(MANIFEST))
891 ifneq ($(PACKAGE),)
892         @(cd $(STAGING); \
893         ls -1 lisp/$(PACKAGE)/ChangeLog \
894                 $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(SOURCE_FILES_TO_COPY))) \
895                 $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(EXTRA_SOURCES))) \
896                 >> $(MANIFEST))
897 endif
898 ifneq ($(ELCS_1),)
899         @(cd $(STAGING); \
900         ls -1 $(patsubst %, lisp/$(ELCS_1_DEST)/%, $(notdir $(ELCS_1_FILES))) \
901                 >> $(MANIFEST))
902 endif
903 ifneq ($(INFO_FILES),)
904         @(cd $(STAGING); \
905         ls -1 man/$(PACKAGE)/* \
906                 $(patsubst %,info/%, $(notdir $(INFO_FILES))) >> $(MANIFEST))
907 endif
908 ifneq ($(DATA_FILES),)
909         @(cd $(STAGING); \
910         ls -1 $(patsubst %, etc/$(DATA_DEST)/%, $(notdir $(DATA_FILES))) \
911                 >> $(MANIFEST))
912 endif
913 ifneq ($(DATA_1_FILES),)
914         @(cd $(STAGING); \
915         ls -1 $(patsubst %, etc/$(DATA_1_DEST)/%, $(notdir $(DATA_1_FILES))) \
916                 >> $(MANIFEST))
917 endif
918 ifneq ($(DATA_2_FILES),)
919         @(cd $(STAGING); \
920         ls -1 $(patsubst %, etc/$(DATA_2_DEST)/%, $(notdir $(DATA_2_FILES))) \
921                 >> $(MANIFEST))
922 endif
923 ifneq ($(DATA_3_FILES),)
924         @(cd $(STAGING); \
925         ls -1 $(patsubst %, etc/$(DATA_3_DEST)/%, $(notdir $(DATA_3_FILES))) \
926                 >> $(MANIFEST))
927 endif
928 ifneq ($(DATA_4_FILES),)
929         @(cd $(STAGING); \
930         ls -1 $(patsubst %, etc/$(DATA_4_DEST)/%, $(notdir $(DATA_4_FILES))) \
931                 >> $(MANIFEST))
932 endif
933 ifneq ($(DATA_5_FILES),)
934         @(cd $(STAGING); \
935         ls -1 $(patsubst %, etc/$(DATA_5_DEST)/%, $(notdir $(DATA_5_FILES))) \
936                 >> $(MANIFEST))
937 endif
938 ifneq ($(DATA_6_FILES),)
939         @(cd $(STAGING); \
940         ls -1 $(patsubst %, etc/$(DATA_6_DEST)/%, $(notdir $(DATA_6_FILES))) \
941                 >> $(MANIFEST))
942 endif
943 ifneq ($(DATA_7_FILES),)
944         @(cd $(STAGING); \
945         ls -1 $(patsubst %, etc/$(DATA_7_DEST)/%, $(notdir $(DATA_7_FILES))) \
946                 >> $(MANIFEST))
947 endif
948 ifneq ($(DATA_8_FILES),)
949         @(cd $(STAGING); \
950         ls -1 $(patsubst %, etc/$(DATA_8_DEST)/%, $(notdir $(DATA_8_FILES))) \
951                 >> $(MANIFEST))
952 endif
953 ifneq ($(DATA_9_FILES),)
954         @(cd $(STAGING); \
955         ls -1 $(patsubst %, etc/$(DATA_9_DEST)/%, $(notdir $(DATA_9_FILES))) \
956                 >> $(MANIFEST))
957 endif
958 ifneq ($(DATA_10_FILES),)
959         @(cd $(STAGING); \
960         ls -1 $(patsubst %, etc/$(DATA_10_DEST)/%, $(notdir $(DATA_10_FILES))) \
961                 >> $(MANIFEST))
962 endif
963 ifneq ($(DATA_11_FILES),)
964         @(cd $(STAGING); \
965         ls -1 $(patsubst %, etc/$(DATA_11_DEST)/%, $(notdir $(DATA_11_FILES))) \
966                 >> $(MANIFEST))
967 endif
968 ifneq ($(DATA_12_FILES),)
969         @(cd $(STAGING); \
970         ls -1 $(patsubst %, etc/$(DATA_12_DEST)/%, $(notdir $(DATA_12_FILES))) \
971                 >> $(MANIFEST))
972 endif
973 ifneq ($(DATA_13_FILES),)
974         @(cd $(STAGING); \
975         ls -1 $(patsubst %, etc/$(DATA_13_DEST)/%, $(notdir $(DATA_13_FILES))) \
976                 >> $(MANIFEST))
977 endif
978 ifneq ($(DATA_14_FILES),)
979         @(cd $(STAGING); \
980         ls -1 $(patsubst %, etc/$(DATA_14_DEST)/%, $(notdir $(DATA_14_FILES))) \
981                 >> $(MANIFEST))
982 endif
983 ifneq ($(DATA_15_FILES),)
984         @(cd $(STAGING); \
985         ls -1 $(patsubst %, etc/$(DATA_15_DEST)/%, $(notdir $(DATA_15_FILES))) \
986                 >> $(MANIFEST))
987 endif
988 ifneq ($(DATA_16_FILES),)
989         @(cd $(STAGING); \
990         ls -1 $(patsubst %, etc/$(DATA_16_DEST)/%, $(notdir $(DATA_16_FILES))) \
991                 >> $(MANIFEST))
992 endif
993 ifneq ($(DATA_17_FILES),)
994         @(cd $(STAGING); \
995         ls -1 $(patsubst %, etc/$(DATA_17_DEST)/%, $(notdir $(DATA_17_FILES))) \
996                 >> $(MANIFEST))
997 endif
998 ifneq ($(DATA_18_FILES),)
999         @(cd $(STAGING); \
1000         ls -1 $(patsubst %, etc/$(DATA_18_DEST)/%, $(notdir $(DATA_18_FILES))) \
1001                 >> $(MANIFEST))
1002 endif
1003 ifneq ($(DATA_19_FILES),)
1004         @(cd $(STAGING); \
1005         ls -1 $(patsubst %, etc/$(DATA_19_DEST)/%, $(notdir $(DATA_19_FILES))) \
1006                 >> $(MANIFEST))
1007 endif
1008 ifneq ($(DATA_20_FILES),)
1009         @(cd $(STAGING); \
1010         ls -1 $(patsubst %, etc/$(DATA_20_DEST)/%, $(notdir $(DATA_20_FILES))) \
1011                 >> $(MANIFEST))
1012 endif
1013 ifneq ($(DATA_21_FILES),)
1014         @(cd $(STAGING); \
1015         ls -1 $(patsubst %, etc/$(DATA_21_DEST)/%, $(notdir $(DATA_21_FILES))) \
1016                 >> $(MANIFEST))
1017 endif
1018 ifneq ($(DATA_22_FILES),)
1019         @(cd $(STAGING); \
1020         ls -1 $(patsubst %, etc/$(DATA_22_DEST)/%, $(notdir $(DATA_22_FILES))) \
1021                 >> $(MANIFEST))
1022 endif
1023 ifneq ($(DATA_23_FILES),)
1024         @(cd $(STAGING); \
1025         ls -1 $(patsubst %, etc/$(DATA_23_DEST)/%, $(notdir $(DATA_23_FILES))) \
1026                 >> $(MANIFEST))
1027 endif
1028 ifneq ($(DATA_24_FILES),)
1029         @(cd $(STAGING); \
1030         ls -1 $(patsubst %, etc/$(DATA_24_DEST)/%, $(notdir $(DATA_24_FILES))) \
1031                 >> $(MANIFEST))
1032 endif
1033 ifneq ($(DATA_25_FILES),)
1034         @(cd $(STAGING); \
1035         ls -1 $(patsubst %, etc/$(DATA_25_DEST)/%, $(notdir $(DATA_25_FILES))) \
1036                 >> $(MANIFEST))
1037 endif
1038 ifneq ($(DATA_26_FILES),)
1039         @(cd $(STAGING); \
1040         ls -1 $(patsubst %, etc/$(DATA_26_DEST)/%, $(notdir $(DATA_26_FILES))) \
1041                 >> $(MANIFEST))
1042 endif
1043 ifneq ($(DATA_27_FILES),)
1044         @(cd $(STAGING); \
1045         ls -1 $(patsubst %, etc/$(DATA_27_DEST)/%, $(notdir $(DATA_27_FILES))) \
1046                 >> $(MANIFEST))
1047 endif
1048 ifneq ($(DATA_28_FILES),)
1049         @(cd $(STAGING); \
1050         ls -1 $(patsubst %, etc/$(DATA_28_DEST)/%, $(notdir $(DATA_28_FILES))) \
1051                 >> $(MANIFEST))
1052 endif
1053 ifneq ($(DATA_29_FILES),)
1054         @(cd $(STAGING); \
1055         ls -1 $(patsubst %, etc/$(DATA_29_DEST)/%, $(notdir $(DATA_29_FILES))) \
1056                 >> $(MANIFEST))
1057 endif
1058 ifneq ($(DATA_30_FILES),)
1059         @(cd $(STAGING); \
1060         ls -1 $(patsubst %, etc/$(DATA_30_DEST)/%, $(notdir $(DATA_30_FILES))) \
1061                 >> $(MANIFEST))
1062 endif
1063 ifneq ($(DATA_31_FILES),)
1064         @(cd $(STAGING); \
1065         ls -1 $(patsubst %, etc/$(DATA_31_DEST)/%, $(notdir $(DATA_31_FILES))) \
1066                 >> $(MANIFEST))
1067 endif
1068 ifneq ($(DATA_32_FILES),)
1069         @(cd $(STAGING); \
1070         ls -1 $(patsubst %, etc/$(DATA_32_DEST)/%, $(notdir $(DATA_32_FILES))) \
1071                 >> $(MANIFEST))
1072 endif
1073 ifneq ($(DATA_33_FILES),)
1074         @(cd $(STAGING); \
1075         ls -1 $(patsubst %, etc/$(DATA_33_DEST)/%, $(notdir $(DATA_33_FILES))) \
1076                 >> $(MANIFEST))
1077 endif
1078 ifneq ($(DATA_34_FILES),)
1079         @(cd $(STAGING); \
1080         ls -1 $(patsubst %, etc/$(DATA_34_DEST)/%, $(notdir $(DATA_34_FILES))) \
1081                 >> $(MANIFEST))
1082 endif
1083 ifneq ($(DATA_35_FILES),)
1084         @(cd $(STAGING); \
1085         ls -1 $(patsubst %, etc/$(DATA_35_DEST)/%, $(notdir $(DATA_35_FILES))) \
1086                 >> $(MANIFEST))
1087 endif
1088 ifneq ($(LIBSRC_FILES),)
1089         @(cd $(STAGING); \
1090         ls -1 $(patsubst %,lib-src/%, $(notdir $(LIBSRC_FILES))) >> $(MANIFEST))
1091 endif
1092
1093 install-html: html check-staging
1094 ifneq ($(HTML_FILES),)
1095         @-mkdir -p $(STAGING)/html
1096         @-mkdir -p $(STAGING)/pkginfo
1097         $(RCOPY) $(addprefix $(PWD)/, $(HTML_FILES)) $(STAGING)/html
1098         @(cd $(STAGING); \
1099         ls -1 $(patsubst %,html/%, $(notdir $(HTML_FILES))) >> $(MANIFEST))
1100 endif
1101
1102 # Export dependencies for outer make file usage
1103
1104 # Passed in from outer Make
1105 TARGET_BASE=
1106
1107 # Build depends is a clean version of Requires
1108 BDEPENDS=$(strip $(filter-out $(PACKAGE),$(REQUIRES)))
1109
1110 $(DEPENDS_FILE_NAME): Makefile $(XEMACS_PACKAGES_BASE)/XEmacs.rules
1111 ifneq ($(TARGET_BASE),)
1112         -rm -f $(DEPENDS_FILE_NAME)
1113         @echo Creating $(DEPENDS_FILE_NAME)
1114         @echo > $(DEPENDS_FILE_NAME)
1115 ifneq ($(BDEPENDS),)
1116         @echo $(TARGET_BASE)$(PACKAGE)/autoloads.target: \
1117                 $(TARGET_BASE)$(BDEPENDS:=/autoloads.target) \
1118                 >>$(DEPENDS_FILE_NAME)
1119         @echo $(TARGET_BASE)$(PACKAGE)/compile.target: \
1120                 $(TARGET_BASE)$(BDEPENDS:=/compile.target) \
1121                 >>$(DEPENDS_FILE_NAME)
1122 endif
1123 endif
1124
1125 # Local Variables:
1126 # mode: makefile
1127 # End: