SCM

SCM Repository

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

Diff of /XEmacs/packages/XEmacs.rules

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37, Sun Jun 9 07:26:09 2002 UTC revision 1.52, Sun Nov 7 23:52:54 2004 UTC
# Line 1  Line 1 
1  # Common Makefile material for package Makefiles  # Common Makefile material for package Makefiles
2  # Copyright (C) 1997 Free Software Foundation Inc.  # Copyright (C) 1997 Free Software Foundation Inc.
3    # Copyright (C) 2002, 2003 Ben Wing.
4    
5  # This file is part of XEmacs.  # This file is part of XEmacs.
6    
# Line 20  Line 21 
21    
22  # Requires XEmacs 21.0-beta19 or greater and GNU Make 3.78 or greater.  # 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
63    # GENERATED_LISP = additional .el files that will be generated at
64    #   byte-compilation time; rules must be given to build them
65    # PRELOADS = additional command-line arguments needed when compiling .elcs
66    # AUTOLOAD_PATH = subdirectory in source tree where .elcs are located (this
67    #   is where auto-autoloads.el, etc. will be placed)
68    #
69    # Doc files (see below):
70    # ----------------------
71    #
72    # (1) The preferred way:
73    #
74    # EXPLICIT_DOCS, STANDARD_DOCS, EXTRA_TEXI_FILES, EXTRA_HTML_FILES,
75    #   DOCS_TEXINFO_EXTENSION, DOCS_TXI_EXTENSION
76    #
77    # (2) The hard way:
78    #
79    # TEXI_FILES, INFO_FILES, INFO_DEP, HTML_FILES, HTML_DEP
80    #
81    # Also: EXTRA_DOC_FILES
82    #
83    # Other files to build:
84    # ---------------------
85    #
86    # EXTRA_DEPENDENCIES = additional files to build; rules must be given to
87    #   build them
88    #
89    # Files to install, besides the .elcs, docs, ChangeLog and _pkg.el:
90    # -----------------------------------------------------------------
91    #
92    # EXTRA_SOURCES = files installed under lisp/$(PACKAGE)
93    # LIBSRC_FILES = files installed under lib-src/
94    # DATA_FILES, DATA_DEST = files installed under a subdirectory of etc/; include
95    #   $(PACKAGE) in the name
96    # DATA_1_FILES, DATA_1_DEST ... DATA_35_FILES, DATA_35_DEST = files to be
97    #   installed in other subdirectories of etc/
98    
99  XEMACS_PACKAGES_BASE := $(shell while [ ! -f XEmacs.rules ]; do \  XEMACS_PACKAGES_BASE := $(shell while [ ! -f XEmacs.rules ]; do \
100                                      cd ..;      \                                      cd ..;      \
101                                  done;           \                                  done;           \
102                                  pwd)                                  pwd)
103    
104  DEPENDS_FILE_NAME = pdepends.mk  include ${XEMACS_PACKAGES_BASE}/Local.rules.inc
   
 # Make this the first target  
 bytecompile:: all  
   
 include ${XEMACS_PACKAGES_BASE}/Local.rules.mk  
 -include ${XEMACS_PACKAGES_BASE}/Local.rules  
