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