annotate man/lispref/packaging.texi @ 1105:2b02bbc13e76

[xemacs-hg @ 2002-11-12 22:53:40 by youngs] Update xemacs_extra_name.
author youngs
date Tue, 12 Nov 2002 22:53:40 +0000
parents 37e56e920ac5
children 138c42c84aec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1 @c -*-texinfo-*-
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
3 @c Copyright (C) 2001 Free Software Foundation, Inc.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
4 @c See the file lispref.texi for copying conditions.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
5
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
6 @setfilename ../../info/packaging.info
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
7
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
8 @c Macro to make formatting of the XEmacs pms name consistent.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
9 @c Maybe @sc looks OK in HTML? If so, condition on Info.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
10 @iftex
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
11 @macro xpms
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
12 XE@sc{macs} Packaging System
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
13 @end macro
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
14 @end iftex
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
15 @ifnottex
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
16 @macro xpms
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
17 XEmacs Packaging System
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
18 @end macro
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
19 @end ifnottex
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
20
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
21 @node Packaging, Lisp Data Types, Introduction, Top
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
22 @chapter The @xpms{}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
23 @cindex package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
24 @cindex packaging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
25
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
26 The XEmacs distribution, starting with version 21, comes only with a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
27 very basic set of built-in modes and libraries. Most of the libraries
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
28 that were part of the distribution of earlier versions of XEmacs are now
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
29 available separately. The user as well as the system administrator can
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
30 choose which packages to install; the actual installation process is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
31 easy. This gives an installer the ability to tailor an XEmacs
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
32 installation for local needs with safe removal of unnecessary code.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
33
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
34 This chapter describes how to package Lisp libraries for use with the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
35 @xpms{}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
36
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
37 @emph{Please note carefully} that the term @dfn{package} as used in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
38 XEmacs refers to an aggregation of Lisp code and/or data distributed as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
39 a unit. It does not, as it does in many Lisps, refer to a way of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
40 creating separate name spaces. XEmacs has no facility for providing
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
41 separate name spaces. (If we ever do get separate name spaces, we'll
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
42 probably regret overloading the nomenclature in this way, but it's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
43 become established.)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
44
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
45 @menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
46 Introduction:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
47 * Package Overview:: Lisp Libraries and Packages.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
48
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
49 Packaging Lisp Libraries:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
50 * Package Terminology:: Basic stuff.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
51 * Building Packages:: Turn packaged source into a tarball.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
52 * Local.rules File:: Tell the @xpms{} about your host.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
53 * Creating Packages:: Tell the @xpms{} about your package.
752
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
54 * Documenting Packages:: Explain your package to users and hackers.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
55 @c * History:: History of the @xpms{}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
56 @c * Installation:: Installing the @xpms{} with your (X)Emacs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
57 @c * Configuration:: Configuring the @xpms{} for use.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
58 @c * Usage:: An overview of the operation of the @xpms{}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
59 @c * Bug Reports:: Reporting Bugs and Problems
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
60 @c * Frequently Asked Questions:: Questions and answers from the mailing list.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
61
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
62 Internals and Package Release Engineering:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
63 * Issues::
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
64 @end menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
65
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
66 @node Package Overview, Package Terminology, , Packaging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
67 @chapter An overview of the @xpms{}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
68
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
69 The @xpms{} is a system for administering the installation, upgrade, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
70 removal of Lisp libraries. For the end user, it provides facilities for
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
71 determining availability of packages and which versions at remote
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
72 sites. It will download and automatically install a package, ensuring
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
73 that any old files from previous versions of the package are removed
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
74 first. By providing a standard set of hierarchies for installation, it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
75 makes configuration of XEmacs simpler. Furthermore, packages normally
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
76 provide ancillary auto-autoloads and custom-loads libraries, which are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
77 automatically detected and loaded by XEmacs upon startup. This means
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
78 that once installed, all facilities of package, including autoloading
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
79 the library upon invocation of a command provided by the library and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
80 convenient configuration and customization, are automatically available
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
81 to the user. There is no need to add autoloads or keybindings to in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
82 init file, and structured configuration of the package is available
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
83 through the Customize system even before the libraries are loaded.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
84
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
85 All of this convenience comes at a cost. The cost of administration at
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
86 the package level is negligible compared to the benefits, of course.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
87 However, the requirement that XEmacs find and load auto-autoloads and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
88 custom-loads libraries comes at a fairly large cost in startup time. In
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
89 order to reduce this cost, XEmacs imposes fairly strict conditions on
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
90 the structure of an installed package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
91
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
92 Meeting these requirements, as well as simply providing the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
93 auto-autoloads and the information about availability and so on does
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
94 impose some costs on the library maintainer. The @xpms{} also provides
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
95 structure and utilities to the library maintainer to make these tasks
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
96 easier. This manual documents the requirements and the tools that the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
97 @xpms{} provides to ensure that a package satisfies them.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
98
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
99 @menu
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
100 * The User View::
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
101 * The Library Maintainer View::
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
102 * The Package Release Engineer View::
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
103 @end menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
104
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
105
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
106 @node The User View, The Library Maintainer View, , Package Overview
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
107 @section The User View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
108
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
109 @strong{N.B.} Much of the discussion in this section undoubtedly
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
110 belongs elsewhere, @ref{Packages,,,xemacs}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
111
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
112 From the user's point of view, an XEmacs binary package is simply a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
113 standard tarball (usually gzipped) containing Lisp sources, compiled
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
114 Lisp, documentation, and possibly data files or supporting executables.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
115 The tarball is unpacked using standard tools such as GNU tar and gzip.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
116 The package system does impose certain requirements for automatic
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
117 configuration to work.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
118
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
119 Here the main consideration is that the tarball ``expects'' to be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
120 unpacked from the top of a package hierarchy. A @dfn{package hierarchy}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
121 is basically an image of a classic Emacs ``run-in-place'' tree, with
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
122 @file{lisp}, @file{etc}, @file{info}, @file{man}, @file{lib-src}, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
123 @file{pkginfo} subdirectories of the top. The @file{pkginfo}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
124 subdirectory is for use by the @xpms{} administration tools, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
125 currently contains a @file{MANIFEST.@var{package-name}} file for each
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
126 package to ensure that no cruft remains when a package is removed or
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
127 updated. The @file{lisp}, @file{etc}, and @file{lib-src} subdirectories
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
128 are further subdivided, with a subdirectory for each package. The
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
129 @file{info} directory obeys the usual conventions.
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
130 @emph{I.e.}, the @file{info} directory is flat
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
131 with a(n) (optional) @file{dir} file and one (set of) info file(s) per
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
132 package. The @file{man} subdirectory typically contains documentation
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
133 sources, separated by package. (It does not contain @file{man(1)}
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
134 pages, as Emacs provides very few of them.)
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
135
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
136 There are several standard package hierarchies, and administrators can
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
137 configure others at build time, while users can configure others at run
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
138 time. The standard system hierarchies are all subdirectories of an
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
139 @c #### This is possibly incorrect usage of "installation root."
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
140 XEmacs installation root, typically @file{/usr/local/lib/xemacs/}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
141 These are the @file{xemacs-packages}, @file{mule-packages},
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
142 @file{infodock-packages}, and @file{site-packages} hierarchies. Each
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
143 has the structure described above, but the purposes differ. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
144 @file{xemacs-packages} is the normal place for installing ``official''
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
145 packages and many third-party libraries. Unfortunately, it is not yet
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
146 quite possible to read libraries containing international characters
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
147 with a non-Mule XEmacs, so such libraries are sequestered in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
148 @file{mule-packages} hierarchy. Some packages are compatible only with
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
149 the Infodock development environment, and they will be installed in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
150 @file{infodock-packages} hierarchy. The @file{site-packages} hierarchy
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
151 is for packages not distributed by XEmacs.org, typically locally
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
152 developed.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
153
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
154 Packages are in principle supposed to be XEmacs version-independent, but
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
155 if such dependencies are unavoidable, additional standard package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
156 hierarchies may be installed under version directories, @emph{e.g.}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
157 @file{/usr/local/lib/xemacs-21.4.6/}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
158
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
159 Users who do not have sufficient privilege to install packages in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
160 system hierarchies may install package hierarchies under
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
161 @file{~/.xemacs}. At present only the @file{xemacs-packages} and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
162 @file{mule-packages} hierarchies are supported, but it might make sense
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
163 to extend this to support @file{infodock-packages} and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
164 @file{site-packages} hierarchies in the future.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
165
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
166 The package hierarchies are not searched directly for libraries to be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
167 loaded; this would be very costly. Instead, the hierarchies are ordered
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
168 according to certain rules, and searched for package lisp directories at
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
169 invocation. These directories are added to the general
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
170 @code{load-path}. As usual, it is @code{load-path} that is searched at
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
171 run-time. This approach is somewhat costly at initialization, but
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
172 results in a very ``clean'' @code{load-path}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
173
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
174 The order of search can be changed at build time by specifying the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
175 @samp{--package-path} option to @file{configure}, or at run-time by
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
176 specifying the @code{EMACSPACKAGEPATH} environment variable.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
177 @xref{Packages,,,xemacs}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
178
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
179 @c #### The following description is quite possibly inaccurate.
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
180 @c Please, Michael, write some specs up!
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
181 The default order of search is hierarchically determined. First, the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
182 roots are ordered. The @dfn{early} roots are the user-specific roots,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
183 typically @file{~/.xemacs}. The @dfn{late} roots are the system roots,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
184 typically @file{/usr/local/lib/xemacs-21.4.6} and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
185 @file{/usr/local/lib/xemacs}, in that order. All hierarchies for a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
186 given root are searched for package Lisp directories, which are appended
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
187 to @code{load-path} in the order found. Then the search proceeds to the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
188 next root, whose results will be appended to the @code{load-path}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
189 generated by previous roots.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
190
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
191 Second, the hierarchies below each root are searched in the order
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
192 @file{site-packages}, @file{infodock-packages}, @file{mule-packages},
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
193 then @file{xemacs-packages}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
194
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
195 In each hierarchy there should be a @file{lisp} subdirectory, containing
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
196 directories named for the packages. Each package's Lisp libraries thus
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
197 are contained in a directory of the form
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
198 @var{root}/@var{hierarchy}/lisp/@var{package}/.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
199
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
200 With such a complex search algorithm, the possibility of libraries being
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
201 shadowed by another library with the same name is quite real. There are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
202 two considerations here. First, every XEmacs package contains certain
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
203 libraries with constant names. These are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
204
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
205 @table @file
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
206 @item _pkg.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
207 Lisp code to inform the package administration system about the package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
208
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
209 @item auto-autoloads.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
210 Lisp code to set up autoloaded functions and variables that may be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
211 needed at load time
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
212
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
213 @item custom-load.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
214 definitions of configuration variables for use with the Customize
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
215 system.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
216 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
217
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
218 They are special-cased, because the way they are used prevents shadowing
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
219 from being an issue.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
220
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
221 Second, it is possible that multiple copies of some library, or
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
222 different libraries with the same name, are installed in various places
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
223 in the hierarchies. To detect such shadows, use
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
224 @code{list-load-path-shadows}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
225
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
226 Finally, note that most basic Emacs functionality, including most of the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
227 Lisp API, is implemented in Lisp libraries. Because they use internal
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
228 reserved APIs that are subject to change according the needs of the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
229 developers, these libraries are distributed with the XEmacs binary, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
230 are called @dfn{core Lisp libraries}. Most core Lisp libraries are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
231 ``preloaded'' into the Emacs binary and in normal usage are never
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
232 explicitly loaded. However, they can be explicitly loaded, and if so
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
233 they are searched on @code{load-path}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
234 @c #### Is this correct? It is not for C-h f, for example.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
235 Furthermore, functions such as @code{locate-library} will also search on
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
236 the @code{load-path}. The searching takes place under somewhat
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
237 different rules from those used for packaged Lisp. It is probably
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
238 easiest to think of the package hierarchy searching algorithm as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
239 receiving a @code{load-path} initialized to the core Lisp directories.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
240
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
241
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
242 @node The Library Maintainer View, The Package Release Engineer View, The User View, Package Overview
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
243 @section The Library Maintainer View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
244
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
245 From the library maintainer's viewpoint, the advantages to the @xpms{}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
246 stem from the convenience to the user of installation and upgrade.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
247 Since an installed package automatically registers its entry points via
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
248 autoload and its configuration variables with the Customize system,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
249 configuration FAQs are reduced. When it's easy to upgrade, users learn
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
250 to try @samp{Tools | Packages | Update Installed Packages} before
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
251 posting a FAQ whose answer is ``long since fixed, please upgrade.''
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
252
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
253 This comes at some cost, as the library maintainer needs to arrange that
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
254 the package be installed in a directory structure that satisfies the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
255 requirements of the @xpms{}. Autoload cookies and defcustoms must also
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
256 be added to existing libraries. The @xpms{} provides infrastructure to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
257 assure that all of these annoyances need only be dealt with once. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
258 autoload cookies and defcustoms are beyond the scope of this chapter, but
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
259 most maintainers of modern packages are already familiar with these
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
260 mechanisms.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
261
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
262 The @xpms{} may be divided into the @dfn{infrastructure} common to all
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
263 packages, and the package-specific @dfn{control files}. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
264 infrastructure supports global builds, installation, and generation of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
265 the ``sumo'' bundles of packages, as well as generation of individual
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
266 packages. The package control files describe the structure of the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
267 package's source tree and provide administrative information.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
268
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
269 @menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
270 * Infrastructure:: Global Makefiles and common rules.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
271 * Control Files:: Package-specific Makefiles and administrative files.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
272 * Obtaining:: Obtaining the @xpms{} and required utilities.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
273 @end menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
274
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
275 @node Infrastructure, Control Files, , The Library Maintainer View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
276 @subsection Infrastructure
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
277
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
278 In order to get the greatest benefit from the @xpms{}, a library
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
279 maintainer should place the package sources in an appropriate place in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
280 the XEmacs source package hierarchy, and arrange to have the source
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
281 package imported into the XEmacs CVS repository.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
282 @c #### the parenthetical remark should go to "issues."
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
283 (We realize that the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
284 latter requirement can be quite burdensome. We are working on ways to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
285 remove this requirement, but for the present it remains necessary.) The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
286 library maintainer must also keep sources for any packages his/her
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
287 package requires. This requirement is somewhat burdensome, but unlikely
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
288 to be relaxed because of the implementation of compilation of macros in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
289 Emacs Lisp. Macros cannot be called by compiled Lisp (the macro
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
290 expansion, which is always known at compile time, is inlined), so the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
291 source of the macro must be loaded before compiling the called function.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
292
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
293 The source package hierarchy may be rooted anywhere. The CVS module is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
294 called ``packages,'' so we will refer to the top directory of the source
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
295 package hierarchy as ``the @file{packages} directory.'' The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
296 @file{packages} directory contains two source subdirectories,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
297 @file{xemacs-packages} and @file{mule-packages} (for convenience in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
298 segregating the packages which depend on Mule, as they will cause
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
299 load-time errors in a non-Mule XEmacs). Each subdirectory contains many
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
300 package source directories, whose internal structure is not specified.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
301 That structure is left up to the convenience of the library maintainers.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
302 The requirements on the top directory of an individual package source
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
303 tree are given below, @ref{Control Files}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
304
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
305 The @file{packages} directory contains some auxiliary Lisp libraries
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
306 used in the compilation and packaging process. The content of these
761
c35d5f033651 [xemacs-hg @ 2002-03-03 09:09:27 by adrian]
adrian
parents: 759
diff changeset
307 libraries is of interest primarily to the packaging engineers, @ref{The
c35d5f033651 [xemacs-hg @ 2002-03-03 09:09:27 by adrian]
adrian
parents: 759
diff changeset
308 Package Release Engineer View}.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
309
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
310 Finally, the @file{packages}, @file{packages/xemacs-packages}, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
311 @file{packages/mule-packages} directories contain @file{Makefile}s and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
312 include files to control the package creation process. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
313 @file{Makefile}s in @file{packages/xemacs-packages} and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
314 @file{packages/mule-packages} simply define the default sets of known
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
315 packages and include @file{../iterate.rules}, which implements recursive
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
316 building of all target packages.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
317
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
318 The @samp{make} infrastructure in @file{packages} includes
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
319
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
320 @table @file
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
321 @item Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
322 controls building of individual packages, local installation, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
323 bundling of ``sumo'' tarballs
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
324
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
325 @item iterate.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
326 controls recursive builds of multiple packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
327
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
328 @item XEmacs.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
329 provides the rules for building and packaging. Included by all package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
330 @file{Makefile}s.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
331
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
332 @item Local.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
333 provides local configuration, such as installation targets and staging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
334 directories, as well as a number of kludges (many now obsolete) required
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
335 for building packages on the Windows platform.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
336
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
337 @item Local.rules.template
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
338 a template for Local.rules, liberally commented
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
339
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
340 @item Local.rules.mk
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
341 consistency checking for @file{Local.rules}, included by both the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
342 top-level @file{Makefile} and by @file{XEmacs.rules}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
343
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
344 @c #### Add to "issues"
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
345 @item package-compile.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
346 compile environment (@emph{e.g.}, load-path) setup. It is very bogus
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
347 that this is here, an alternative mechanism is likely to be provided.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
348 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
349
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
350 Of these, only @file{Local.rules} and @file{package-compile.el} need to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
351 be modified by the library maintainer. The changes to Local.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
352 affect only your environment. This should need to be done only once
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
353 when first preparing the source environment. The necessary
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
354 modifications to @file{package-compile.el} need to be done for each
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
355 package and are discussed in the next section, @ref{Control Files}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
356
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
357
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
358 @node Control Files, Obtaining, Infrastructure, The Library Maintainer View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
359 @subsection Control Files
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
360
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
361 Each package source must contain a number of control files in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
362 top-level directory. These files in general can be created and then
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
363 ignored, except for a few variables that need to be updated when new
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
364 versions are released. In most cases even adding, renaming, and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
365 removing library source files can be handled by generic rules.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
366
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
367 The package control files include
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
368
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
369 @table @file
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
370 @item Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
371 Must set a few @file{make} variables used by the administrative
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
372 utilities, and defines a couple of package-building targets to depend on
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
373 appropriate targets defined generically in @file{XEmacs.rules}. It may
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
374 also provide various variables and rules to transform the source tree
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
375 structure into that expected by the run-time system.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
376
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
377 @item package-info.in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
378 Provides a template for package information to be provided to the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
379 administrative utilities. Static variables that are rarely changed
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
380 (such as the package's name) are entered as literals. Some variables
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
381 are generated by the build process (build dates and MD5 checksums) and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
382 are automatically filled in. Finally, some variables that change
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
383 irregularly (dependences and even version numbers) are set as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
384 @file{make} variables in the @file{Makefile}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
385
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
386 @item ChangeLog
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
387 Not strictly required, but normally a ChangeLog will be added by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
388 XEmacs package maintainer if different from the upstream maintainer.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
389
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
390 @item package-compile.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
391 compile environment (@emph{e.g.}, load-path) setup. It is very bogus
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
392 that this is here, an alternative mechanism is likely to be provided.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
393
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
394 @item _pkg.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
395 Generated. Simply does a @code{package-provide} for the package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
396
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
397 @item _auto-autoloads.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
398 Generated. Read when XEmacs is initialized, and provides autoloads for
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
399 all defuns and other specially-marked forms in the sources.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
400
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
401 @item custom-loads.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
402 Generated. Read when XEmacs is initialized, and informs the Customize
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
403 subsystem how to find the defcustom forms needed to create Customization
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
404 forms for the usre configuration variables of the package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
405 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
406
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
407
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
408 @node Obtaining, , Control Files, The Library Maintainer View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
409 @subsection Obtaining the @xpms{} and Required Utilities
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
410
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
411 Currently both the infrastructure for creating XEmacs packages and the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
412 package sources themselves are available only by CVS. See
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
413 @uref{http://www.xemacs.org/Develop/cvsaccess.html} for more
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
414 intformation.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
415
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
416 The @xpms{} currently requires GNU @file{make}, and probably XEmacs, to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
417 build packages.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
418
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
419
759
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
420 @node The Package Release Engineer View, , The Library Maintainer View, Package Overview
7b0e9f17fcf0 [xemacs-hg @ 2002-02-28 03:55:16 by stephent]
stephent
parents: 752
diff changeset
421 @subsection The Package Release Engineer View
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
422
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
423 The XEmacs Package Release Engineer is responsible for keeping the
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
424 system coherent. The changes to @file{packages/package-compile.el} and
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
425 @file{packages/xemacs-packages/Makefile} required to make the package
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
426 available to others, and for building SUMO tarballs, @emph{etc}, are
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
427 done by the Package Release Engineer, not individual library
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
428 maintainers.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
429
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
430 The Package Release Engineer also maintains assorted infrastructure for
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
431 actually making releases. These are generally available for inspection
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
432 in the @code{xemacs-builds} module in the CVS repository.
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
433
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
434 @c #### To be completed.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
435
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
436
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
437 @c #### The following section is lifted verbatim from the XEmacs User's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
438 @c Manual, file packages.texi.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
439 @node Package Terminology, Building Packages, Package Overview, Packaging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
440 @comment node-name, next, previous, up
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
441 @heading Package Terminology:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
442
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
443 @subsection Libraries and Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
444 @cindex library
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
445 @cindex package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
446
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
447 A Lisp @dfn{library} is a single loadable file containing Lisp code. It
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
448 may be in source or byte-compiled form. A Lisp @dfn{package} is a set
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
449 of one or more libraries, usually related to each other in some way,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
450 bundled with administrative information for convenient distribution.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
451
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
452 @subsection Package Flavors
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
453
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
454 There are two main flavors of packages.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
455
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
456 @table @strong
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
457 @item Regular Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
458 @cindex regular package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
459 A regular package is a set of Lisp libraries design to cooperate with
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
460 one another. A very complex example is Gnus. One may not in general
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
461 safely remove any of the component libraries.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
462
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
463 @item Single-File Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
464 @cindex single-file package
901
37e56e920ac5 [xemacs-hg @ 2002-07-05 20:35:47 by adrian]
adrian
parents: 861
diff changeset
465 A single-file package is a collection of thematically related but
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
466 otherwise independent Lisp libraries. These libraries are bundled
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
467 together for convenience of the maintainers. Usually individual
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
468 libraries may be deleted at will without any loss of functionality of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
469 other libraries in the package. However, we would recommend that you
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
470 follow this rule of thumb: "When in doubt, don't delete". If it's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
471 really that big a deal, request that the maintainers split the package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
472 into smaller aggregations.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
473 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
474
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
475 @subsection Package Distributions
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
476 @cindex package distributions
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
477 @cindex binary packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
478 @cindex source packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
479 XEmacs Lisp packages are distributed in two ways. @dfn{Binary packages}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
480 are used by system administrators and end users. They are packaged in a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
481 form convenient for direct installation into an XEmacs package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
482 hierarchy. @dfn{Source packages} are for developers and include all
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
483 files necessary for rebuilding byte-compiled lisp and creating tarballs
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
484 for distribution or installation. This is all of the package author's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
485 source code plus all of the files necessary to build distribution
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
486 tarballs (Unix Tar format files, gzipped for space savings).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
487 @c #### This next is an Evile Practice and should be discontinued.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
488 (Occasionally sources that are not relevant to XEmacs are removed.)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
489
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
490 Currently, source packages are only available via CVS. See
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
491 @url{http://www.xemacs.org/Develop/cvsaccess.html} for details.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
492
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
493 The package distributions are also split according to major features
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
494 required in XEmacs to support them. At present there are @dfn{generic}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
495 packages, which can be loaded by @emph{any} XEmacs, and @dfn{Mule}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
496 packages, which @emph{require} Mule support or they will cause errors
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
497 when loaded. Note that there is no guarantee that a generic package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
498 will have any useful functionality in a minimally configured XEmacs. As
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
499 long as any XEmacs can successfully load the package's libraries
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
500 (perhaps given other required Lisp libraries), it will be classified as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
501 generic. At the present time only Mule packages need be treated
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
502 specially, and even those only if they contain multibyte characters.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
503
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
504
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
505 @c #### The following section is lifted verbatim from the XEmacs User's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
506 @c Manual, file packages.texi.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
507 @node Building Packages, Local.rules File, Package Terminology, Packaging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
508 @comment node-name, next, previous, up
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
509 @cindex building packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
510 @cindex package building
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
511 @heading Building Packages:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
512 Currently, source packages are only available via anonymous CVS. See
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
513 @url{http://www.xemacs.org/Develop/cvsaccess.html} for details of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
514 checking out the @file{packages} module.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
515
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
516 @subsection Prerequisites for Building Source Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
517
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
518 @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
519 @item GNU cp
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
520 @item GNU install
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
521 (or a BSD compatible install program).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
522 @item GNU make
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
523 (3.75 or later preferred).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
524 @item makeinfo
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
525 (1.68 from texinfo-3.11 or later required, 1.69 from Texinfo 4 preferred).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
526 @item GNU tar
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
527 (or equivalent).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
528 @item GNU gzip
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
529 (or equivalent).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
530 @item A properly configured @file{Local.rules} file.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
531 @ref{Local.rules File}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
532 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
533
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
534 And of course, XEmacs, 21.0 or higher.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
535
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
536 @subsection What You Can Do With Source Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
537
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
538 The packages CVS sources are most useful for creating XEmacs package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
539 tarballs for installation into your own XEmacs installations or for
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
540 distributing to others.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
541
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
542 The supported @file{make} targets are:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
543
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
544 @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
545 @item all
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
546 Bytecompile all files, build and bytecompile byproduct files like
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
547 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
548 of TeXinfo documentation if present.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
549
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
550 @c #### Why do we need this _and_ the binkit target?
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
551 @item bindist
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
552 Does a @code{make all} as well as create a binary package tarball in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
553 staging directory.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
554
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
555 @item install
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
556 Bytecompile all files, build and bytecompile byproduct files like
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
557 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
558 of TeXinfo documentation if present. And install everything into the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
559 staging directory.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
560
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
561 @item srckit
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
562 Usually simply depends on @code{srckit-std}, with no actions. This does
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
563 a @code{make distclean} and creates a package source tarball in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
564 staging directory. This is generally only of use for package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
565 maintainers.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
566
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
567 @item binkit
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
568 May depend on @code{binkit-sourceonly}, @code{binkit-sourceinfo},
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
569 @code{binkit-sourcedata}, or @code{binkit-sourcedatainfo}, with no
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
570 actions. @code{sourceonly} indicates there is nothing to install in a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
571 data directory or info directory. @code{sourceinfo} indicates that
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
572 source and info files are to be installed. @code{sourcedata} indicates
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
573 that source and etc (data) files are to be installed.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
574 @code{sourcedatainfo} indicates source, etc (data), and info files are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
575 to be installed. A few packages have needs beyond the basic templates
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
576 so this is not yet complete.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
577
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
578 @item dist
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
579 Runs the rules @code{srckit} followed by @code{binkit}. This is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
580 primarily of use by XEmacs maintainers producing files for distribution.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
581
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
582 @item clean
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
583 Remove all built files except @file{auto-autoloads.el} and
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
584 @file{custom-load.el}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
585
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
586 @item distclean
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
587 Remove all created files.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
588 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
589
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
590 @c #### The following section is lifted verbatim from the XEmacs User's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
591 @c Manual, file packages.texi.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
592 @node Local.rules File, Creating Packages, Building Packages, Packaging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
593 @comment node-name, next, previous, up
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
594 @cindex local.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
595 @heading The Local.rules File:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
596 This file in @file{packages} provides the @xpms{} with information about
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
597 the local configuration and environment. To create @file{Local.rules},
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
598 simply copy @file{Local.rules.template} from that directory to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
599 @file{Local.rules} and edit it to suit your needs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
600
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
601 These are the variables in @file{Local.rules} that you will need to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
602 provide values for. The following variables control which packages will
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
603 be built:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
604
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
605 @table @var
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
606 @item XEMACS_PACKAGES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
607 The default is @samp{xemacs-packages}, which results in the set in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
608 the @file{xemacs-packages/Makefile} @code{PACKAGES} variable.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
609
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
610 Otherwise, it should be a list of package source directories prefixed by
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
611 @samp{xemacs-packages}:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
612
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
613 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
614 XEMACS_PACKAGES = xemacs-packages/xemacs-base xemacs-packages/bbdb
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
615 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
616
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
617 @item BUILD_WITHOUT_MULE
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
618 The default is the empty value.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
619
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
620 Building from CVS defaults to building the Mule
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
621 packages. Set this to 't' if you don't want/have Mule.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
622
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
623 @item MULE_PACKAGES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
624 The default is @samp{mule-packages}, which results in the set in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
625 the @file{mule-packages/Makefile} @code{PACKAGES} variable.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
626
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
627 Otherwise, it should be a list of package source directories prefixed by
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
628 @samp{mule-packages}:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
629
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
630 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
631 MULE_PACKAGES = mule-packages/mule-base mule-packages/skk
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
632 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
633
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
634 @item PACKAGE_INDEX
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
635 The default is @file{package-index}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
636
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
637 If you want the package index file to have a different name, change
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
638 this. This is probably a bad idea unless you are a packages release
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
639 engineer, as it will confuse the package administration tools.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
640 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
641
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
642 The following variables determine where files are installed and how they
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
643 are installed. Several of the defaults use the variable
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
644 @var{XEMACS_PACKAGES_BASE}. Never set this variable in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
645 @file{Local.rules}; it is automatically set in @file{XEmacs.rules}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
646
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
647 @table @asis
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
648 @item @var{XEMACS_STAGING}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
649 The default is @file{$@{XEMACS_PACKAGES_BASE@}/../xemacs-packages}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
650
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
651 Generic packages will be installed here. This can be the final
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
652 destination for files or symlinks (if the packages are being installed
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
653 locally), or a clean staging area for building tarballs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
654
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
655 @strong{N.B.} @samp{make bindist} ignores this variable. It should be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
656 handled by the administration utilities, but currently isn't.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
657
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
658 @item @var{MULE_STAGING}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
659
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
660 The default is @file{$@{XEMACS_PACKAGES_BASE@}/../mule-packages}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
661
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
662 Packages requiring Mule to load correctly will be installed here. This
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
663 can be the final destination for files or symlinks (if the packages are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
664 being installed locally), or a clean staging area for building tarballs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
665
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
666 @strong{N.B.} @samp{make bindist} ignores this variable. It should be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
667 handled by the administration utilities, but currently isn't.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
668
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
669 @item symlink
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
670 The default is the empty value.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
671
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
672 Set this to 't' if you want to simulate ``running in place.'' It is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
673 currently not possible to ask XEmacs to use any package source tree as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
674 an automatically configured member of @code{load-path}, and it is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
675 unlikely that complex trees such as that of the Gnus package will ever
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
676 be able to ``run in place.'' This variable, when set to `t', causes the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
677 build process to create a symlink farm otherwise identical to an
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
678 installed tree of binary packages. Thus it is purely a space
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
679 optimization.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
680
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
681 Setting this is incompatible with @samp{make bindist}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
682 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
683
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
684 The following variables determine how packages are made.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
685
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
686 @table @var
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
687 @item XEMACS
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
688 The default is @samp{xemacs}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
689
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
690 The path to the XEmacs executable you wish to use to compile the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
691 packages and execute Lisp build scripts.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
692
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
693 @item XEMACS_NATIVE_NT
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
694 The default is the empty value.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
695
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
696 Set this to 't' if you are building on WinNT. It controls hairy shell
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
697 quoting in the @file{Makefile}s.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
698
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
699 @item INSTALL
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
700 The default is @samp{install -c}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
701
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
702 The path to your BSD compatible install program.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
703
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
704 @item TAR
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
705 The default is @samp{tar}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
706
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
707 The path to your tar program.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
708
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
709 @item BZIP2
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
710 The default is the empty value.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
711
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
712 If unset, bzipped tarballs will not be built. If this is set to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
713 something that resolves to a @samp{bzip2} executable, bzip2 tarballs
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
714 will be built @emph{in addition to} @samp{gzip} tarballs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
715
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
716 @item MAKEINFO
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
717 The default is @samp{makeinfo}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
718
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
719 The path to your @file{makeinfo} program
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
720 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
721
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
722
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
723 @c #### The following section is lifted verbatim from the XEmacs User's
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
724 @c Manual, file packages.texi.
752
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
725 @node Creating Packages, Documenting Packages, Local.rules File, Packaging
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
726 @comment node-name, next, previous, up
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
727 @cindex creating packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
728 @heading Creating Packages:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
729 Creating a package from an existing Lisp library is not very difficult.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
730
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
731 In addition to the Lisp libraries themselves, you need a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
732 @file{package-info.in} file and a simple @file{Makefile}. The rest is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
733 done by @file{XEmacs.rules}, part of the packaging system
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
734 infrastructure.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
735
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
736 @file{package-info.in} contains a single Lisp form like this:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
737
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
738 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
739 (NAME ; your package's name
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
740 (standards-version 1.1
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
741 version VERSION ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
742 author-version AUTHOR_VERSION ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
743 date DATE ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
744 build-date BUILD_DATE ; generated
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
745 maintainer MAINTAINER ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
746 distribution DISTRIBUTION ; "mule" if MULE is needed,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
747 ; else "xemacs"
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
748 priority high
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
749 category CATEGORY ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
750 dump nil
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
751 description "description" ; a one-line description string
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
752 filename FILENAME ; obsolete
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
753 md5sum MD5SUM ; generated
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
754 size SIZE ; generated
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
755 provides (FEATURE ...) ; one for every `provides' form
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
756 requires (REQUIRES) ; Makefile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
757 ; NOT run-time dependencies! These
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
758 ; are files that provide macros or
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
759 ; defsubsts that must be inlined.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
760 type regular
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
761 ))
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
762 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
763
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
764 You should replace NAME, DISTRIBUTION, DESCRIPTION, and FEATURE ... with
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
765 appropriate values, according to the comments. Fields marked as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
766 @samp{obsolete} can be ignored. Fields marked as @samp{generated} are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
767 generated by the package construction process, and will be filled in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
768 automatically. Fields marked as @samp{Makefile} should be set as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
769 variables in the @file{Makefile}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
770
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
771 The @samp{provides} can be done automatically, but currently aren't. It
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
772 would probably be a good idea to set them in the @file{Makefile} (they
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
773 do change, fairly often, but at present they aren't.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
774
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
775 @c #### This organization sucks. Should break up by component, with
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
776 @c theory of operations, example, and reference subsections.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
777 The @file{Makefile} is quite stylized. The idea is similar to an
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
778 @file{Imakefile} or an @code{automake} file: the complexity is hidden in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
779 generic rules files, in this case the @file{XEmacs.rules} include file
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
780 in the top directory of the packages hierarchy.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
781
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
782 It is important to note that the XEmacs used to compile packages is the
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
783 bare minimum: it is called with the @samp{-no-user-file -no-site-file
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
784 -no-autoloads}. This means that anything not dumped into XEmacs by
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
785 default needs to be specified in the @samp{REQUIRES} variable (for
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
786 packaged Lisp) or in some cases the @samp{PRELOADS} (autoloads used in
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
787 libraries mentioned in @samp{PRELOADS}).
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
788
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
789 An @xpms{} @file{Makefile} has three components. First, there is a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
790 variable definition section. The standard @xpms{} @file{make} variables
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
791 must be defined here for use by the @file{XEmacs.rules} include file.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
792 Second, the file @file{../../XEmacs.rules} is included. Finally, the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
793 @file{make} rules are defined, possibly including additional variable
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
794 definitions for use by the @file{Makefile}. These always include rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
795 for the targets @samp{all}, @samp{binkit}, and @file{srckit}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
796
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
797 Although a number of facilities are available for complex libraries,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
798 most simple packages' @file{Makefile}s contain a copyright notice, the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
799 variable definitions mentioned above, and some boilerplate.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
800
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
801 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
802 # Makefile for apackage's lisp code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
803
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
804 # This file is part of XEmacs.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
805
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
806 # XEmacs is free software; you can redistribute it and/or modify it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
807 # under the terms of the GNU General Public License as published by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
808 # Free Software Foundation; either version 2, or (at your option) any
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
809 # later version.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
810
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
811 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
812 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
813 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
814 # for more details.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
815
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
816 # You should have received a copy of the GNU General Public License
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
817 # along with XEmacs; see the file COPYING. If not, write to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
818 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
819 # Boston, MA 02111-1307, USA.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
820
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
821 VERSION = 0.00
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
822 AUTHOR_VERSION = 0.00
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
823 MAINTAINER = A. M. Aintainer <ama@@not.a.doc>
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
824 PACKAGE = apackage
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
825 PKG_TYPE = regular
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
826 REQUIRES = xemacs-base
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
827 CATEGORY = standard
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
828
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
829 # All .els should be compiled and packaged.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
830 ELS = $(wildcard *.el)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
831 ELCS = $(ELS:.el=.elc)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
832
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
833 include ../../XEmacs.rules
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
834
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
835 all:: $(ELCS) auto-autoloads.elc custom-load.elc
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
836
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
837 srckit: srckit-std
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
838
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
839 binkit: binkit-common
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
840 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
841
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
842 @menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
843 * package-compile.el::
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
844 * package-info.in Fields::
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
845 * Makefile Variables::
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
846 * Makefile Targets::
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
847 @end menu
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
848
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
849
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
850 @node package-compile.el, package-info.in Fields, , Creating Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
851
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
852 The @xpms{} does not automatically become aware of your package simply
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
853 because there is a new subtree. If any package, including your own,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
854 requires any of your files, it must be explicitly added to the compile
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
855 environment or loads/requires that search load-path will fail. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
856 changes that need to be made are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
857
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
858 @table @strong
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
859 @item an entry in @code{package-directory-map}
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
860 This tells the @xpms{} which distribution (currently
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
861 @samp{xemacs-packages} or @samp{mule-packages}) your package is found
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
862 in. It then looks in the distribution subdirectory whose name is the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
863 same as the package's.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
864
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
865 @item an entry in the @code{cond} in @code{package-name-to-directory}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
866 This is optional; it is necessary only if you keep your Lisp code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
867 somewhere other than the top-level directory of the package's source
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
868 tree, eg, in @file{packages/xemacs-packages/@var{PACKAGE}/lisp}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
869 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
870
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
871 This only needs to be done once, when the package is first added to the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
872 @xpms{}. (Well, when you randomly change the subdirectory layout, too.)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
873 Your changes to @file{package-compile.el} must be cleared and checked in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
874 by the XEmacs Package Release Engineer before your package will build
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
875 correctly from a fresh checkout.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
876
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
877 This is unfortunate; it works pretty well once set up, but can cause
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
878 confusion when first building a package in the @xpms{} context. In
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
879 particular, if the @code{package-directory-map} entry for a required
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
880 package
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
881 @c #### including the package itself?
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
882 is not found, the necessary requires will not be executed by
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
883 @file{package-compile.el}. If required functions are executed (under
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
884 @code{eval-when-compile}), they won't be found and the compile will
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
885 fail. If required function is actually a macro, the byte compiler will
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
886 not recognize that, compile a function call to the macro. This will
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
887 cause a run-time error because the byte-code interpreter does not know
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
888 how to execute macros. (Macros can always be expanded at compile-time,
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
889 and this is more efficient.)
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
890
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
891 If your package keeps some or all Lisp code somewhere other than the top
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
892 directory, then an entry in @code{package-name-to-directory} is also
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
893 necessary, or requires will fail, leading to the problems just described.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
894
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
895
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
896 @node package-info.in Fields, Makefile Variables, package-compile.el, Creating Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
897
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
898 The @file{package-info.in} structure is simply Lisp data, to be read by
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
899 a Lisp script, have values substituted for variables, and then written
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
900 out (appropriately quoted) into a loadable Lisp file, to be consed into
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
901 the @file{package-index.el} list at the FTP archives. That list is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
902 structured as an alist with package names as keys. The package data is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
903 a plist. Do not rely on this, as it may change. If you have a good
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
904 reason for relying on it, let the maintainers know and we may
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
905 incorporate it in a future revision of the @xpms{} standard.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
906
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
907 There are several kinds of fields, distinguished by how they get their
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
908 values. There are literals written into @file{package-info.in} by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
909 package maintainer. There are variables substituted in by the build
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
910 process, some computed, and others written as values of @file{make}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
911 variables in the @file{Makefile} by the package maintainer. There are a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
912 few implementation constants, some of which are simply the default value
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
913 for obsolete fields.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
914
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
915 The @file{package-info.in} literals provided by the maintainer generally
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
916 should not change over the life of the package. (The exception is the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
917 @samp{provides} field, which should be generated, but isn't yet.)
861
9a116d92c011 [xemacs-hg @ 2002-06-03 10:10:03 by stephent]
stephent
parents: 761
diff changeset
918 Values described as ``literal'' below are unquoted literal text. These
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
919 are normally interpreted as symbols by the package build process. The
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
920 maintainer literals are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
921
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
922 @table @asis
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
923 @item @var{package_name}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
924 A literal. The only unnamed ``field,'' the name of the package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
925
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
926 @item distribution
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
927 A literal, either @samp{xemacs} (for generic packages) or @samp{mule}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
928 (for packages requiring Mule). @xref{Package Terminology}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
929
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
930 @item description
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
931 A Lisp string containing a one-line text description for use in package
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
932 listings.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
933
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
934 @item provides
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
935 A (Lisp) list of features provided by the libraries in the package. All
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
936 of the features provided by libraries in your package should be elements
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
937 of this list.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
938
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
939 @item type
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
940 A literal, either @samp{regular} or @samp{single-file}. For practical
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
941 purposes, @samp{regular} should be considered an implementation constant.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
942 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
943
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
944 @c #### The following should be rewritten to @xref the make variables
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
945 @c node, and simply associate the field names to the make variables with
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
946 @c one line of description.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
947 Values which are expected to change regularly as the package is enhanced
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
948 are implemented as @file{make} variables. You should not change them in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
949 the @file{package-info.in} file; they are automatically filled in by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
950 build process.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
951
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
952 The corresponding field name is given in parentheses. These include
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
953
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
954 @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
955 @item VERSION
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
956 (version)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
957 The version of the XEmacs package, a numeric literal (a decimal
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
958 fixed-point number with two-places of precision).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
959
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
960 @item AUTHOR_VERSION
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
961 (author-version)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
962 The upstream author's version, an unintepreted literal.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
963
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
964 @item DATE
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
965 (date)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
966 Date of release of the upstream version.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
967
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
968 @item MAINTAINER
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
969 (maintainer)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
970 A literal containing the XEmacs package's maintainer and his/her email
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
971 address.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
972
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
973 @item CATEGORY
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
974 (category)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
975 A literal, either @samp{standard} or @samp{mule}. Probably redundant.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
976
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
977 @item REQUIRES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
978 (requires)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
979 A list of packages required to correctly build this package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
980
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
981 Note that the usual form in @file{package-info.in} already has the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
982 parentheses, so the @file{make} variable should be set to a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
983 space-separated list of package names @emph{not} enclosed in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
984 parentheses.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
985
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
986 The list is of @emph{packages}, not @emph{libraries}, as would
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
987 ordinarily be provided to the Lisp @code{require} function.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
988
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
989 @samp{REQUIRES} cannot be correctly computed from the calls to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
990 @code{require} in the package's library sources. @samp{REQUIRES} is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
991 used to ensure that all macro and defstruct definitions used by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
992 package are available at build time. This is not merely a matter of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
993 efficiency, to get the expansions inlined. In fact, it is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
994 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
995 code. Thus, if the macro expansion is not inlined, the call will result
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
996 in an error at run-time! Thus, packages providing libraries that would
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
997 be loaded because of autoload definitions must also be included.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
998
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
999 On the other hand, if a package provides no macros to this package, it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1000 is preferable @emph{not} to include it in @samp{REQUIRES}, because it is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1001 not uncommon that if the developer doesn't normally use the required
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1002 package, he will never use the functionality in the package being built,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1003 either. In that case it would be preferable to not require the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1004 developer to have source for the dependencies. That said, of course it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1005 is safe to put too many packages in @samp{REQUIRES}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1006 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1007
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1008 Values for the following fields are automatically generated by the build
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1009 process.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1010
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1011 @table @asis
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1012 @item build-date
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1013 The date the package tarball was generated.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1014
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1015 @item md5sum
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1016 An MD5 checksum for the package tarball, as gzipped.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1017
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1018 @item size
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1019 The size of the package tarball, as gzipped.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1020 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1021
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1022 It is not clear that either md5sum or size works correctly if the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1023 @samp{BZIP2} variable in @file{Local.rules} is set.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1024
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1025 The implementation constants are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1026
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1027 @table @asis
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1028 @item standards-version
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1029 Currently 1.1. Defines the format of the @file{package-info.in} file
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1030 and the @file{Makefile}. A true implementation constant.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1031
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1032 @item priority
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1033 An unimplemented and underspecified feature. Suggestions for
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1034 specification and implementation welcome.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1035
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1036 @item dump
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1037 An obsolete feature, superseded by the @file{site-load.el} mechanism.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1038 The value should always be nil.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1039
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1040 @item filename
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1041 An obsolete feature, completely ignored. Don't even think about doing
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1042 anything useful with it.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1043 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1044
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1045
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1046 @node Makefile Variables, Makefile Targets, package-info.in Fields, Creating Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1047
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1048 A number of @file{make} variables are defined by the @xpms{}. Some are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1049 required, others are optional. Of course your @file{Makefile} may
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1050 define other variables for private use, but you should be careful not to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1051 choose names that conflict with variables defined and used by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1052 @xpms{}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1053
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1054 The required variables are described in the table below.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1055 The corresponding field names for @file{package-info.in}, where
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1056 relevant, are given in parentheses.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1057
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1058 @c This is the canonical place for this information. If there is
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1059 @c unnecessary duplication with package-info.in documentation, shorten
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1060 @c that and leave this full-length.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1061 @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1062 @item VERSION
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1063 (version)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1064 The version of the XEmacs package, a numeric literal (a decimal
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1065 fixed-point number with two-places of precision).
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1066
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1067 @item AUTHOR_VERSION
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1068 (author-version)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1069 The upstream author's version, an unintepreted literal.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1070
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1071 @item DATE
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1072 (date)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1073 Date of release of the upstream version.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1074
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1075 @item MAINTAINER
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1076 (maintainer)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1077 A literal containing the XEmacs package's maintainer and his/her email
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1078 address.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1079
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1080 @item CATEGORY
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1081 (category)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1082 A literal, either @samp{standard} or @samp{mule}. Probably redundant.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1083
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1084 @item REQUIRES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1085 (requires)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1086 A list of packages required to correctly build this package.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1087
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1088 Note that the usual form in @file{package-info.in} already has the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1089 parentheses, so the @file{make} variable should be set to a
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1090 space-separated list of package names @emph{not} enclosed in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1091 parentheses.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1092
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1093 The list is of @emph{packages}, not @emph{libraries}, as would
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1094 ordinarily be provided to the Lisp @code{require} function.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1095
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1096 @samp{REQUIRES} cannot be correctly computed from the calls to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1097 @code{require} in the package's library sources. @samp{REQUIRES} is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1098 used to ensure that all macro and defstruct definitions used by the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1099 package are available at build time. This is not merely a matter of
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1100 efficiency, to get the expansions inlined. In fact, it is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1101 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1102 code. Thus, if the macro expansion is not inlined, the call will result
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1103 in an error at run-time! Thus, packages providing libraries that would
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1104 be loaded because of autoload definitions must also be included.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1105
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1106 On the other hand, if a package provides no macros to this package, it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1107 is preferable @emph{not} to include it in @samp{REQUIRES}, because it is
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1108 not uncommon that if the developer doesn't normally use the required
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1109 package, he will never use the functionality in the package being built,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1110 either. In that case it would be preferable to not require the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1111 developer to have source for the dependencies. That said, of course it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1112 is safe to put too many packages in @samp{REQUIRES}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1113
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1114 @item ELCS
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1115 The list of the byte-compiled Lisp files used by the package. These
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1116 files and their @file{.el} versions will be included in the binary
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1117 package. This variable determines which libraries will be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1118 byte-compiled. These libraries are also deleted by @samp{make clean}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1119
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1120 Note there is no sanity-checking done on this variable. If you put
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1121 @samp{.el} files in here, they will not be compiled and they @emph{will}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1122 be deleted by @samp{make clean}. You would surely be very distressed if
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1123 that happened, so be very careful. If this variable is left empty, none
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1124 of your Lisp code will be compiled or packaged. This would be a less
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1125 than amusing surprise, too.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1126
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1127 We don't consider this a feature, of course. Please do submit code to
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1128 do sanity checking to @email{xemacs-patches@@xemacs.org}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1129 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1130
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1131 Optional, but very commonly used variables are explained below.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1132
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1133 @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1134 item EXTRA_SOURCES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1135 Other files (such as extra Lisp sources or an upstream @file{Makefile})
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1136 that are normally placed in the installed Lisp directory, but not
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1137 byte-compiled. These files are @emph{preserved} by the @samp{clean}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1138 targets.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1139
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1140 @item EXTRA_OBJS
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1141 Other files (such as compiled autoload or concatenated @file{.elc}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1142 libraries) which are normally placed in the installed Lisp directory,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1143 but do @emph{not} have corresponding source files and @emph{should} be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1144 deleted by the @samp{clean} targets. Some of these (such as
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1145 package-specific autoload setups) can and probably should be replaced by
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1146 @xpms{} solutions such as @file{auto-autoloads.el}, but many cannot.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1147
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1148 @item PRELOADS
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1149 A specification for loading libraries containing macros before compiling
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1150 the Lisp in the package. This is spliced directly into the invocation
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1151 of XEmacs for byte-compilation, so it must contain the @samp{-l} flag
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1152 for XEmacs:
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1153
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1154 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1155 PRELOADS=-l ./apackage-macros.el -l ../bpackage/lisp/bpackage-macros.el
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1156 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1157
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1158 Preloads are loaded before @file{package-compile.el}, so the
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1159 @var{load-path} is minimal. Therefore @samp{PRELOADS} must specify a
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1160 full path to packaged Lisp. The base @var{load-path} does include the
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1161 core Lisp directory, so core libraries are found.
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1162
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1163 @item INFO_FILES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1164 Any Info file(s) generated by the package. These must be paths relative
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1165 to the root of the package's source tree.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1166
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1167 @item TEXI_FILES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1168 The Texinfo source file(s). These must be paths relative
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1169 to the root of the package's source tree.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1170
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1171 @item MANUAL
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1172 The name to be used for Info files and man pages.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1173
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1174 @item DATA_FILES
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1175 Any data files, such as pixmaps, READMEs, and ChangeLogs. These must be
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1176 paths relative to the root of the package's source tree. These files
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1177 will be copied to @samp{$(DATA_DEST)} for installation. Any directory
752
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1178 component of the path for a file will be stripped, so that the
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1179 file ends up in @samp{$(DATA_DEST)}, not in a subdiredtory. If there are
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1180 several destination directories, the forms @samp{$(DATA_FILES_@var{n})}
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1181 and @samp{$(DATA_DEST_@var{n})} (@var{n} may take values in 1-40) must
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1182 be used. The @xpms{} doesn't make provision for copying trees at this
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1183 time.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1184
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1185 @item DATA_DEST
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1186 The installation location for data files, relative to the @file{etc/}
749
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1187 directory of the package hierarchy. The default is currently empty, but
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1188 the normal value is simply $(PACKAGE). Leaving it empty (@emph{i.e.},
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1189 put it directly under @file{etc/}) will probably work, but is subject to
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1190 name conflicts with other packages. If there are several destination
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1191 directories, the form @samp{$(DATA_DEST_@var{n})} must be used. The
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1192 @xpms{} doesn't make provision for copying trees at this time.
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1193 @end table
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1194
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1195 The following variables are defaulted by @file{Local.rules} or
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1196 @file{XEmacs.rules}. These variables often should be added to using
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1197 @samp{+=} rather than set by @samp{=} or @samp{:=}.
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1198
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1199 @table @code
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1200 @item GENERATED
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1201 @c #### Is this correct?
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1202 A list of @file{.elc} files compiled from @file{.el} files generated by
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1203 the package build process. These files and the corresponding @file{.el}
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1204 files are copied to the installed @file{lisp} directory. Defaults to
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1205 @samp{$@{AUTOLOAD_PATH@}/auto-autoloads.elc}. Typical usage is
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1206 @example
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1207 GENERATED += $@{AUTOLOAD_PATH@}/custom-load.elc
9cea8fcd2e61 [xemacs-hg @ 2002-02-12 14:30:51 by stephent]
stephent
parents: 694
diff changeset
1208 @end example
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1209 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1210
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1211 Rarely used variables.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1212
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1213 @c @table @code
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1214 @c @item
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1215 @c @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1216
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1217 @node Makefile Targets, , Makefile Variables, Creating Packages
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1218
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1219 The standard targets that need to be defined in your @file{Makefile}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1220 follow. These normally should @emph{not} have an action. All of the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1221 work should be done by dependent targets, usually having standard
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1222 definitions in the @xpms{}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1223
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1224 @table @samp
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1225 @item all
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1226 A list of generated files, usually byte-compiled Lisp libraries, to be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1227 bundled in the package. The typical dependencies are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1228
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1229 @example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1230 $(ELCS) auto-autoloads.elc custom-load.elc
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1231 @end example
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1232
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1233 Other targets (such as Info files) may need to be added as dependencies
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1234 for the @code{all} target.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1235
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1236 @item srckit
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1237 The target for generating a source package. Not implemented. If it
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1238 were, the normal dependency would be @samp{srckit-std}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1239
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1240 @item binkit
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1241 The target for creating a ``master'' installation. Binary packages are
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1242 actually generated by the @samp{bindist} target. @xref{Building Packages}.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1243 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1244
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1245 Standard dependencies for @code{srckit} and @code{binkit} are defined in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1246 @file{XEmacs.rules}. The most useful of these values are given in the
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1247 following table.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1248
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1249 @table @samp
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1250 @item srckit-std
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1251 Build a standard source kit. Not fully implemented.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1252
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1253 @item binkit-sourceonly
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1254 The @samp{binkit} target need only install source and compiled Lisp in
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1255 the staging area. There is nothing to install in a data directory or
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1256 info directory.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1257
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1258 @item binkit-sourceinfo
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1259 Both source and info files are to be installed in the staging area.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1260
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1261 @item binkit-sourcedata
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1262 Both source and etc (data) files are to be installed in the staging
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1263 area.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1264
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1265 @item binkit-sourcedatainfo
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1266 Source, etc (data), and info files all are present and need to be
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1267 installed in the staging area.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1268
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1269 @item binkit-common
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1270 A dependency for all the above. (In fact in the current implementation
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1271 @samp{binkit-common} does all the work for all of the @samp{binkit}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1272 targets.)
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1273 @end table
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1274
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1275 Data files include things like pixmaps for a package-specific toolbar,
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1276 and are normally installed in @file{etc/@var{PACKAGE_NAME}}. A few
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1277 packages have needs beyond the basic templates. See @file{XEmacs.rules}
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1278 or a future revision of this manual for details.
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1279
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1280
752
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1281 @node Documenting Packages, Issues, Creating Packages, Packaging
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1282 @comment node-name, next, previous, up
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1283 @cindex documenting packages
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1284 @heading Documenting Packages:
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1285
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1286 @c #### Add a documentation section to Internals, and xref here.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1287 Some random notes on documenting your package.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1288
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1289 Do write a Texinfo file. It's not that hard to do basically, and even
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1290 using the more advanced features of Texinfo soon become natural. For a
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1291 start, just grab the template @file{Samples/package.texi} from the
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1292 @xpms{} source tree, and drop your current README into the Top node. At
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1293 least this way your documentation will be accessible from the standard
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1294 Info readers. Next, try to add lots of cross-referencing and logical
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1295 markup, and then node structure.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1296
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1297 Address both end users and developer issues. You may not be the
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1298 maintainer forever.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1299
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1300 If you are maintaining a package that is part of the GNU Emacs
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1301 distribution, you'll likely find that you occasionally synchronize your
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1302 package with the GNU Emacs sources. When you synch a file,
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1303 conventionally you should place a comment just above the standard
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1304 @code{;;; Code} comment that looks like this:
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1305
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1306 @example
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1307 ;; Synched with:
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1308 ;; GNU Emacs 21.1, 2002-02-08, Stephen Turnbull <stephen@@xemacs.org>
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1309 @end example
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1310
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1311 This comment is a status flag; the ChangeLog doesn't really give the
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1312 same information.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1313
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1314 Do maintain a detailed ChangeLog.
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1315
5d60b99c1ded [xemacs-hg @ 2002-02-13 13:06:44 by stephent]
stephent
parents: 749
diff changeset
1316 @node Issues, , Documenting Packages, Packaging
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1317 @section Issues
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1318
694
561ad704dc70 [xemacs-hg @ 2001-12-15 09:16:20 by stephent]
stephent
parents: 693
diff changeset
1319 To be completed.
693
b05e2a249757 [xemacs-hg @ 2001-12-14 07:50:06 by stephent]
stephent
parents:
diff changeset
1320