105    
106  # Ensure vanilla locale when building  # Ensure vanilla locale when building
107  override LANG := C  override LANG := C
# Line 41  Line 111 
111  AUTOLOAD_PATH = .  AUTOLOAD_PATH = .
112  endif  endif
113    
114  # Override or add to this in the package Makefile if necessary  # Set this in the package Makefile if necessary (BEFORE including this file)
115  GENERATED = $(AUTOLOAD_PATH)/auto-autoloads.elc  EARLY_GENERATED_LISP := $(AUTOLOAD_PATH)/auto-autoloads.el \
116            $(AUTOLOAD_PATH)/custom-load.el $(EARLY_GENERATED_LISP)
117    ifeq ($(XEMACS_21_5),t)
118    EARLY_GENERATED_LISP += $(AUTOLOAD_PATH)/custom-defines.el
119    endif
120    
121    EARLY_GENERATED_ELCS = $(EARLY_GENERATED_LISP:.el=.elc)
122    GENERATED_ELCS = $(GENERATED_LISP:.el=.elc)
123    
124  # SOURCE_FILES_TO_COPY = *.el*  # SOURCE_FILES_TO_COPY = *.el*
125  SOURCE_FILES_TO_COPY = $(ELCS) $(ELCS:.elc=.el) \  SOURCE_FILES_TO_COPY = $(ELCS) $(ELCS:.elc=.el) \
126          $(MULE_ELCS) $(MULE_ELCS:.elc=.el) \          $(MULE_ELCS) $(MULE_ELCS:.elc=.el) \
127          $(GENERATED) $(GENERATED:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el          $(EARLY_GENERATED_ELCS) $(EARLY_GENERATED_LISP) \
128            $(GENERATED_ELCS) $(GENERATED_LISP) $(AUTOLOAD_PATH)/_pkg.el
129    
130  # Non configurable portion follows  # Non configurable portion follows
131    
# Line 57  Line 135 
135  PWD      := $(shell pwd)  PWD      := $(shell pwd)
136    
137  .SUFFIXES:  .SUFFIXES:
138  .SUFFIXES: .html .info .txi .texi .texinfo .dvi .elc .el  .SUFFIXES: .html .info .txi .texi .texinfo .dvi .ps .pdf .elc .el
139    
140  FORMAT_INFO_LEVEL_3_USING_XEMACS_NO_SAVE_ARGS = -eval '(setq load-path (append (list "../../../xemacs-packages/texinfo" "../../../xemacs-packages/xemacs-base") load-path))' -l informat -l texinfmt -f texinfo-format-buffer  # STAGING is the top of the directory tree where a particular package's
141    # files are installed, or where tarballs are installed using `make bindist'.
142    
143  %-ja.info: %-ja.texi  # 'make bindist' needs STAGING to be set to NONMULE_INSTALLED_PACKAGES_ROOT
144          $(XEMACS) -batch -q -no-site-file -insert $< \  # if we are building a Mule package so we don't end up with 2 package-index
145    # files.
146    
147    ifeq ('$(MAKECMDGOALS)','bindist')
148    STAGING:= $(NONMULE_INSTALLED_PACKAGES_ROOT)
149    else
150     ifeq ('$(CATEGORY)','mule')
151    STAGING:= $(MULE_INSTALLED_PACKAGES_ROOT)
152     else
153    STAGING:= $(NONMULE_INSTALLED_PACKAGES_ROOT)
154     endif
155    endif
156    
157    #####################################
158    #            Handle docs            #
159    #####################################
160    
161    # If something goes wrong and $(STAGING) is blank, the commands below will
162    # attempt to install files into absolute paths /lisp/* and /etc/* -- not
163    # a good idea at all.
164    
165    check-staging:
166    ifeq ($(STAGING),)
167            $(error STAGING is not set; potential major filesystem trashing!  Fix this)
168    endif
169    
170    check-mule:
171    ifeq ($(CATEGORY),mule)
172    ifneq ($(BUILD_WITHOUT_MULE),)
173            $(error This package needs Mule support in order to be compiled)
174    endif
175    endif
176    
177    # Possibilities for building the docs:
178    #
179    # (1) EXPLICIT_DOCS = <texi files>
180    #     Build the specified .texi files.  Info and HTML files automatically
181    #     computed from the .texi files.
182    # (2) STANDARD_DOCS = t
183    #     Same as EXPLICIT_DOCS = $(PACKAGE).texi
184    # (3) Manual: Specify TEXI_FILES, INFO_FILES, INFO_DEP, HTML_FILES, and
185    #     HTML_DEP by yourself.  Do not explicitly add any doc targets to
186    #     compile::.
187    #
188    # When EXPLICIT_DOCS or STANDARD_DOCS is given:
189    #
190    # (1) you can specify other .texi files included in the files specified in
191    #     EXPLICIT_DOCS using EXTRA_TEXI_FILES (they will be listed as
192    #     dependencies of the info and html files)
193    # (2) you can specify extra .html output files using EXTRA_HTML_FILES
194    # (3) you can use `DOCS_TEXINFO_EXTENSION = t' to indicate that the
195    #     explicitly specified docs have .texinfo as the extension instead of
196    #    .texi.  Similarly for `DOCS_TXI_EXTENSION = t'.
197    #
198    # You can also specify EXTRA_DOC_FILES in all cases to indicate extra files
199    # to be copied into the man/ directory at installation time.
200    
201    ifeq ($(STANDARD_DOCS),t)
202    EXPLICIT_DOCS = $(PACKAGE).texi
203    endif
204    
205    ifneq ($(EXPLICIT_DOCS),)
206    ifeq ($(DOCS_TEXINFO_EXTENSION),t)
207    EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS:%.texinfo=%.texi)
208    else
209    ifeq ($(DOCS_TXI_EXTENSION),t)
210    EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS:%.txi=%.texi)
211    else
212    EXPLICIT_DOCS_AS_TEXI=$(EXPLICIT_DOCS)
213    endif
214    endif
215    
216    # Ensure the correct setting of $TEXI_FILES. --SY.
217    TEXI_FILES = $(EXPLICIT_DOCS)
218    ifeq ($(DOCS_TEXINFO_EXTENSION),t)
219      TEXI_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.texinfo)
220    endif
221    ifeq ($(DOCS_TXI_EXTIONSION),t)
222      TEXI_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.txi)
223    endif
224    
225    TEXI_FILES += $(EXTRA_TEXI_FILES)
226    INFO_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.info*)
227    INFO_DEP = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.info)
228    
229    $(INFO_DEP): $(EXTRA_TEXI_FILES)
230    
231    mostlyclean::
232            rm -f $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.toc) \
233            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.aux) \
234            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.oaux) \
235            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.log) \
236            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.cp) \
237            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.cps) \
238            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.fn) \
239            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.fns) \
240            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.tp) \
241            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.tps) \
242            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.vr) \
243            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.vrs) \
244            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.pg) \
245            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.pgs) \
246            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.ky) \
247            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.kys)
248    
249    clean::
250            rm -f $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.dvi) \
251            $(EXPLICIT_DOCS_AS_TEXI:%.texi=%.ps)
252    
253    HTML_FILES = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%*.html) $(EXTRA_HTML_FILES)
254    HTML_DEP = $(EXPLICIT_DOCS_AS_TEXI:%.texi=%_toc.html)
255    
256    $(HTML_DEP): $(EXTRA_TEXI_FILES)
257    
258    endif
259    
260    html: $(HTML_DEP)
261    
262    FORMAT_INFO_USING_XEMACS_NO_SAVE_ARGS = -eval '(setq load-path (append (list "$(XEMACS_PACKAGES_BASE)/xemacs-packages/texinfo" "$(XEMACS_PACKAGES_BASE)/xemacs-packages/xemacs-base") load-path))' -l informat -l texinfmt -f texinfo-format-buffer
263    
264    FORMAT_INFO_USING_XEMACS_ARGS = $(FORMAT_INFO_USING_XEMACS_NO_SAVE_ARGS) -f save-buffer
265    
266    FORMAT_INFO_USING_XEMACS = \
267            $(XEMACS) $(BATCH) -insert $< $(FORMAT_INFO_USING_XEMACS_ARGS)
268    
269    FORMAT_MULE_INFO_USING_XEMACS = \
270            $(XEMACS) $(BATCH) -insert $< \
271                  -eval '(unless (featurep (quote mule)) (kill-emacs 0))' \                  -eval '(unless (featurep (quote mule)) (kill-emacs 0))' \
272                  $(FORMAT_INFO_LEVEL_3_USING_XEMACS_NO_SAVE_ARGS) \                  -eval '(cd "$(<D)")' \
273                    $(FORMAT_INFO_USING_XEMACS_NO_SAVE_ARGS) \
274                  -eval '(setq file-coding-system (quote iso-2022-7))' \                  -eval '(setq file-coding-system (quote iso-2022-7))' \
275                  -eval '(save-buffer 0)'                  -eval '(save-buffer 0)'
276    
277  %.info: %.texi  # makeinfo doesn't seem able to handle Mule-formatted files correctly, so
278          $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<  # we need to use the texinfo package. #### Switch to UTF-8 and this should
279    # go away.
280    ifeq ($(COMPILE_INFO_AS_MULE),t)
281    FORMAT_INFO = $(FORMAT_MULE_INFO_USING_XEMACS)
282    else
283    FORMAT_INFO = cd $(@D) && $(MAKEINFO) $(MAKEINFO_FLAGS) -o $(@F) $(<F)
284    endif
285    
286  html: $(HTML_DEP)  %-ja.info: %-ja.texi
287  ifneq ($(HTML_FILES),)          $(FORMAT_MULE_INFO_USING_XEMACS)
288          @-mkdir -p $(STAGING)/html  
289    %.info: %.txi
290            $(FORMAT_INFO)
291    %.info: %.texi
292            $(FORMAT_INFO)
293    %.info: %.texinfo
294            $(FORMAT_INFO)
295    
296    ## Make sure to cd into the directory before running texi2html because it
297    ## puts its results in the current directory, not the directory of the
298    ## source file.
299    
300    #       V 1.56k (with Cygwin) does not allow -p flag.  Works fine without it.
301    #RUN_TEXI2HTML = cd $(@D) && $(TEXI2HTML) $(TEXI2HTML_FLAGS) -p $(<F)
302    RUN_TEXI2HTML = cd $(@D) && $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(<F)
303    
304    %_toc.html: %.txi
305            $(RUN_TEXI2HTML)
306    %_toc.html: %.texi
307            $(RUN_TEXI2HTML)
308    %_toc.html: %.texinfo
309            $(RUN_TEXI2HTML)
310    
311    # #### I'm not sure if this is correct.  xslt-process seems to think it
312    # needs to be run twice.
313    ifneq ($(TEXI2DVI),)
314    RUN_TEXI2DVI = cd $(@D) && $(TEXI2DVI) $(<F) && $(TEXI2DVI) $(<F)
315    else
316    RUN_TEXI2DVI = -
317  endif  endif
318  ifneq ($(HTML_FILES),)  
319          $(RCOPY) $(addprefix $(PWD)/, $(HTML_FILES)) $(STAGING)/html  %.dvi: %.txi
320            $(RUN_TEXI2DVI)
321    %.dvi: %.texi
322            $(RUN_TEXI2DVI)
323    %.dvi: %.texinfo
324            $(RUN_TEXI2DVI)
325    
326    ifneq ($(TEXI2PDF),)
327    RUN_TEXI2PDF = cd $(@D) && $(TEXI2PDF) $(<F)
328    else
329    RUN_TEXI2PDF = -
330  endif  endif
 %.html: %.txi  
         $(TEXI2HTML) $(TEXI2HTML_FLAGS) -p $* $<  
 %.html: %.texi  
         $(TEXI2HTML) $(TEXI2HTML_FLAGS) -p $* $<  
 %.html: %.texinfo  
         $(TEXI2HTML) $(TEXI2HTML_FLAGS) -p $* $<  
331    
332  FORMAT_INFO_USING_XEMACS_NO_SAVE_ARGS = -eval '(setq load-path (append (list "../../xemacs-packages/texinfo" "../../xemacs-packages/xemacs-base") load-path))' -l informat -l texinfmt -f texinfo-format-buffer  %.pdf: %.txi
333            $(RUN_TEXI2PDF)
334    %.pdf: %.texi
335            $(RUN_TEXI2PDF)
336    %.pdf: %.texinfo
337            $(RUN_TEXI2PDF)
338    
339  FORMAT_INFO_USING_XEMACS_ARGS = $(FORMAT_INFO_USING_XEMACS_NO_SAVE_ARGS) -f save-buffer  ifneq ($(DVIPS),)
340    RUN_DVIPS = cd $(@D) && $(DVIPS) -o $(@F) $(<F)
341    else
342    RUN_DVIPS = -
343    endif
344    
345    %.ps: %.dvi
346            $(RUN_DVIPS)
347    
348  ifeq ($(XEMACS_NATIVE_NT),t)  ifeq ($(XEMACS_NATIVE_NT),t)
349  # Convert UNIX-path (containing output of `pwd') to windows-path, so  # Convert UNIX-path (containing output of `pwd') to windows-path, so
# Line 108  Line 364 
364  endif  endif
365    
366  # Behaves like an XEmacs with the required packages setup  # Behaves like an XEmacs with the required packages setup
367  BOOT_XEMACS= $(XEMACS) -no-autoloads -batch -l $(PACKAGE_COMPILE) -- $(REQUIRES) -- $(PRELOADS)  BOOT_XEMACS= $(XEMACS) -no-autoloads $(BATCH) -l $(PACKAGE_COMPILE) -- $(REQUIRES) -- $(PRELOADS)
368    
369  %.elc: %.el  %.elc: %.el
370          $(BOOT_XEMACS) -f batch-byte-compile $<          $(BOOT_XEMACS) -f batch-byte-compile $<
371    
372  all:: $(AUTOLOAD_PATH)/_pkg.el  # compile must be :: because some packages (e.g. psgml-dtd?) put separate
373    # commands that apply only to those particular dependencies.
374    compile:: check-mule
375    
376  dist:: srckit binkit package-info  # Build the generated stuff if we're in the top-level of a package directory
377    # but not otherwise.
378    ifneq ($(PACKAGE),)
379    compile:: $(AUTOLOAD_PATH)/_pkg.el
380    endif
381    
382  clean::  ## first, the byte-compile the files generated earlier (auto-autoloads.el,
383          rm -f $(ELCS) $(HTML_FILES) $(INFO_FILES) \  ## etc.), now that we have all of them and hence can handle dependencies.
384          $(AUTOLOAD_PATH)/auto-autoloads.elc $(AUTOLOAD_PATH)/custom-load.elc \  ## then, generate and compile the other generated files.
385          $(EXTRA_OBJS) $(DEPENDS_FILE_NAME)  compile:: $(EARLY_GENERATED_ELCS) $(GENERATED_ELCS)
386    
387  mostlyclean: clean  ## now compile the main Lisp
388    compile:: $(ELCS) $(ELCS_1)
389    
390    ## now the docs, info format.
391    compile:: $(INFO_DEP)
392    
393    ## now the docs, html format (maybe).
394    ifeq ($(INSTALL_HTML),t)
395    compile:: html
396    endif
397    
398  extraclean: clean  ## now, any extra dependencies specified by the Makefiles.
399    compile:: $(EXTRA_DEPENDENCIES)
400    
401  # distclean is what you use when making a distribution.  it should be the  dist:: binkit package-info
402  # absolutely most aggressive clean target out there -- everything that  
403    mostlyclean::
404    
405    # Remove the generated files.
406    genclean:
407            rm -f $(GENERATED_LISP) $(EARLY_GENERATED_LISP) $(GENERATED_ELCS) $(EARLY_GENERATED_ELCS) package-info $(AUTOLOAD_PATH)/_pkg.el
408    
409    clean:: mostlyclean
410            rm -f $(GENERATED_ELCS) $(EARLY_GENERATED_ELCS) $(ELCS) $(ELCS_1) \
411            $(HTML_FILES) $(INFO_FILES) $(DEPENDS_FILE_NAME) $(EXTRA_DEPENDENCIES)
412    
413    # distclean is what you use when making a distribution.  everything that
414  # can get rebuilt should be killed.  everything.  # can get rebuilt should be killed.  everything.
415    
416  distclean:: extraclean  distclean:: clean genclean
417          rm -f core *~ $(AUTOLOAD_PATH)/auto-autoloads.el \  
418                  $(AUTOLOAD_PATH)/custom-load.el package-info \  # extraclean means distclean plus removal of backup files, etc.
419                  $(AUTOLOAD_PATH)/_pkg.el  extraclean: distclean
420            rm -f core *~ .*~ .\#*
421    
422  # elcclean is for when you want to rebuild after having made a small  # [[ elcclean is for when you want to rebuild after having made a small
423  # change, e.g. you cvs updated and got new versions of some files.  # change, e.g. you cvs updated and got new versions of some files.
424  # The problem is that if you just `make', you may have the situation  # The problem is that if you just `make', you may have the situation
425  # where a file that needs to be compiled depends on some other  # where a file that needs to be compiled depends on some other
# Line 144  Line 428 
428  # w.r.t the .el file, and you'd get the .elc file (missing the  # w.r.t the .el file, and you'd get the .elc file (missing the
429  # necessary features), and error.  So we remove the minimum number of  # necessary features), and error.  So we remove the minimum number of
430  # .elc required to ensure that the build will always succeed  # .elc required to ensure that the build will always succeed
431  # correctly.  # correctly. ]]
432    
433    # This is less of an issue now that we ignore out-of-date .elc files. --ben
434    
435  elcclean:  elcclean:
436          $(XEMACS) $(VANILLA) -batch -l $(PACKAGE_CLEAN)          $(XEMACS) $(BATCH) -l $(PACKAGE_CLEAN)
437    
438    GENERATED_ELC_DEPENDENCIES = $(ELCS:.elc=.el) $(ELCS_1:.elc=.el)
439    
440    ifeq ($(XEMACS_21_5),t)
441    $(AUTOLOAD_PATH)/auto-autoloads.el : $(GENERATED_ELC_DEPENDENCIES) $(AUTOLOAD_PATH)/_pkg.el
442            $(XEMACS) $(BATCH) -no-autoloads \
443                    -l autoload -f batch-update-directory-autoloads \
444                    $(PACKAGE) $(AUTOLOAD_PATH)
445            @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
446    
447    $(AUTOLOAD_PATH)/custom-defines.el : $(GENERATED_ELC_DEPENDENCIES)
448            $(XEMACS) $(BATCH) -no-autoloads \
449                    -l autoload -f batch-update-directory-custom-defines \
450                    $(PACKAGE) $(AUTOLOAD_PATH)
451            @rm -f $(AUTOLOAD_PATH)/custom-defines.el~
452    
 # XEmacs native MS Windows needs this quoting of command-line  
 # arguments due to basic differences in the handling of command-line  
 # arguments in Unix and MS Windows.  
 #### not any more, as of Cygwin 1.1.8-2 (Feb 2001) -- ben  
 ifeq ($(XEMACS_NATIVE_NT_NEEDS_EXTRA_QUOTING),t)  
 AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \\\"$(PACKAGE)\\\")  
 AUTOLOAD_FILE = (setq generated-autoload-file \  
         \\\"$(AUTOLOAD_PATH)/auto-autoloads.el\\\")  
453  else  else
454  AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"$(PACKAGE)\")  AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"$(PACKAGE)\")
455  AUTOLOAD_FILE = (setq generated-autoload-file \  AUTOLOAD_FILE = (setq generated-autoload-file \
456          \"$(AUTOLOAD_PATH)/auto-autoloads.el\")          \"$(AUTOLOAD_PATH)/auto-autoloads.el\")
 endif  
457    
458  $(AUTOLOAD_PATH)/auto-autoloads.el : $(ELCS:.elc=.el) $(AUTOLOAD_PATH)/_pkg.el  $(AUTOLOAD_PATH)/auto-autoloads.el : $(GENERATED_ELC_DEPENDENCIES) $(AUTOLOAD_PATH)/_pkg.el
459          $(XEMACS) $(VANILLA) -batch -no-autoloads \          $(XEMACS) $(BATCH) -no-autoloads \
460                  -eval "$(AUTOLOAD_PACKAGE_NAME)" \                  -eval "$(AUTOLOAD_PACKAGE_NAME)" \
461                  -eval "$(AUTOLOAD_FILE)" \                  -eval "$(AUTOLOAD_FILE)" \
462                  -l autoload -f batch-update-autoloads $^                  -l autoload -f batch-update-autoloads $^
463          @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~          @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
464    endif
465    
466  $(AUTOLOAD_PATH)/custom-load.el : $(ELCS:.elc=.el)  $(AUTOLOAD_PATH)/custom-load.el : $(GENERATED_ELC_DEPENDENCIES)
467          $(XEMACS) $(VANILLA) -batch -l cus-dep \          $(XEMACS) $(BATCH) -no-autoloads -l cus-dep \
468                  -f Custom-make-dependencies $(AUTOLOAD_PATH)                  -f Custom-make-dependencies $(AUTOLOAD_PATH)
469            @touch $(AUTOLOAD_PATH)/custom-load.el
470            @rm -f $(AUTOLOAD_PATH)/custom-load.el~
471    
472  pkg_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar  pkg_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-pkg.tar
473    
# Line 189  Line 484 
484  # Make the $(pkg_tar).gz first, then the $(pkg_tar).bz2  # Make the $(pkg_tar).gz first, then the $(pkg_tar).bz2
485  package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \  package-info : package-info.in Makefile $(AUTOLOAD_PATH)/_pkg.el \
486                  $(pkg_tar).gz $(pkg_tar).bz2                  $(pkg_tar).gz $(pkg_tar).bz2
487          $(XEMACS) $(VANILLA) -batch \          $(XEMACS) $(BATCH) \
488                  -l package-info.elc -f batch-update-package-info \                  -l package-info.elc -f batch-update-package-info \
489                  '$(VERSION)' $(PKG_TAR_GZ) \                  '$(VERSION)' $(PKG_TAR_GZ) \
490                  '$(REQUIRES)' \                  '$(REQUIRES)' \
491                  '$(AUTHOR_VERSION)' '$(MAINTAINER)' '$(CATEGORY)'                  '$(AUTHOR_VERSION)' '$(MAINTAINER)' '$(CATEGORY)'
492          $(XEMACS) $(VANILLA) -batch \          $(XEMACS) $(BATCH) \
493                  -l ../../hack-package-index.el -f batch-hack-package-index \                  -l ../../hack-package-index.el -f batch-hack-package-index \
494                          $(PACKAGE) package-info $(PACKAGE_INFO)                          $(PACKAGE) package-info $(PACKAGE_INFO) $(CATEGORY)
495    
496  ifeq ($(BUILD_TARS),t)  ifeq ($(BUILD_TARS),t)
497  $(pkg_tar): $(STAGING)/$(MANIFEST)  $(pkg_tar): $(STAGING)/$(MANIFEST)
# Line 233  Line 528 
528          touch $@          touch $@
529  endif # BUILD_TARS ?  endif # BUILD_TARS ?
530    
531    ifeq ($(AUTHOR_VERSION),)
532    AUTHOR_VERSION = No-Upstream-Ver
533    endif
534    
535  $(AUTOLOAD_PATH)/_pkg.el: Makefile  $(AUTOLOAD_PATH)/_pkg.el: Makefile
536          @echo Creating $(AUTOLOAD_PATH)/_pkg.el          @echo Creating $(AUTOLOAD_PATH)/_pkg.el
537          @echo ";;;###autoload" > $(AUTOLOAD_PATH)/_pkg.el          @echo ";;;###autoload" > $(AUTOLOAD_PATH)/_pkg.el
538          @echo "(package-provide '$(PACKAGE)" >> $(AUTOLOAD_PATH)/_pkg.el          @echo "(package-provide '$(PACKAGE)" >> $(AUTOLOAD_PATH)/_pkg.el
539          @echo "          :version $(VERSION)" >> $(AUTOLOAD_PATH)/_pkg.el          @echo "          :version $(VERSION)" >> $(AUTOLOAD_PATH)/_pkg.el
540            @echo "          :author-version \"$(AUTHOR_VERSION)\"" >> $(AUTOLOAD_PATH)/_pkg.el
541          @echo "          :type '$(PKG_TYPE))" >> $(AUTOLOAD_PATH)/_pkg.el          @echo "          :type '$(PKG_TYPE))" >> $(AUTOLOAD_PATH)/_pkg.el
542    ifneq ($(PACKAGE_SUPPRESS),)
543  .PHONY: srckit-std          @echo "" >> $(AUTOLOAD_PATH)/_pkg.el
544  .PHONY: binkit-sourceonly binkit-sourceinfo binkit-sourcedata binkit-sourcedatainfo          @echo ";;;###autoload" >> $(AUTOLOAD_PATH)/_pkg.el
545  .PHONY: bindist install autoloads          @echo "(when (fboundp 'package-suppress)" >> $(AUTOLOAD_PATH)/_pkg.el
546            @echo "      $(PACKAGE_SUPPRESS)" >> $(AUTOLOAD_PATH)/_pkg.el
547  bindist: binkit package-info setup-info          @echo ")" >> $(AUTOLOAD_PATH)/_pkg.el
548    endif
549    
550  setup-info:  setup-info:
551          $(XEMACS) $(VANILLA) -batch -l $(PACKAGE_NET_PACKAGES) \          $(XEMACS) $(BATCH) -l $(PACKAGE_NET_PACKAGES) \
552                  -l $(PACKAGE_INFO) \                  -l $(PACKAGE_INFO) \
553                  -f package-net-packages-batch-convert-index-to-ini $(PACKAGE_STAGING)                  -f package-net-packages-batch-convert-index-to-ini $(PACKAGE_STAGING) $(CATEGORY)
554    
555  install: binkit  .PHONY: binkit-with-html install-for-bindist autoloads
556    
557  autoloads: $(AUTOLOAD_PATH)/auto-autoloads.el  # A target that _only_ installs and doesn't build _anything_
558    install-only: binkit
559    
560  src_tar = $(STAGING)/$(PACKAGE)-$(VERSION)-src.tar  binkit: binkit-1
561    
562  srckit-std: distclean  ifeq ($(INSTALL_HTML),t)
563          if [ ! -d $(STAGING) ]; then mkdir -p $(STAGING); fi  binkit:: install-html
564    endif
565    
566          (cd ../..;                              \  binkit-with-html: binkit-1 install-html
           rm -f $(src_tar)*;                    \  
           $(TAR) $(EXCLUDES) --create --owner=0 --group=0 --file $(src_tar) \  
                 $(CATEGORY)/$(PACKAGE))  
567    
568          gzip -cv9 $(src_tar) > $(src_tar).gz  install-for-bindist: binkit package-info setup-info
569    
570  ifneq ($(BZIP2),)  ## Do not byte-compile as that could require stuff from elsewhere, and you
571          $(BZIP2) -v9 $(src_tar);  ## get dependency circles.
572  endif  autoloads: $(EARLY_GENERATED_LISP)
         rm -f $(src_tar)  
573    
574    binkit-1: check-staging
 binkit-common: all  
575          (if test -d $(STAGING); then            \          (if test -d $(STAGING); then            \
576                  cd $(STAGING);                  \                  cd $(STAGING);                  \
577                  if test -f $(MANIFEST); then    \                  if test -f $(MANIFEST); then    \
578                          rm -rf `cat $(MANIFEST)`; \                          rm -rf `cat $(MANIFEST)`; \
579                  fi;                             \                  fi;                             \
580          fi;)          fi;)
581  #ifneq ($(ELCS),)  ifneq ($(PACKAGE),)
582          @-mkdir -p $(STAGING)/lisp/$(PACKAGE)          @-mkdir -p $(STAGING)/lisp/$(PACKAGE)
583  #endif  endif
584  ifneq ($(ELCS_1),)  ifneq ($(ELCS_1),)
585          @-mkdir -p $(STAGING)/lisp/$(ELCS_1_DEST)          @-mkdir -p $(STAGING)/lisp/$(ELCS_1_DEST)
586  endif  endif
# Line 403  Line 700 
700          @-mkdir -p $(STAGING)/lib-src          @-mkdir -p $(STAGING)/lib-src
701  endif  endif
702          @-mkdir -p $(STAGING)/pkginfo          @-mkdir -p $(STAGING)/pkginfo
703  ifneq ($(ELCS),)  ifneq ($(PACKAGE),)
704          $(RCOPY) $(addprefix $(PWD)/, ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES)) \          $(RCOPY) $(addprefix $(PWD)/, ChangeLog $(SOURCE_FILES_TO_COPY) $(EXTRA_SOURCES)) \
705            $(STAGING)/lisp/$(PACKAGE)            $(STAGING)/lisp/$(PACKAGE)
706  endif  endif
# Line 413  Line 710 
710  ifneq ($(INFO_FILES),)  ifneq ($(INFO_FILES),)
711          $(RCOPY) $(addprefix $(PWD)/, $(INFO_FILES)) $(STAGING)/info          $(RCOPY) $(addprefix $(PWD)/, $(INFO_FILES)) $(STAGING)/info
712          $(RCOPY) $(addprefix $(PWD)/, $(TEXI_FILES)) $(STAGING)/man/$(PACKAGE)          $(RCOPY) $(addprefix $(PWD)/, $(TEXI_FILES)) $(STAGING)/man/$(PACKAGE)
713    ifneq ($(EXTRA_DOC_FILES),)
714            $(RCOPY) $(addprefix $(PWD)/, $(EXTRA_DOC_FILES)) $(STAGING)/man/$(PACKAGE)
715    endif
716  endif  endif
717  ifneq ($(DATA_FILES),)  ifneq ($(DATA_FILES),)
718          $(RCOPY) $(addprefix $(PWD)/, $(DATA_FILES)) $(STAGING)/etc/$(DATA_DEST)          $(RCOPY) $(addprefix $(PWD)/, $(DATA_FILES)) $(STAGING)/etc/$(DATA_DEST)
# Line 527  Line 827 
827  endif  endif
828          (cd $(STAGING); \          (cd $(STAGING); \
829          ls -1 $(MANIFEST) > $(MANIFEST))          ls -1 $(MANIFEST) > $(MANIFEST))
830  ifneq ($(ELCS),)  ifneq ($(PACKAGE),)
831          @(cd $(STAGING); \          @(cd $(STAGING); \
832          ls -1 lisp/$(PACKAGE)/ChangeLog \          ls -1 lisp/$(PACKAGE)/ChangeLog \
833                  $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(SOURCE_FILES_TO_COPY))) \                  $(patsubst %, lisp/$(PACKAGE)/%, $(notdir $(SOURCE_FILES_TO_COPY))) \
# Line 729  Line 1029 
1029          ls -1 $(patsubst %,lib-src/%, $(notdir $(LIBSRC_FILES))) >> $(MANIFEST))          ls -1 $(patsubst %,lib-src/%, $(notdir $(LIBSRC_FILES))) >> $(MANIFEST))
1030  endif  endif
1031    
1032    install-html: html check-staging
1033  binkit-sourceonly: binkit-common  ifneq ($(HTML_FILES),)
1034            @-mkdir -p $(STAGING)/html
1035  binkit-sourceinfo: binkit-common          @-mkdir -p $(STAGING)/pkginfo
1036            $(RCOPY) $(addprefix $(PWD)/, $(HTML_FILES)) $(STAGING)/html
1037  binkit-sourcedata: binkit-common          @(cd $(STAGING); \
1038            ls -1 $(patsubst %,html/%, $(notdir $(HTML_FILES))) >> $(MANIFEST))
1039  binkit-sourcedatainfo: binkit-common  endif
1040    
1041  # Export dependencies for outer make file usage  # Export dependencies for outer make file usage
1042    

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.52

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