Mercurial > hg > xemacs-beta
comparison man/lispref/packaging.texi @ 1648:712931b4b71d
[xemacs-hg @ 2003-08-27 18:06:54 by youngs]
2003-08-28 Steve Youngs <youngs@xemacs.org>
* README.packages: Update.
2003-08-28 Steve Youngs <youngs@xemacs.org>
* PACKAGES: Update.
2003-08-28 Steve Youngs <youngs@xemacs.org>
* xemacs-faq.texi (Q2.0.2): Rewrite, mentioning the correct way to
remove a package.
(Q3.8.2): big-menubar is in the edit-utils package.
(Q4.3.2): Add a comment about not needing TM for things like Gnus,
MH-E and VM.
(Q5.3.3): State correct location of ps-print.el.
* xemacs/packages.texi (Packages): Remove "Creating Packages" menu
entry.
(Package Terminology): Whitespace clean up.
(Installing Packages): Whitespace clean up and add some @code
formatters.
Re-organise the menu so that installation via PUI is first and
Sumo is last.
(Automatically): mule-base is no longer a requirement for using
PUI.
Mention optionally requiring mailcrypt.
(Note): Removed.
(Manually): Move to below the PUI installation method.
(Sumo): Move to below the manual installation method.
(Which Packages): Add mailcrypt.
(Building Packages): Remove duplicated stuff that is in
lispref/packaging.texi, xref to it instead.
(Local.rules File): xref to the appropriate node in
lispref/packaging.texi.
(Available Packages): Update to current reality.
(all): Removed.
(srckit): Removed.
(binkit): Removed.
* xemacs/reading.texi (Reading Mail): Mention Gnus and MEW.
* new-users-guide/custom2.texi (Init File): big-menubar.el is in
the edit-utils package.
* lispref/packaging.texi (Packaging):
(The User View):
(The Library Maintainer View):
(Infrastructure):
(Control Files):
(Obtaining):
(The Package Release Engineer View):
(Package Terminology):
(Building Packages):
(Makefile Targets):
(packages): New.
(Local.rules File):
(XEMACS_PACKAGES): Removed.
(XEMACS_INSTALLED_PACKAGES_ROOT): New.
(NONMULE_PACKAGES): New.
(EXCLUDES): New.
(Creating Packages):
(BATCH): New.
(VERSION): Removed.
(AUTHOR_VERSION): Removed.
(MAINTAINER): Removed.
(PACKAGE): Removed.
(PKG_TYPE): Removed.
(REQUIRES): Removed.
(CATEGORY): Removed.
(ELS): Removed.
(ELCS): Removed.
(all): Removed.
(srckit): Removed.
(binkit): Removed.
(are): New.
(STANDARD_DOCS): New.
(ELCS_1_DEST): New.
(example): New.
(PACKAGE_SUPPRESS): New.
(EXPLICIT_DOCS): New.
(DATA_DEST): New.
(Documenting Packages):
Not quite a total rewrite, but a fairly thorough audit
nonetheless.
author | youngs |
---|---|
date | Wed, 27 Aug 2003 18:07:10 +0000 |
parents | 138c42c84aec |
children | f43f9ca6c7d9 |
comparison
equal
deleted
inserted
replaced
1647:d90ba01b5346 | 1648:712931b4b71d |
---|---|
42 probably regret overloading the nomenclature in this way, but it's | 42 probably regret overloading the nomenclature in this way, but it's |
43 become established.) | 43 become established.) |
44 | 44 |
45 @menu | 45 @menu |
46 Introduction: | 46 Introduction: |
47 * Package Overview:: Lisp Libraries and Packages. | 47 * Package Overview:: Lisp Libraries and Packages. |
48 | 48 |
49 Packaging Lisp Libraries: | 49 Packaging Lisp Libraries: |
50 * Package Terminology:: Basic stuff. | 50 * Package Terminology:: Basic stuff. |
51 * Building Packages:: Turn packaged source into a tarball. | 51 * Building Packages:: Turn packaged source into a tarball. |
52 * Local.rules File:: Tell the @xpms{} about your host. | 52 * Makefile Targets:: Package @file{Makefile} targets |
53 * Creating Packages:: Tell the @xpms{} about your package. | 53 * Local.rules File:: Tell the @xpms{} about your host. |
54 * Documenting Packages:: Explain your package to users and hackers. | 54 * Creating Packages:: Tell the @xpms{} about your package. |
55 * Documenting Packages:: Explain your package to users and hackers. | |
55 @c * History:: History of the @xpms{} | 56 @c * History:: History of the @xpms{} |
56 @c * Installation:: Installing the @xpms{} with your (X)Emacs. | 57 @c * Installation:: Installing the @xpms{} with your (X)Emacs. |
57 @c * Configuration:: Configuring the @xpms{} for use. | 58 @c * Configuration:: Configuring the @xpms{} for use. |
58 @c * Usage:: An overview of the operation of the @xpms{}. | 59 @c * Usage:: An overview of the operation of the @xpms{}. |
59 @c * Bug Reports:: Reporting Bugs and Problems | 60 @c * Bug Reports:: Reporting Bugs and Problems |
155 if such dependencies are unavoidable, additional standard package | 156 if such dependencies are unavoidable, additional standard package |
156 hierarchies may be installed under version directories, @emph{e.g.} | 157 hierarchies may be installed under version directories, @emph{e.g.} |
157 @file{/usr/local/lib/xemacs-21.4.6/}. | 158 @file{/usr/local/lib/xemacs-21.4.6/}. |
158 | 159 |
159 Users who do not have sufficient privilege to install packages in the | 160 Users who do not have sufficient privilege to install packages in the |
160 system hierarchies may install package hierarchies under | 161 system hierarchies may install package hierarchies under @file{~/.xemacs}. |
161 @file{~/.xemacs}. At present only the @file{xemacs-packages} and | 162 At present only the @file{xemacs-packages}, @file{mule-packages}, and |
162 @file{mule-packages} hierarchies are supported, but it might make sense | 163 @file{site-packages} hierarchies are supported, but it might make sense to |
163 to extend this to support @file{infodock-packages} and | 164 extend this to support @file{infodock-packages} hierarchies in the future. |
164 @file{site-packages} hierarchies in the future. | |
165 | 165 |
166 The package hierarchies are not searched directly for libraries to be | 166 The package hierarchies are not searched directly for libraries to be |
167 loaded; this would be very costly. Instead, the hierarchies are ordered | 167 loaded; this would be very costly. Instead, the hierarchies are ordered |
168 according to certain rules, and searched for package lisp directories at | 168 according to certain rules, and searched for package lisp directories at |
169 invocation. These directories are added to the general | 169 invocation. These directories are added to the general |
265 the ``sumo'' bundles of packages, as well as generation of individual | 265 the ``sumo'' bundles of packages, as well as generation of individual |
266 packages. The package control files describe the structure of the | 266 packages. The package control files describe the structure of the |
267 package's source tree and provide administrative information. | 267 package's source tree and provide administrative information. |
268 | 268 |
269 @menu | 269 @menu |
270 * Infrastructure:: Global Makefiles and common rules. | 270 * Infrastructure:: Global Makefiles and common rules. |
271 * Control Files:: Package-specific Makefiles and administrative files. | 271 * Control Files:: Package-specific Makefiles and administrative files. |
272 * Obtaining:: Obtaining the @xpms{} and required utilities. | 272 * Obtaining:: Obtaining the @xpms{} and required utilities. |
273 @end menu | 273 @end menu |
274 | 274 |
275 @node Infrastructure, Control Files, , The Library Maintainer View | 275 @node Infrastructure, Control Files, , The Library Maintainer View |
276 @subsection Infrastructure | 276 @subsection Infrastructure |
277 | 277 |
323 bundling of ``sumo'' tarballs | 323 bundling of ``sumo'' tarballs |
324 | 324 |
325 @item iterate.rules | 325 @item iterate.rules |
326 controls recursive builds of multiple packages | 326 controls recursive builds of multiple packages |
327 | 327 |
328 @item meta-iterate.rules | |
329 This is used by higher-level subdirectories that do not directly | |
330 contain packages. Subdirectories directly containing packages should | |
331 use iterate.rules instead. | |
332 | |
328 @item XEmacs.rules | 333 @item XEmacs.rules |
329 provides the rules for building and packaging. Included by all package | 334 provides the rules for building and packaging. Included by all package |
330 @file{Makefile}s. | 335 @file{Makefile}s. |
331 | 336 |
332 @item Local.rules | 337 @item Local.rules |
339 | 344 |
340 @item Local.rules.mk | 345 @item Local.rules.mk |
341 consistency checking for @file{Local.rules}, included by both the | 346 consistency checking for @file{Local.rules}, included by both the |
342 top-level @file{Makefile} and by @file{XEmacs.rules}. | 347 top-level @file{Makefile} and by @file{XEmacs.rules}. |
343 | 348 |
349 @item Local.rules.inc | |
350 a file to @code{include} in package @file{Makefile}s to be able to get | |
351 at variables in @file{Local.rules} @emph{before} including | |
352 @file{XEmacs.rules}. | |
353 | |
344 @c #### Add to "issues" | 354 @c #### Add to "issues" |
345 @item package-compile.el | 355 @item package-compile.el |
346 compile environment (@emph{e.g.}, load-path) setup. It is very bogus | 356 compile environment (@emph{e.g.}, load-path) setup. |
347 that this is here, an alternative mechanism is likely to be provided. | |
348 @end table | 357 @end table |
349 | 358 |
350 Of these, only @file{Local.rules} and @file{package-compile.el} need to | 359 Of these, only @file{Local.rules} and @file{package-compile.el} need to |
351 be modified by the library maintainer. The changes to Local.rules | 360 be modified by the library maintainer. The changes to Local.rules |
352 affect only your environment. This should need to be done only once | 361 affect only your environment. This should need to be done only once |
385 | 394 |
386 @item ChangeLog | 395 @item ChangeLog |
387 Not strictly required, but normally a ChangeLog will be added by the | 396 Not strictly required, but normally a ChangeLog will be added by the |
388 XEmacs package maintainer if different from the upstream maintainer. | 397 XEmacs package maintainer if different from the upstream maintainer. |
389 | 398 |
390 @item package-compile.el | |
391 compile environment (@emph{e.g.}, load-path) setup. It is very bogus | |
392 that this is here, an alternative mechanism is likely to be provided. | |
393 | |
394 @item _pkg.el | 399 @item _pkg.el |
395 Generated. Simply does a @code{package-provide} for the package. | 400 Generated. Simply does a @code{package-provide} for the package. |
396 | 401 |
397 @item _auto-autoloads.el | 402 @item auto-autoloads.el |
398 Generated. Read when XEmacs is initialized, and provides autoloads for | 403 Generated. Read when XEmacs is initialized, and provides autoloads for |
399 all defuns and other specially-marked forms in the sources. | 404 defuns and other forms in the sources that are marked with an |
405 @dfn{autoload cookie} (@samp{;;;###autoload}. | |
400 | 406 |
401 @item custom-loads.el | 407 @item custom-loads.el |
402 Generated. Read when XEmacs is initialized, and informs the Customize | 408 Generated. Read when XEmacs is initialized, and informs the Customize |
403 subsystem how to find the defcustom forms needed to create Customization | 409 subsystem how to find the defcustom forms needed to create Customization |
404 forms for the usre configuration variables of the package. | 410 forms for the usre configuration variables of the package. |
411 Currently both the infrastructure for creating XEmacs packages and the | 417 Currently both the infrastructure for creating XEmacs packages and the |
412 package sources themselves are available only by CVS. See | 418 package sources themselves are available only by CVS. See |
413 @uref{http://www.xemacs.org/Develop/cvsaccess.html} for more | 419 @uref{http://www.xemacs.org/Develop/cvsaccess.html} for more |
414 intformation. | 420 intformation. |
415 | 421 |
416 The @xpms{} currently requires GNU @file{make}, and probably XEmacs, to | 422 The @xpms{} currently requires GNU @file{make}, and XEmacs, to build |
417 build packages. | 423 packages. |
418 | 424 |
419 | 425 |
420 @node The Package Release Engineer View, , The Library Maintainer View, Package Overview | 426 @node The Package Release Engineer View, , The Library Maintainer View, Package Overview |
421 @subsection The Package Release Engineer View | 427 @subsection The Package Release Engineer View |
422 | 428 |
432 in the @code{xemacs-builds} module in the CVS repository. | 438 in the @code{xemacs-builds} module in the CVS repository. |
433 | 439 |
434 @c #### To be completed. | 440 @c #### To be completed. |
435 | 441 |
436 | 442 |
437 @c #### The following section is lifted verbatim from the XEmacs User's | |
438 @c Manual, file packages.texi. | |
439 @node Package Terminology, Building Packages, Package Overview, Packaging | 443 @node Package Terminology, Building Packages, Package Overview, Packaging |
440 @comment node-name, next, previous, up | 444 @comment node-name, next, previous, up |
441 @heading Package Terminology: | 445 @heading Package Terminology: |
442 | 446 |
443 @subsection Libraries and Packages | 447 @subsection Libraries and Packages |
482 hierarchy. @dfn{Source packages} are for developers and include all | 486 hierarchy. @dfn{Source packages} are for developers and include all |
483 files necessary for rebuilding byte-compiled lisp and creating tarballs | 487 files necessary for rebuilding byte-compiled lisp and creating tarballs |
484 for distribution or installation. This is all of the package author's | 488 for distribution or installation. This is all of the package author's |
485 source code plus all of the files necessary to build distribution | 489 source code plus all of the files necessary to build distribution |
486 tarballs (Unix Tar format files, gzipped for space savings). | 490 tarballs (Unix Tar format files, gzipped for space savings). |
487 @c #### This next is an Evile Practice and should be discontinued. | 491 (Occasionally sources that are not relevant to XEmacs are usually |
488 (Occasionally sources that are not relevant to XEmacs are removed.) | 492 renamed to @file{file.upstream}.) |
489 | 493 |
490 Currently, source packages are only available via CVS. See | 494 Currently, source packages are only available via CVS. See |
491 @url{http://www.xemacs.org/Develop/cvsaccess.html} for details. | 495 @url{http://www.xemacs.org/Develop/cvsaccess.html} for details. |
492 | 496 |
493 The package distributions are also split according to major features | 497 The package distributions are also split according to major features |
500 (perhaps given other required Lisp libraries), it will be classified as | 504 (perhaps given other required Lisp libraries), it will be classified as |
501 generic. At the present time only Mule packages need be treated | 505 generic. At the present time only Mule packages need be treated |
502 specially, and even those only if they contain multibyte characters. | 506 specially, and even those only if they contain multibyte characters. |
503 | 507 |
504 | 508 |
505 @c #### The following section is lifted verbatim from the XEmacs User's | 509 @node Building Packages, Makefile Targets, Package Terminology, Packaging |
506 @c Manual, file packages.texi. | |
507 @node Building Packages, Local.rules File, Package Terminology, Packaging | |
508 @comment node-name, next, previous, up | 510 @comment node-name, next, previous, up |
509 @cindex building packages | 511 @cindex building packages |
510 @cindex package building | 512 @cindex package building |
511 @heading Building Packages: | 513 @heading Building Packages: |
512 Currently, source packages are only available via anonymous CVS. See | 514 Currently, source packages are only available via anonymous CVS. See |
518 @table @code | 520 @table @code |
519 @item GNU cp | 521 @item GNU cp |
520 @item GNU install | 522 @item GNU install |
521 (or a BSD compatible install program). | 523 (or a BSD compatible install program). |
522 @item GNU make | 524 @item GNU make |
523 (3.75 or later preferred). | 525 (3.79 or later preferred). |
524 @item makeinfo | 526 @item makeinfo |
525 (1.68 from texinfo-3.11 or later required, 1.69 from Texinfo 4 preferred). | 527 (4.2 from texinfo-4.2) |
526 @item GNU tar | 528 @item GNU tar |
527 (or equivalent). | 529 (or equivalent). |
528 @item GNU gzip | 530 @item GNU gzip |
529 (or equivalent). | 531 (or equivalent). |
530 @item A properly configured @file{Local.rules} file. | 532 @item A properly configured @file{Local.rules} file. |
531 @ref{Local.rules File}. | 533 @ref{Local.rules File}. |
532 @end table | 534 @end table |
533 | 535 |
534 And of course, XEmacs, 21.0 or higher. | 536 And of course, XEmacs, 21.0 or higher. |
535 | 537 |
536 @subsection What You Can Do With Source Packages | 538 @section What You Can Do With Source Packages |
537 | 539 |
538 The packages CVS sources are most useful for creating XEmacs package | 540 The packages CVS sources are most useful for creating XEmacs package |
539 tarballs for installation into your own XEmacs installations or for | 541 tarballs for installation into your own XEmacs installations or for |
540 distributing to others. | 542 distributing to others. |
541 | 543 |
542 The supported @file{make} targets are: | 544 It should be noted that most of the package @file{Makefile}s do |
543 | 545 @emph{not} need to contain @emph{any} target rules. Everything is |
544 @table @code | 546 handled from the @file{XEmacs.rules} file, located in the toplevel |
545 @item all | 547 directory of the packages source tree. |
546 Bytecompile all files, build and bytecompile byproduct files like | 548 |
547 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version | 549 |
548 of TeXinfo documentation if present. | 550 @node Makefile Targets, Local.rules File, Building Packages, Packaging |
549 | 551 @cindex package makefile targets |
550 @c #### Why do we need this _and_ the binkit target? | 552 @chapter @file{Makefile} targets |
553 The following targets can be used when running @code{make} to build the | |
554 packages: | |
555 | |
556 @table @samp | |
557 @item mostlyclean | |
558 Removes any documentation files that have been processed by @TeX{}. | |
559 | |
560 @item clean | |
561 Does a @code{mostlyclean}, plus removes generated postscript and dvi | |
562 files. Also removes any generated .elc files, along with the normal | |
563 .elc files in the package and HTML and .info files. | |
564 | |
565 @item distclean | |
566 Use this when preparing a distribution. It kills anything that can be | |
567 rebuilt. | |
568 | |
569 @item extraclean | |
570 Does a @code{distclean} and also removes any backup files (@file{*~}) | |
571 and @file{core} files. | |
572 | |
573 @item package-info | |
574 Creates the @file{package-info} file from the @file{package-info.in} and | |
575 writes an entry in the @file{package-index} file. | |
576 | |
551 @item bindist | 577 @item bindist |
552 Does a @code{make all} as well as create a binary package tarball in the | 578 Builds the package, including any Texinfo documentation (info format), |
553 staging directory. | 579 writes an entry into the @file{package-index} file and builds a tarball |
580 of the package. Also writes an entry into @file{setup-packages.ini} | |
581 which is later used in the creation of netinstaller's @file{setup.ini}. | |
554 | 582 |
555 @item install | 583 @item install |
556 Bytecompile all files, build and bytecompile byproduct files like | 584 Builds and installs a package |
557 @file{auto-autoloads.el} and @file{custom-load.el}. Create info version | 585 |
558 of TeXinfo documentation if present. And install everything into the | 586 @item install-only |
559 staging directory. | 587 Doesn't build anything, just installs it. |
560 | 588 |
561 @item srckit | 589 @item autoloads |
562 Usually simply depends on @code{srckit-std}, with no actions. This does | 590 Generate the package's @file{auto-autoloads.el} file. |
563 a @code{make distclean} and creates a package source tarball in the | |
564 staging directory. This is generally only of use for package | |
565 maintainers. | |
566 | 591 |
567 @item binkit | 592 @item binkit |
568 May depend on @code{binkit-sourceonly}, @code{binkit-sourceinfo}, | 593 Creates the directories needed for installation and copies the files |
569 @code{binkit-sourcedata}, or @code{binkit-sourcedatainfo}, with no | 594 there. Basically this is an alias for @code{install-only}. |
570 actions. @code{sourceonly} indicates there is nothing to install in a | 595 |
571 data directory or info directory. @code{sourceinfo} indicates that | 596 @item html |
572 source and info files are to be installed. @code{sourcedata} indicates | 597 Builds the HTML versions of the documentation. |
573 that source and etc (data) files are to be installed. | 598 |
574 @code{sourcedatainfo} indicates source, etc (data), and info files are | 599 @item compile |
575 to be installed. A few packages have needs beyond the basic templates | 600 Does most of the work. Builds the elcs, infos at a minimum. |
576 so this is not yet complete. | |
577 | |
578 @item dist | |
579 Runs the rules @code{srckit} followed by @code{binkit}. This is | |
580 primarily of use by XEmacs maintainers producing files for distribution. | |
581 | |
582 @item clean | |
583 Remove all built files except @file{auto-autoloads.el} and | |
584 @file{custom-load.el}. | |
585 | |
586 @item distclean | |
587 Remove all created files. | |
588 @end table | 601 @end table |
589 | 602 |
590 @c #### The following section is lifted verbatim from the XEmacs User's | 603 @subsection The targets that most people would be interested in would be: |
591 @c Manual, file packages.texi. | 604 |
592 @node Local.rules File, Creating Packages, Building Packages, Packaging | 605 @itemize @bullet |
606 @item @code{all} | |
607 @item @code{bindist} | |
608 @item @code{html} | |
609 @item @code{install} | |
610 @item @code{install-only} | |
611 @item @code{clean} | |
612 @item @code{distclean} | |
613 @end itemize | |
614 | |
615 | |
616 @node Local.rules File, Creating Packages, Makefile Targets, Packaging | |
593 @comment node-name, next, previous, up | 617 @comment node-name, next, previous, up |
594 @cindex local.rules | 618 @cindex local.rules |
595 @heading The Local.rules File: | 619 @heading The Local.rules File: |
596 This file in @file{packages} provides the @xpms{} with information about | 620 This file in @file{packages} provides the @xpms{} with information about |
597 the local configuration and environment. To create @file{Local.rules}, | 621 the local configuration and environment. To create @file{Local.rules}, |
598 simply copy @file{Local.rules.template} from that directory to | 622 simply copy @file{Local.rules.template} from that directory to |
599 @file{Local.rules} and edit it to suit your needs. | 623 @file{Local.rules} and edit it to suit your needs. |
600 | 624 |
601 These are the variables in @file{Local.rules} that you will need to | 625 These are the variables in @file{Local.rules} that you may need to |
602 provide values for. The following variables control which packages will | 626 provide values for: |
603 be built: | 627 |
604 | 628 @table @samp |
605 @table @var | 629 @item XEMACS |
606 @item XEMACS_PACKAGES | 630 The name (and path if needed) of the XEmacs binary to use for building |
607 The default is @samp{xemacs-packages}, which results in the set in | 631 the packages. The default is @code{xemacs}. |
608 the @file{xemacs-packages/Makefile} @code{PACKAGES} variable. | 632 |
609 | 633 @item XEMACS_21_5 |
610 Otherwise, it should be a list of package source directories prefixed by | 634 This will enable some, as yet, unimplemented features in XEmacs 21.5 and |
611 @samp{xemacs-packages}: | 635 above. For now leave this blank (the default) regardless of the XEmacs |
636 version you are using. | |
637 | |
638 @item BUILD_WITHOUT_MULE | |
639 Set this to @samp{t} if you are using a non-Mule XEmacs. The default is | |
640 that this variable is not set (blank) which means to build @emph{with} | |
641 Mule. | |
642 | |
643 @item XEMACS_NATIVE_NT | |
644 Set this to @samp{t} if you are using a native Microsoft Windows build | |
645 of XEmacs (not a Cygwin build) to build the packages. | |
646 @strong{N.B.} To Windows users, you still need the Cygwin environment to | |
647 actually build the packages. | |
648 | |
649 @item XEMACS_INSTALLED_PACKAGES_ROOT | |
650 Set this to the root of where you want the packages to be installed. | |
651 Under this directory will hang @file{xemacs-packages} and | |
652 @file{mule-packages}. See @var{NONMULE_INSTALLED_PACKAGES_ROOT} and | |
653 @var{MULE_INSTALLED_PACKAGES_ROOT}. The default for this is | |
654 @file{/usr/local/lib/xemacs}. Which may not be what you want if you are | |
655 developing XEmacs. To quote the comments in | |
656 @file{Local.rules.template}: | |
657 | |
658 @quotation | |
659 If you are developing XEmacs, you probably don't want to install the | |
660 packages under /usr/local, which is where the stable, released version | |
661 of XEmacs goes. Instead, we suggest a layout as described in the base | |
662 README file of recent versions of XEmacs. In a nutshell, we suggest | |
663 you put your source under /src/xemacs, and under this put the package | |
664 sources in package-src/, and the installed packages in xemacs-packages/ | |
665 and mule-packages/. If you do everything this way, you might want to | |
666 set things as follows: | |
667 | |
668 XEMACS_INSTALLED_PACKAGES_ROOT = $@{XEMACS_PACKAGES_BASE@}/.. | |
669 | |
670 which puts the xemacs-packages/ and mule-packages/ directories as sisters | |
671 of the package-src/ directory, and you have to tell configure the location | |
672 of the installed packages using `--package-path', something like | |
673 | |
674 configure --package-path=/src/xemacs/xemacs-packages;/src/xemacs/mule-packages | |
675 @end quotation | |
676 | |
677 @item symlink | |
678 The default is unset (blank). If you set this to @samp{t} then | |
679 @code{make install} will create a @dfn{symlink farm} of the installed | |
680 packages under @var{XEMACS_INSTALLED_PACKAGES_ROOT}. Obviously, for | |
681 this to work, your system has to support symbolic links. This is as | |
682 close as you can get to @dfn{running in place} for the packages. | |
683 | |
684 @item NONMULE_INSTALLED_PACKAGES_ROOT | |
685 This is where the non-Mule packages get installed to. The default is | |
686 @file{$@{XEMACS_INSTALLED_PACKAGES_ROOT@}/xemacs-packages}. | |
687 | |
688 @item MULE_INSTALLED_PACKAGES_ROOT | |
689 This is where the Mule packages get installed to. The default is | |
690 @file{$@{XEMACS_INSTALLED_PACKAGES_ROOT@}/mule-packages}. | |
691 | |
692 @item NONMULE_PACKAGES | |
693 A whitespace separated list of non-Mule packages to build/install. | |
612 | 694 |
613 @example | 695 @example |
614 XEMACS_PACKAGES = xemacs-packages/xemacs-base xemacs-packages/bbdb | 696 NONMULE_PACKAGES = bbdb gnus xemacs-base prog-modes |
615 @end example | 697 @end example |
616 | 698 |
617 @item BUILD_WITHOUT_MULE | 699 The value for this variable can also be the symbol |
618 The default is the empty value. | 700 @samp{xemacs-packages}, which means to build/install @emph{all} of the |
619 | 701 non-Mule packages. The default is @samp{xemacs-packages}. |
620 Building from CVS defaults to building the Mule | |
621 packages. Set this to 't' if you don't want/have Mule. | |
622 | 702 |
623 @item MULE_PACKAGES | 703 @item MULE_PACKAGES |
624 The default is @samp{mule-packages}, which results in the set in | 704 A whitespace separated list of Mule packages to build/install. |
625 the @file{mule-packages/Makefile} @code{PACKAGES} variable. | |
626 | |
627 Otherwise, it should be a list of package source directories prefixed by | |
628 @samp{mule-packages}: | |
629 | 705 |
630 @example | 706 @example |
631 MULE_PACKAGES = mule-packages/mule-base mule-packages/skk | 707 MULE_PACKAGES = mule-base leim locale |
632 @end example | 708 @end example |
633 | 709 |
710 The value for this variable can also be the symbol | |
711 @samp{mule-packages}, which means to build/install @emph{all} of the | |
712 Mule packages. The default is @samp{mule-packages}. | |
713 | |
634 @item PACKAGE_INDEX | 714 @item PACKAGE_INDEX |
635 The default is @file{package-index}. | 715 The name of the package-index file. The default is @file{package-index} |
636 | 716 and you probably don't need to worry about changing it. |
637 If you want the package index file to have a different name, change | 717 |
638 this. This is probably a bad idea unless you are a packages release | 718 @item INSTALL |
639 engineer, as it will confuse the package administration tools. | 719 The path to a BSD compatible install program. The default is |
720 @code{install -c}. | |
721 | |
722 @item TAR | |
723 The path to GNU/tar. The default is @code{tar}. | |
724 | |
725 @item BZIP2 | |
726 The path to the bzip2 compression program. The default is unset | |
727 (blank). If this is set @file{.tar.bz2} archives will be built | |
728 @emph{in addition to} the @file{.tar.gz} archives. | |
729 | |
730 @item EXCLUDES | |
731 For things that you @emph{don't} want to go into the package tarballs. | |
732 It takes the same format as GNU/tar's @code{--exclude} option. The | |
733 default is: | |
734 | |
735 @example | |
736 EXCLUDES = \ | |
737 --exclude 'CVS' \ | |
738 --exclude 'RCS' \ | |
739 --exclude 'SCCS' \ | |
740 --exclude '*~' \ | |
741 --exclude '*.orig' \ | |
742 --exclude '*.rej' \ | |
743 --exclude '.\#*' | |
744 @end example | |
745 | |
746 @item VANILLA | |
747 Set to the XEmacs command line option that forces running in | |
748 @dfn{vanilla} mode. The default is @samp{-vanilla}. You wouldn't ever | |
749 need to alter this. | |
750 | |
751 @item BATCH | |
752 How to put XEmacs into @dfn{batch} mode. It also sets a couple of other | |
753 things and in the normal course of events you wouldn't need to alter | |
754 this from the default which is: | |
755 | |
756 @example | |
757 BATCH = $(VANILLA) -batch -eval \ | |
758 '(setq stack-trace-on-error t \ | |
759 load-always-display-messages t \ | |
760 load-ignore-out-of-date-elc-files t \ | |
761 load-show-full-path-in-messages t)' | |
762 @end example | |
763 | |
764 @item MAKEINFO | |
765 The path to @code{makeinfo}. The default is @samp{makeinfo} | |
766 | |
767 @item INSTALL_HTML | |
768 Set this to @samp{t} if you want to install HTML versions of the Texinfo | |
769 documentation. The default is unset (blank). | |
770 | |
771 @item TEXI2HTML | |
772 The path to the program that can convert Texinfo source to HTML. The | |
773 default is @code{texi2html}. | |
774 | |
775 @item TEXI2DVI | |
776 The path to the program that can convert Texinfo source to DVI. The | |
777 default is @code{texi2dvi} | |
778 | |
779 @item DVIPS | |
780 The path to the program that can convert DVI to Postscript. The default | |
781 is @code{dvips} | |
782 | |
783 @item TEXI2PDF | |
784 The path to the program that can convert Texinfo source to PDF format. | |
785 The default is @code{texi2pdf}. | |
786 | |
787 @item TEX | |
788 The path to @TeX{}. The default is @code{tex} | |
789 | |
790 @item MSGFMT | |
791 The path to msgfmt. The default is @code{msgfmt} | |
792 | |
793 @item RCOPY | |
794 The path to your copy command (GNU cp). The default is dependent on | |
795 whether or not @var{symlink} is set (@samp{t}). | |
796 | |
797 If @var{symlink} is unset (blank), @var{RCOPY}'s default is | |
798 @code{cp -af}. If @var{symlink} is set (@samp{t}), @var{RCOPY}'s | |
799 default is @code{cp --force --recursive --symbolic-link}. | |
640 @end table | 800 @end table |
641 | 801 |
642 The following variables determine where files are installed and how they | 802 It should be noted that in most cases the defaults should be fine. Most |
643 are installed. Several of the defaults use the variable | 803 people will probably only need to alter: |
644 @var{XEMACS_PACKAGES_BASE}. Never set this variable in | 804 |
645 @file{Local.rules}; it is automatically set in @file{XEmacs.rules}. | 805 @itemize @bullet |
646 | 806 @item @var{XEMACS_INSTALLED_PACKAGES_ROOT} |
647 @table @asis | 807 @item @var{NONMULE_INSTALLED_PACKAGES_ROOT} |
648 @item @var{XEMACS_STAGING} | 808 @item @var{MULE_INSTALLED_PACKAGES_ROOT} |
649 The default is @file{$@{XEMACS_PACKAGES_BASE@}/../xemacs-packages}. | 809 @item @var{NONMULE_PACKAGES} |
650 | 810 @item @var{MULE_PACKAGES} |
651 Generic packages will be installed here. This can be the final | 811 @end itemize |
652 destination for files or symlinks (if the packages are being installed | 812 |
653 locally), or a clean staging area for building tarballs. | |
654 | |
655 @strong{N.B.} @samp{make bindist} ignores this variable. It should be | |
656 handled by the administration utilities, but currently isn't. | |
657 | |
658 @item @var{MULE_STAGING} | |
659 | |
660 The default is @file{$@{XEMACS_PACKAGES_BASE@}/../mule-packages}. | |
661 | |
662 Packages requiring Mule to load correctly will be installed here. This | |
663 can be the final destination for files or symlinks (if the packages are | |
664 being installed locally), or a clean staging area for building tarballs. | |
665 | |
666 @strong{N.B.} @samp{make bindist} ignores this variable. It should be | |
667 handled by the administration utilities, but currently isn't. | |
668 | |
669 @item symlink | |
670 The default is the empty value. | |
671 | |
672 Set this to 't' if you want to simulate ``running in place.'' It is | |
673 currently not possible to ask XEmacs to use any package source tree as | |
674 an automatically configured member of @code{load-path}, and it is | |
675 unlikely that complex trees such as that of the Gnus package will ever | |
676 be able to ``run in place.'' This variable, when set to `t', causes the | |
677 build process to create a symlink farm otherwise identical to an | |
678 installed tree of binary packages. Thus it is purely a space | |
679 optimization. | |
680 | |
681 Setting this is incompatible with @samp{make bindist}. | |
682 @end table | |
683 | |
684 The following variables determine how packages are made. | |
685 | |
686 @table @var | |
687 @item XEMACS | |
688 The default is @samp{xemacs}. | |
689 | |
690 The path to the XEmacs executable you wish to use to compile the | |
691 packages and execute Lisp build scripts. | |
692 | |
693 @item XEMACS_NATIVE_NT | |
694 The default is the empty value. | |
695 | |
696 Set this to 't' if you are building on WinNT. It controls hairy shell | |
697 quoting in the @file{Makefile}s. | |
698 | |
699 @item INSTALL | |
700 The default is @samp{install -c}. | |
701 | |
702 The path to your BSD compatible install program. | |
703 | |
704 @item TAR | |
705 The default is @samp{tar}. | |
706 | |
707 The path to your tar program. | |
708 | |
709 @item BZIP2 | |
710 The default is the empty value. | |
711 | |
712 If unset, bzipped tarballs will not be built. If this is set to | |
713 something that resolves to a @samp{bzip2} executable, bzip2 tarballs | |
714 will be built @emph{in addition to} @samp{gzip} tarballs. | |
715 | |
716 @item MAKEINFO | |
717 The default is @samp{makeinfo}. | |
718 | |
719 The path to your @file{makeinfo} program | |
720 @end table | |
721 | |
722 | |
723 @c #### The following section is lifted verbatim from the XEmacs User's | |
724 @c Manual, file packages.texi. | |
725 @node Creating Packages, Documenting Packages, Local.rules File, Packaging | 813 @node Creating Packages, Documenting Packages, Local.rules File, Packaging |
726 @comment node-name, next, previous, up | 814 @comment node-name, next, previous, up |
727 @cindex creating packages | 815 @cindex creating packages |
728 @heading Creating Packages: | 816 @chapter Creating Packages: |
729 Creating a package from an existing Lisp library is not very difficult. | 817 Creating a package from an existing Lisp library is not very difficult. |
730 | 818 |
731 In addition to the Lisp libraries themselves, you need a | 819 In addition to the Lisp libraries themselves, you need a |
732 @file{package-info.in} file and a simple @file{Makefile}. The rest is | 820 @ref{package-info.in} file and a simple @ref{Makefile}. The rest is |
733 done by @file{XEmacs.rules}, part of the packaging system | 821 done by @file{XEmacs.rules}, part of the packaging system |
734 infrastructure. | 822 infrastructure. |
735 | 823 |
736 @file{package-info.in} contains a single Lisp form like this: | 824 @menu |
825 * package-info.in:: package-info.in | |
826 * Makefile:: @file{Makefile} | |
827 @end menu | |
828 | |
829 @node package-info.in, Makefile,,Creating Packages | |
830 @chapter package-info.in | |
831 @cindex package-info.in | |
832 @cindex package-info | |
833 @file{package-info.in} contains information that gets injected into the | |
834 @file{package-index} file when @code{make bindist} is run. Here is a | |
835 real world example from the xemacs-base package (a description of each | |
836 field follows the example): | |
737 | 837 |
738 @example | 838 @example |
739 (NAME ; your package's name | 839 (xemacs-base |
740 (standards-version 1.1 | 840 (standards-version 1.1 |
741 version VERSION ; Makefile | 841 version VERSION |
742 author-version AUTHOR_VERSION ; Makefile | 842 author-version AUTHOR_VERSION |
743 date DATE ; Makefile | 843 date DATE |
744 build-date BUILD_DATE ; generated | 844 build-date BUILD_DATE |
745 maintainer MAINTAINER ; Makefile | 845 maintainer MAINTAINER |
746 distribution DISTRIBUTION ; "mule" if MULE is needed, | 846 distribution xemacs |
747 ; else "xemacs" | |
748 priority high | 847 priority high |
749 category CATEGORY ; Makefile | 848 category CATEGORY |
750 dump nil | 849 dump nil |
751 description "DESCRIPTION" ; a one-line period-terminated string | 850 description "Fundamental XEmacs support, you almost certainly need this." |
752 filename FILENAME ; obsolete | 851 filename FILENAME |
753 md5sum MD5SUM ; generated | 852 md5sum MD5SUM |
754 size SIZE ; generated | 853 size SIZE |
755 provides (FEATURE ...) ; one for every `provides' form | 854 provides (add-log advice-preload advice annotations assoc case-table chistory comint-xemacs comint compile debug ebuff-menu echistory edmacro ehelp electric enriched env facemenu ffap helper imenu iso-syntax macros novice outline passwd pp regexp-opt regi ring shell skeleton sort thing time-stamp timezone tq xbm-button xpm-button) |
756 requires (REQUIRES) ; Makefile | 855 requires (REQUIRES) |
757 ; NOT run-time dependencies! These | |
758 ; are files that provide macros or | |
759 ; defsubsts that must be inlined. | |
760 type regular | 856 type regular |
761 )) | 857 )) |
762 @end example | 858 @end example |
763 | 859 |
764 You should replace NAME, DISTRIBUTION, DESCRIPTION, and FEATURE ... with | 860 @subheading Description of the Fields in @file{package-info.in}: |
765 appropriate values, according to the comments. As a matter of style, | 861 @table @samp |
766 the first letter of the description should be capitalized, and the | 862 @item NAME |
767 string should end with a period. It need not be a complete sentence | 863 The name of the package. In the case of the example it is |
768 grammatically. Fields marked as @samp{obsolete} can be ignored. Fields | 864 @samp{xemacs-base}. |
769 marked as @samp{generated} are generated by the package construction | 865 |
770 process, and will be filled in automatically. Fields marked as | 866 @item standards-version |
771 @samp{Makefile} should be set as variables in the @file{Makefile}. | 867 Part of the internal package infrastructure, its value should always be |
772 | 868 @samp{1.1}. Do not change this. |
773 The @samp{provides} can be done automatically, but currently aren't. It | 869 |
774 would probably be a good idea to set them in the @file{Makefile} (they | 870 @item version |
775 do change, fairly often, but at present they aren't. | 871 This is the XEmacs package version number of the package. It is set |
776 | 872 from the @file{Makefile} variable @var{VERSION}. This is something that |
777 @c #### This organization sucks. Should break up by component, with | 873 the XEmacs Package Release Engineer deals with so there is no need for a |
778 @c theory of operations, example, and reference subsections. | 874 package maintainer to touch it. In @file{package-info.in} just put the |
779 The @file{Makefile} is quite stylized. The idea is similar to an | 875 place-marker, @samp{VERSION} here. |
780 @file{Imakefile} or an @code{automake} file: the complexity is hidden in | 876 |
781 generic rules files, in this case the @file{XEmacs.rules} include file | 877 @item author-version |
782 in the top directory of the packages hierarchy. | 878 This is the package's internal, or @samp{upstream} version number if it |
783 | 879 has one. It is set from the @file{Makefile} variable |
784 It is important to note that the XEmacs used to compile packages is the | 880 @var{AUTHOR_VERSION}. |
785 bare minimum: it is called with the @samp{-no-user-file -no-site-file | 881 |
786 -no-autoloads}. This means that anything not dumped into XEmacs by | 882 @item date |
787 default needs to be specified in the @samp{REQUIRES} variable (for | 883 This is the date of the last change made to the package. It is |
788 packaged Lisp) or in some cases the @samp{PRELOADS} (autoloads used in | 884 auto-generated at build time, taken from the package's toplevel |
789 libraries mentioned in @samp{PRELOADS}). | 885 @file{ChangeLog}. |
790 | 886 |
791 An @xpms{} @file{Makefile} has three components. First, there is a | 887 @item build-date |
792 variable definition section. The standard @xpms{} @file{make} variables | 888 The date the package was built. It is auto-generated. |
793 must be defined here for use by the @file{XEmacs.rules} include file. | 889 |
794 Second, the file @file{../../XEmacs.rules} is included. Finally, the | 890 @item maintainer |
795 @file{make} rules are defined, possibly including additional variable | 891 This is the name and email address of the package's maintainer. It is |
796 definitions for use by the @file{Makefile}. These always include rules | 892 taken from the @file{Makefile} variable @var{MAINTAINER}. |
797 for the targets @samp{all}, @samp{binkit}, and @file{srckit}. | |
798 | |
799 Although a number of facilities are available for complex libraries, | |
800 most simple packages' @file{Makefile}s contain a copyright notice, the | |
801 variable definitions mentioned above, and some boilerplate. | |
802 | |
803 @example | |
804 # Makefile for apackage's lisp code | |
805 | |
806 # This file is part of XEmacs. | |
807 | |
808 # XEmacs is free software; you can redistribute it and/or modify it | |
809 # under the terms of the GNU General Public License as published by the | |
810 # Free Software Foundation; either version 2, or (at your option) any | |
811 # later version. | |
812 | |
813 # XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
814 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
815 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
816 # for more details. | |
817 | |
818 # You should have received a copy of the GNU General Public License | |
819 # along with XEmacs; see the file COPYING. If not, write to | |
820 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
821 # Boston, MA 02111-1307, USA. | |
822 | |
823 VERSION = 0.00 | |
824 AUTHOR_VERSION = 0.00 | |
825 MAINTAINER = A. M. Aintainer <ama@@not.a.doc> | |
826 PACKAGE = apackage | |
827 PKG_TYPE = regular | |
828 REQUIRES = xemacs-base | |
829 CATEGORY = standard | |
830 | |
831 # All .els should be compiled and packaged. | |
832 ELS = $(wildcard *.el) | |
833 ELCS = $(ELS:.el=.elc) | |
834 | |
835 include ../../XEmacs.rules | |
836 | |
837 all:: $(ELCS) auto-autoloads.elc custom-load.elc | |
838 | |
839 srckit: srckit-std | |
840 | |
841 binkit: binkit-common | |
842 @end example | |
843 | |
844 @menu | |
845 * package-compile.el:: | |
846 * package-info.in Fields:: | |
847 * Makefile Variables:: | |
848 * Makefile Targets:: | |
849 @end menu | |
850 | |
851 | |
852 @node package-compile.el, package-info.in Fields, , Creating Packages | |
853 | |
854 The @xpms{} does not automatically become aware of your package simply | |
855 because there is a new subtree. If any package, including your own, | |
856 requires any of your files, it must be explicitly added to the compile | |
857 environment or loads/requires that search load-path will fail. The | |
858 changes that need to be made are | |
859 | |
860 @table @strong | |
861 @item an entry in @code{package-directory-map} | |
862 This tells the @xpms{} which distribution (currently | |
863 @samp{xemacs-packages} or @samp{mule-packages}) your package is found | |
864 in. It then looks in the distribution subdirectory whose name is the | |
865 same as the package's. | |
866 | |
867 @item an entry in the @code{cond} in @code{package-name-to-directory} | |
868 This is optional; it is necessary only if you keep your Lisp code | |
869 somewhere other than the top-level directory of the package's source | |
870 tree, eg, in @file{packages/xemacs-packages/@var{PACKAGE}/lisp}. | |
871 @end table | |
872 | |
873 This only needs to be done once, when the package is first added to the | |
874 @xpms{}. (Well, when you randomly change the subdirectory layout, too.) | |
875 Your changes to @file{package-compile.el} must be cleared and checked in | |
876 by the XEmacs Package Release Engineer before your package will build | |
877 correctly from a fresh checkout. | |
878 | |
879 This is unfortunate; it works pretty well once set up, but can cause | |
880 confusion when first building a package in the @xpms{} context. In | |
881 particular, if the @code{package-directory-map} entry for a required | |
882 package | |
883 @c #### including the package itself? | |
884 is not found, the necessary requires will not be executed by | |
885 @file{package-compile.el}. If required functions are executed (under | |
886 @code{eval-when-compile}), they won't be found and the compile will | |
887 fail. If required function is actually a macro, the byte compiler will | |
888 not recognize that, compile a function call to the macro. This will | |
889 cause a run-time error because the byte-code interpreter does not know | |
890 how to execute macros. (Macros can always be expanded at compile-time, | |
891 and this is more efficient.) | |
892 | |
893 If your package keeps some or all Lisp code somewhere other than the top | |
894 directory, then an entry in @code{package-name-to-directory} is also | |
895 necessary, or requires will fail, leading to the problems just described. | |
896 | |
897 | |
898 @node package-info.in Fields, Makefile Variables, package-compile.el, Creating Packages | |
899 | |
900 The @file{package-info.in} structure is simply Lisp data, to be read by | |
901 a Lisp script, have values substituted for variables, and then written | |
902 out (appropriately quoted) into a loadable Lisp file, to be consed into | |
903 the @file{package-index.el} list at the FTP archives. That list is | |
904 structured as an alist with package names as keys. The package data is | |
905 a plist. Do not rely on this, as it may change. If you have a good | |
906 reason for relying on it, let the maintainers know and we may | |
907 incorporate it in a future revision of the @xpms{} standard. | |
908 | |
909 There are several kinds of fields, distinguished by how they get their | |
910 values. There are literals written into @file{package-info.in} by the | |
911 package maintainer. There are variables substituted in by the build | |
912 process, some computed, and others written as values of @file{make} | |
913 variables in the @file{Makefile} by the package maintainer. There are a | |
914 few implementation constants, some of which are simply the default value | |
915 for obsolete fields. | |
916 | |
917 The @file{package-info.in} literals provided by the maintainer generally | |
918 should not change over the life of the package. (The exception is the | |
919 @samp{provides} field, which should be generated, but isn't yet.) | |
920 Values described as ``literal'' below are unquoted literal text. These | |
921 are normally interpreted as symbols by the package build process. The | |
922 maintainer literals are | |
923 | |
924 @table @asis | |
925 @item @var{package_name} | |
926 A literal. The only unnamed ``field,'' the name of the package. | |
927 | 893 |
928 @item distribution | 894 @item distribution |
929 A literal, either @samp{xemacs} (for generic packages) or @samp{mule} | 895 An unused field, leave as @samp{xemacs} |
930 (for packages requiring Mule). @xref{Package Terminology}. | 896 |
897 @item priority | |
898 An unused field, can be any of @samp{high}, @samp{medium}, or | |
899 @samp{low}. | |
900 | |
901 @item category | |
902 The @samp{category} of the package. It is taken from the | |
903 @file{Makefile} variable @var{CATEGORY} and can be either | |
904 @samp{standard} for non-Mule packages, or @samp{mule} for Mule | |
905 packages. The is also provision for @samp{unsupported} in this field | |
906 which would be for packages that XEmacs.org do not distribute. | |
907 | |
908 @strong{N.B.} As yet, the @xpms{} does @emph{not} support this type of | |
909 package. It will in the future. | |
910 | |
911 @item dump | |
912 Unused. Always @samp{nil} | |
931 | 913 |
932 @item description | 914 @item description |
933 A Lisp string containing a one-line text description for use in package | 915 A free form short description of the package. |
934 listings. | 916 |
917 @item filename | |
918 The file name of the package's binary tarball. It is generated at build | |
919 time by @code{make bindist}. | |
920 | |
921 @item md5sum | |
922 The MD5 message digest of the package's binary tarball. Generated at | |
923 build time by @code{make bindist}. | |
924 | |
925 @item size | |
926 The size in bytes of the package's binary tarball. Generated at build | |
927 time. | |
935 | 928 |
936 @item provides | 929 @item provides |
937 A (Lisp) list of features provided by the libraries in the package. All | 930 A whitespace separated list of @emph{all} the features the package |
938 of the features provided by libraries in your package should be elements | 931 provides. Surround the list with parens. |
939 of this list. | 932 |
940 | 933 @item requires |
941 @item type | 934 Taken from the @file{Makefile} variable @var{REQUIRES}. It is a list of |
942 A literal, either @samp{regular} or @samp{single-file}. For practical | 935 all the package's dependencies, including any macros and defstructs that |
943 purposes, @samp{regular} should be considered an implementation constant. | 936 need to be inlined. |
944 @end table | |
945 | |
946 @c #### The following should be rewritten to @xref the make variables | |
947 @c node, and simply associate the field names to the make variables with | |
948 @c one line of description. | |
949 Values which are expected to change regularly as the package is enhanced | |
950 are implemented as @file{make} variables. You should not change them in | |
951 the @file{package-info.in} file; they are automatically filled in by the | |
952 build process. | |
953 | |
954 The corresponding field name is given in parentheses. These include | |
955 | |
956 @table @code | |
957 @item VERSION | |
958 (version) | |
959 The version of the XEmacs package, a numeric literal (a decimal | |
960 fixed-point number with two-places of precision). | |
961 | |
962 @item AUTHOR_VERSION | |
963 (author-version) | |
964 The upstream author's version, an unintepreted literal. | |
965 | |
966 @item DATE | |
967 (date) | |
968 Date of release of the upstream version. | |
969 | |
970 @item MAINTAINER | |
971 (maintainer) | |
972 A literal containing the XEmacs package's maintainer and his/her email | |
973 address. | |
974 | |
975 @item CATEGORY | |
976 (category) | |
977 A literal, either @samp{standard} or @samp{mule}. Probably redundant. | |
978 | |
979 @item REQUIRES | |
980 (requires) | |
981 A list of packages required to correctly build this package. | |
982 | |
983 Note that the usual form in @file{package-info.in} already has the | |
984 parentheses, so the @file{make} variable should be set to a | |
985 space-separated list of package names @emph{not} enclosed in | |
986 parentheses. | |
987 | |
988 The list is of @emph{packages}, not @emph{libraries}, as would | |
989 ordinarily be provided to the Lisp @code{require} function. | |
990 | 937 |
991 @samp{REQUIRES} cannot be correctly computed from the calls to | 938 @samp{REQUIRES} cannot be correctly computed from the calls to |
992 @code{require} in the package's library sources. @samp{REQUIRES} is | 939 @code{require} in the package's library sources. @samp{REQUIRES} is |
993 used to ensure that all macro and defstruct definitions used by the | 940 used to ensure that all macro and defstruct definitions used by the |
994 package are available at build time. This is not merely a matter of | 941 package are available at build time. This is not merely a matter of |
996 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp | 943 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp |
997 code. Thus, if the macro expansion is not inlined, the call will result | 944 code. Thus, if the macro expansion is not inlined, the call will result |
998 in an error at run-time! Thus, packages providing libraries that would | 945 in an error at run-time! Thus, packages providing libraries that would |
999 be loaded because of autoload definitions must also be included. | 946 be loaded because of autoload definitions must also be included. |
1000 | 947 |
1001 On the other hand, if a package provides no macros to this package, it | 948 @item type |
1002 is preferable @emph{not} to include it in @samp{REQUIRES}, because it is | 949 Can either be @samp{regular} for a regular package, or |
1003 not uncommon that if the developer doesn't normally use the required | 950 @samp{single-file} for a single file package. |
1004 package, he will never use the functionality in the package being built, | 951 |
1005 either. In that case it would be preferable to not require the | 952 @strong{N.B.} This doesn't refer to the number of lisp files in a |
1006 developer to have source for the dependencies. That said, of course it | 953 package. A single-file package can have multiple lisp files in it. |
1007 is safe to put too many packages in @samp{REQUIRES}. | 954 @xref{Package Terminology}. |
1008 @end table | 955 @end table |
1009 | 956 |
1010 Values for the following fields are automatically generated by the build | 957 The fields in @file{package-info.in} that need to be changed directly |
1011 process. | 958 are: |
1012 | 959 |
1013 @table @asis | 960 @itemize @bullet |
1014 @item build-date | 961 @item NAME |
1015 The date the package tarball was generated. | 962 @item description |
1016 | 963 @item provides |
1017 @item md5sum | 964 @item type |
1018 An MD5 checksum for the package tarball, as gzipped. | 965 @end itemize |
1019 | 966 |
1020 @item size | 967 Everything else is either set from the appropriate @file{Makefile} |
1021 The size of the package tarball, as gzipped. | 968 variable, is auto-generated at build time, or is static. |
1022 @end table | 969 |
1023 | 970 @node Makefile,,package-info.in,Creating Packages |
1024 It is not clear that either md5sum or size works correctly if the | 971 @chapter @file{Makefile} |
1025 @samp{BZIP2} variable in @file{Local.rules} is set. | 972 @cindex Makefile, package |
1026 | 973 @cindex package Makefile |
1027 The implementation constants are | 974 The @file{Makefile} is quite stylized. The idea is similar to an |
1028 | 975 @file{Imakefile} or an @code{automake} file: the complexity is hidden in |
1029 @table @asis | 976 generic rules files, in this case the @file{XEmacs.rules} include file |
1030 @item standards-version | 977 in the top directory of the packages hierarchy. |
1031 Currently 1.1. Defines the format of the @file{package-info.in} file | 978 |
1032 and the @file{Makefile}. A true implementation constant. | 979 It is important to note that the XEmacs used to compile packages is |
1033 | 980 the bare minimum: it is called with the @samp{-no-autoloads}. This |
1034 @item priority | 981 means that anything not dumped into XEmacs by default needs to be |
1035 An unimplemented and underspecified feature. Suggestions for | 982 specified in the @samp{REQUIRES} variable (for packaged Lisp) or in |
1036 specification and implementation welcome. | 983 some cases the @samp{PRELOADS} (autoloads used in libraries mentioned |
1037 | 984 in @samp{PRELOADS}). |
1038 @item dump | 985 |
1039 An obsolete feature, superseded by the @file{site-load.el} mechanism. | 986 There isn't much to an @xpms{} @file{Makefile}, basically it just |
1040 The value should always be nil. | 987 contains a few @file{Makefile} variables and that's it. See the |
1041 | 988 example. |
1042 @item filename | 989 |
1043 An obsolete feature, completely ignored. Don't even think about doing | 990 Here is a real world example, from the @samp{build} package: |
1044 anything useful with it. | 991 |
1045 @end table | 992 @example |
1046 | 993 # Makefile for build lisp code |
1047 | 994 |
1048 @node Makefile Variables, Makefile Targets, package-info.in Fields, Creating Packages | 995 # This file is part of XEmacs. |
1049 | 996 |
997 # XEmacs is free software; you can redistribute it and/or modify it | |
998 # under the terms of the GNU General Public License as published by the | |
999 # Free Software Foundation; either version 2, or (at your option) any | |
1000 # later version. | |
1001 | |
1002 # XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
1003 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
1004 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
1005 # for more details. | |
1006 | |
1007 # You should have received a copy of the GNU General Public License | |
1008 # along with XEmacs; see the file COPYING. If not, write to | |
1009 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
1010 # Boston, MA 02111-1307, USA. | |
1011 | |
1012 # For the time being, remove MULE_ELCS from the all dependencies if | |
1013 # building without Mule. | |
1014 | |
1015 VERSION = 1.10 | |
1016 AUTHOR_VERSION = 2.02 | |
1017 MAINTAINER = Adrian Aichner <adrian@@xemacs.org> | |
1018 PACKAGE = build | |
1019 PKG_TYPE = regular | |
1020 REQUIRES = xemacs-base pcl-cvs dired w3 prog-modes | |
1021 CATEGORY = standard | |
1022 | |
1023 ELCS = build.elc build-report.elc | |
1024 | |
1025 STANDARD_DOCS = t | |
1026 | |
1027 include ../../XEmacs.rules | |
1028 @end example | |
1029 | |
1030 Most packages don't need any more than what you see above. It is | |
1031 usually @emph{not} necessary to specify any special @file{Makefile} | |
1032 rules. Everything is handled from the @file{*.rules} files in the | |
1033 toplevel of the package source hierarchy. | |
1034 | |
1035 Of course, with that said, there are always exceptions to the rule. If | |
1036 you think that your package will need some special @file{Makefile} | |
1037 hackery contact the @email{xemacs-beta@@xemacs.org, XEmacs developers}. | |
1038 We distribute over 100 packages so the chances are good that you won't | |
1039 be the first to need such hackery and it is probably already catered | |
1040 for. | |
1041 | |
1042 @subheading @file{Makefile} Variables Explained: | |
1050 A number of @file{make} variables are defined by the @xpms{}. Some are | 1043 A number of @file{make} variables are defined by the @xpms{}. Some are |
1051 required, others are optional. Of course your @file{Makefile} may | 1044 required, others are optional. Of course your @file{Makefile} may |
1052 define other variables for private use, but you should be careful not to | 1045 define other variables for private use, but you should be careful not to |
1053 choose names that conflict with variables defined and used by the | 1046 choose names that conflict with variables defined and used by the |
1054 @xpms{}. | 1047 @xpms{}. |
1058 relevant, are given in parentheses. | 1051 relevant, are given in parentheses. |
1059 | 1052 |
1060 @c This is the canonical place for this information. If there is | 1053 @c This is the canonical place for this information. If there is |
1061 @c unnecessary duplication with package-info.in documentation, shorten | 1054 @c unnecessary duplication with package-info.in documentation, shorten |
1062 @c that and leave this full-length. | 1055 @c that and leave this full-length. |
1063 @table @code | 1056 @table @samp |
1064 @item VERSION | 1057 @item VERSION |
1065 (version) | 1058 (version) |
1066 The version of the XEmacs package, a numeric literal (a decimal | 1059 The version of the XEmacs package, a numeric literal (a decimal |
1067 fixed-point number with two-places of precision). | 1060 fixed-point number with two-places of precision). The only person who |
1061 ever needs to touch this is the XEmacs Packages Release Engineer. | |
1068 | 1062 |
1069 @item AUTHOR_VERSION | 1063 @item AUTHOR_VERSION |
1070 (author-version) | 1064 (author-version) |
1071 The upstream author's version, an unintepreted literal. | 1065 The upstream author's version, an uninterpreted literal. |
1072 | |
1073 @item DATE | |
1074 (date) | |
1075 Date of release of the upstream version. | |
1076 | 1066 |
1077 @item MAINTAINER | 1067 @item MAINTAINER |
1078 (maintainer) | 1068 (maintainer) |
1079 A literal containing the XEmacs package's maintainer and his/her email | 1069 A literal containing the XEmacs package's maintainer and his/her email |
1080 address. | 1070 address. |
1081 | 1071 |
1072 @item PACKAGE | |
1073 The name of the package, a literal | |
1074 | |
1075 @item PKG_TYPE | |
1076 The type of package, a literal containing either @samp{regular} for | |
1077 regular packages, or @samp{single-file} for single-file packages. This | |
1078 should feed the @samp{type} field in @file{package-info.in}, but | |
1079 currently it doesn't. | |
1080 | |
1081 @strong{N.B.} @samp{single-file} here does @emph{not} refer to the | |
1082 number of lisp files in a package. @xref{Package Terminology}. | |
1083 | |
1082 @item CATEGORY | 1084 @item CATEGORY |
1083 (category) | 1085 (category) |
1084 A literal, either @samp{standard} or @samp{mule}. Probably redundant. | 1086 A literal, either @samp{standard} or @samp{mule}. The non-Mule packages |
1087 are @samp{standard} and the Mule packages are, you guessed it, | |
1088 @samp{mule}. This field is used at package installation time as part of | |
1089 the process of determining where a package should be installed to. | |
1085 | 1090 |
1086 @item REQUIRES | 1091 @item REQUIRES |
1087 (requires) | 1092 (requires) |
1088 A list of packages required to correctly build this package. | 1093 A list of packages required to correctly build this package. |
1089 | 1094 |
1103 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp | 1108 @emph{impossible} to call a macro by name in byte-compiled Emacs Lisp |
1104 code. Thus, if the macro expansion is not inlined, the call will result | 1109 code. Thus, if the macro expansion is not inlined, the call will result |
1105 in an error at run-time! Thus, packages providing libraries that would | 1110 in an error at run-time! Thus, packages providing libraries that would |
1106 be loaded because of autoload definitions must also be included. | 1111 be loaded because of autoload definitions must also be included. |
1107 | 1112 |
1108 On the other hand, if a package provides no macros to this package, it | |
1109 is preferable @emph{not} to include it in @samp{REQUIRES}, because it is | |
1110 not uncommon that if the developer doesn't normally use the required | |
1111 package, he will never use the functionality in the package being built, | |
1112 either. In that case it would be preferable to not require the | |
1113 developer to have source for the dependencies. That said, of course it | |
1114 is safe to put too many packages in @samp{REQUIRES}. | |
1115 | |
1116 @item ELCS | 1113 @item ELCS |
1117 The list of the byte-compiled Lisp files used by the package. These | 1114 The list of the byte-compiled Lisp files used by the package. These |
1118 files and their @file{.el} versions will be included in the binary | 1115 files and their @file{.el} versions will be included in the binary |
1119 package. This variable determines which libraries will be | 1116 package. This variable determines which libraries will be |
1120 byte-compiled. These libraries are also deleted by @samp{make clean}. | 1117 byte-compiled. These libraries are also deleted by @samp{make clean}. |
1128 | 1125 |
1129 We don't consider this a feature, of course. Please do submit code to | 1126 We don't consider this a feature, of course. Please do submit code to |
1130 do sanity checking to @email{xemacs-patches@@xemacs.org}. | 1127 do sanity checking to @email{xemacs-patches@@xemacs.org}. |
1131 @end table | 1128 @end table |
1132 | 1129 |
1133 Optional, but very commonly used variables are explained below. | 1130 Optional, but commonly used variables are explained below. |
1134 | 1131 |
1135 @table @code | 1132 @table @samp |
1136 item EXTRA_SOURCES | 1133 @item ELCS_1 |
1134 A list of extra byte-compiled Lisp files used by the package to be | |
1135 installed in a subdirectory of the package's lisp directory. The same | |
1136 care should be taken with this as with @var{ELCS} in regard to | |
1137 @code{make clean}. | |
1138 | |
1139 @item ELCS_1_DEST | |
1140 The name of the subdirectory for the @var{ELCS_1} files to be installed | |
1141 to. Be sure to include @samp{$(PACKAGE)/} as part of the name. | |
1142 | |
1143 @example | |
1144 ELCS_1_DEST = $(PACKAGE)/extra | |
1145 @end example | |
1146 | |
1147 Would put the @var{ELCS_1} files for the package, @samp{foo} into | |
1148 @file{xemacs-packages/lisp/foo/extra/}. | |
1149 | |
1150 @item EARLY_GENERATED_LISP | |
1151 For additional @file{.el} files that will be generated before any | |
1152 byte-compiling happens. Use this for @samp{autoload-type} files. You | |
1153 must write @file{Makefile} rules to build these files. | |
1154 | |
1155 @item GENERATED_LISP | |
1156 For additional @file{.el} files that will be generated at | |
1157 byte-compilation time. You must write @file{Makefile} rules to build | |
1158 these files. | |
1159 | |
1160 @item PRELOADS | |
1161 This is used if you need to pass extra command line arguments to | |
1162 XEmacs to build the package. For instance, a specification for | |
1163 loading libraries containing macros before compiling the Lisp in the | |
1164 package. This is spliced directly into the invocation of XEmacs for | |
1165 byte-compilation, so it must contain the @samp{-l} flag for XEmacs: | |
1166 | |
1167 @example | |
1168 PRELOADS=-l ./apackage-macros.el -l ../bpackage/lisp/bpackage-macros.el | |
1169 @end example | |
1170 | |
1171 Preloads are loaded before @file{package-compile.el}, so the | |
1172 @var{load-path} is minimal. Therefore @samp{PRELOADS} must specify a | |
1173 full path to packaged Lisp. The base @var{load-path} does include the | |
1174 core Lisp directory, so core libraries are found. | |
1175 | |
1176 @item AUTOLOAD_PATH | |
1177 The subdirectory in the package's source tree where the @file{.el} files | |
1178 reside. This is where the @file{auto-autoloads.el} file will be placed. | |
1179 | |
1180 @strong{N.B.} There is no need to use this variable if the @file{.el} | |
1181 files are in the package's toplevel directory. @var{AUTOLOAD_PATH} | |
1182 defaults to @samp{.}. | |
1183 | |
1184 @item PACKAGE_SUPPRESS | |
1185 Place calls to @code{package-suppress} here to indicate Lisp libraries | |
1186 that should only be available to particular versions of XEmacs. For | |
1187 example: | |
1188 | |
1189 @example | |
1190 PACKAGE_SUPPRESS = \ | |
1191 (package-suppress 'xemacs-base \"regexp-opt\" '(emacs-version>= 21 5 11)) \ | |
1192 (package-suppress 'xemacs-base \"easy-mmode\" '(emacs-version>= 21 5 11)) | |
1193 @end example | |
1194 | |
1195 @c Change this when Ben has committed the WS that implements | |
1196 @c `package-suppress' --SY. | |
1197 @strong{N.B.} This feature has not yet been implemented in XEmacs yet. | |
1198 It will appear in an upcoming version of XEmacs 21.5. | |
1199 | |
1200 @item STANDARD_DOCS | |
1201 Set this to @samp{t} if your package's Texinfo source file is located in | |
1202 the package's toplevel directory @emph{and} is named | |
1203 @file{$(PACKAGE).texi}. | |
1204 | |
1205 @item EXPLICIT_DOCS | |
1206 Use this to explicitly list Texinfo sources that @emph{aren't} in the | |
1207 package's toplevel directory. For example: | |
1208 | |
1209 @example | |
1210 EXPLICIT_DOCS = texi/$(PACKAGE).texi | |
1211 @end example | |
1212 | |
1213 See @var{DOCS_TXI_EXTENSION} and @var{DOCS_TEXINFO_EXTENSION} if you | |
1214 don't use the @file{.texi} file extension on your Texinfo sources. | |
1215 | |
1216 @item EXTRA_TEXI_FILES | |
1217 List here extra Texinfo source files needed to build your | |
1218 documentation. Whatever is listed here is passed on to @code{makeinfo} | |
1219 as a dependency. | |
1220 | |
1221 @item EXTRA_HTML_FILES | |
1222 Use this to specify extra @file{.html} files to output. | |
1223 | |
1224 @item DOCS_TEXINFO_EXTENSION | |
1225 Set this to @samp{t} if your Texinfo source files have a @samp{.texinfo} | |
1226 extension. | |
1227 | |
1228 @item DOCS_TXI_EXTENSION | |
1229 Set this to @samp{t} if your Texinfo source files have a @samp{.txi} | |
1230 extension. | |
1231 | |
1232 @item EXTRA_DOC_FILES | |
1233 Files listed here will be installed to @file{.../man/$(PACKAGE)/}. For | |
1234 example, you might want to list @TeX{} files or @file{.eps} files here. | |
1235 | |
1236 @item EXTRA_SOURCES | |
1137 Other files (such as extra Lisp sources or an upstream @file{Makefile}) | 1237 Other files (such as extra Lisp sources or an upstream @file{Makefile}) |
1138 that are normally placed in the installed Lisp directory, but not | 1238 that are normally placed in the installed Lisp directory, but not |
1139 byte-compiled. These files are @emph{preserved} by the @samp{clean} | 1239 byte-compiled. These files are @emph{preserved} by the @samp{clean} |
1140 targets. | 1240 targets. |
1141 | 1241 |
1142 @item EXTRA_OBJS | 1242 @item LIBSRC_FILES |
1143 Other files (such as compiled autoload or concatenated @file{.elc} | 1243 For files that need to be installed to @file{lib-src/$(PACKAGE)/}. If |
1144 libraries) which are normally placed in the installed Lisp directory, | 1244 the files listed here need to be built you will have to write |
1145 but do @emph{not} have corresponding source files and @emph{should} be | 1245 @file{Makefile} rules to do so. |
1146 deleted by the @samp{clean} targets. Some of these (such as | |
1147 package-specific autoload setups) can and probably should be replaced by | |
1148 @xpms{} solutions such as @file{auto-autoloads.el}, but many cannot. | |
1149 | |
1150 @item PRELOADS | |
1151 A specification for loading libraries containing macros before compiling | |
1152 the Lisp in the package. This is spliced directly into the invocation | |
1153 of XEmacs for byte-compilation, so it must contain the @samp{-l} flag | |
1154 for XEmacs: | |
1155 | |
1156 @example | |
1157 PRELOADS=-l ./apackage-macros.el -l ../bpackage/lisp/bpackage-macros.el | |
1158 @end example | |
1159 | |
1160 Preloads are loaded before @file{package-compile.el}, so the | |
1161 @var{load-path} is minimal. Therefore @samp{PRELOADS} must specify a | |
1162 full path to packaged Lisp. The base @var{load-path} does include the | |
1163 core Lisp directory, so core libraries are found. | |
1164 | |
1165 @item INFO_FILES | |
1166 Any Info file(s) generated by the package. These must be paths relative | |
1167 to the root of the package's source tree. | |
1168 | |
1169 @item TEXI_FILES | |
1170 The Texinfo source file(s). These must be paths relative | |
1171 to the root of the package's source tree. | |
1172 | |
1173 @item MANUAL | |
1174 The name to be used for Info files and man pages. | |
1175 | 1246 |
1176 @item DATA_FILES | 1247 @item DATA_FILES |
1177 Any data files, such as pixmaps, READMEs, and ChangeLogs. These must be | 1248 Any data files, such as pixmaps, READMEs, and ChangeLogs. These must be |
1178 paths relative to the root of the package's source tree. These files | 1249 paths relative to the root of the package's source tree. These files |
1179 will be copied to @samp{$(DATA_DEST)} for installation. Any directory | 1250 will be copied to @samp{$(DATA_DEST)} for installation. Any directory |
1180 component of the path for a file will be stripped, so that the | 1251 component of the path for a file will be stripped, so that the |
1181 file ends up in @samp{$(DATA_DEST)}, not in a subdiredtory. If there are | 1252 file ends up in @samp{$(DATA_DEST)}, not in a subdiredtory. |
1182 several destination directories, the forms @samp{$(DATA_FILES_@var{n})} | |
1183 and @samp{$(DATA_DEST_@var{n})} (@var{n} may take values in 1-40) must | |
1184 be used. The @xpms{} doesn't make provision for copying trees at this | |
1185 time. | |
1186 | 1253 |
1187 @item DATA_DEST | 1254 @item DATA_DEST |
1188 The installation location for data files, relative to the @file{etc/} | 1255 The directory where the files in @var{DATA_FILES} are installed to. It |
1189 directory of the package hierarchy. The default is currently empty, but | 1256 is a subdirectory of the installed @file{etc/} directory. Be sure to |
1190 the normal value is simply $(PACKAGE). Leaving it empty (@emph{i.e.}, | 1257 prefix this value with @samp{$(PACKAGE)}, for example: |
1191 put it directly under @file{etc/}) will probably work, but is subject to | 1258 |
1192 name conflicts with other packages. If there are several destination | 1259 @example |
1193 directories, the form @samp{$(DATA_DEST_@var{n})} must be used. The | 1260 DATA_DEST = $(PACKAGE)/foo |
1194 @xpms{} doesn't make provision for copying trees at this time. | 1261 @end example |
1262 | |
1263 Would put files into @file{.../etc/$(PACKAGE)/foo/}. | |
1264 | |
1265 @item DATA_1_FILES ... DATA_35_FILES | |
1266 For data files that need to go into a different directory from | |
1267 @var{DATA_DEST}. | |
1268 | |
1269 @item DATA_1_DEST ... DATA_35_DEST | |
1270 The name of the subdirectory for files specified in @var{DATA_n_FILES}. | |
1271 And like @var{DATA_DEST}, be sure to prefix @samp{$(PACKAGE)} to the | |
1272 value of these variables. | |
1273 | |
1274 @item EXTRA_DEPENDENCIES | |
1275 For additional files to build that aren't appropriate to place in any | |
1276 other @file{Makefile} variable. You will need to write @file{Makefile} | |
1277 rules to build these files. | |
1195 @end table | 1278 @end table |
1196 | 1279 |
1197 The following variables are defaulted by @file{Local.rules} or | 1280 @section @file{package-compile.el} |
1198 @file{XEmacs.rules}. These variables often should be added to using | 1281 @cindex package-compile.el |
1199 @samp{+=} rather than set by @samp{=} or @samp{:=}. | 1282 @cindex compiling packages |
1200 | 1283 The @xpms{} does not automatically become aware of your package simply |
1201 @table @code | 1284 because there is a new subtree. If any package, including your own, |
1202 @item GENERATED | 1285 requires any of your files, it must be explicitly added to the compile |
1203 @c #### Is this correct? | 1286 environment or loads/requires that search load-path will fail. The |
1204 A list of @file{.elc} files compiled from @file{.el} files generated by | 1287 changes that need to be made are |
1205 the package build process. These files and the corresponding @file{.el} | 1288 |
1206 files are copied to the installed @file{lisp} directory. Defaults to | 1289 @table @strong |
1207 @samp{$@{AUTOLOAD_PATH@}/auto-autoloads.elc}. Typical usage is | 1290 @item an entry in @code{package-directory-map} |
1208 @example | 1291 This tells the @xpms{} which distribution (currently |
1209 GENERATED += $@{AUTOLOAD_PATH@}/custom-load.elc | 1292 @samp{xemacs-packages} or @samp{mule-packages}) your package is found |
1210 @end example | 1293 in. It then looks in the distribution subdirectory whose name is the |
1294 same as the package's. | |
1295 | |
1296 @item an entry in the @code{cond} in @code{package-name-to-directory} | |
1297 This is optional; it is necessary only if you keep your Lisp code | |
1298 somewhere other than the top-level directory of the package's source | |
1299 tree, eg, in @file{packages/xemacs-packages/@var{PACKAGE}/lisp}. | |
1211 @end table | 1300 @end table |
1212 | 1301 |
1213 Rarely used variables. | 1302 This only needs to be done once, when the package is first added to the |
1214 | 1303 @xpms{}. (Well, when you randomly change the subdirectory layout, too.) |
1215 @c @table @code | 1304 Your changes to @file{package-compile.el} must be cleared and checked in |
1216 @c @item | 1305 by the XEmacs Package Release Engineer before your package will build |
1217 @c @end table | 1306 correctly from a fresh checkout. |
1218 | 1307 |
1219 @node Makefile Targets, , Makefile Variables, Creating Packages | 1308 This is unfortunate; it works pretty well once set up, but can cause |
1220 | 1309 confusion when first building a package in the @xpms{} context. In |
1221 The standard targets that need to be defined in your @file{Makefile} | 1310 particular, if the @code{package-directory-map} entry for a required |
1222 follow. These normally should @emph{not} have an action. All of the | 1311 package, including the package itself, is not found, the necessary |
1223 work should be done by dependent targets, usually having standard | 1312 requires will not be executed by @file{package-compile.el}. If |
1224 definitions in the @xpms{}. | 1313 required functions are executed (under @code{eval-when-compile}), |
1225 | 1314 they won't be found and the compile will fail. If required function |
1226 @table @samp | 1315 is actually a macro, the byte compiler will not recognize that, |
1227 @item all | 1316 compile a function call to the macro. This will cause a run-time |
1228 A list of generated files, usually byte-compiled Lisp libraries, to be | 1317 error because the byte-code interpreter does not know how to execute |
1229 bundled in the package. The typical dependencies are | 1318 macros. (Macros can always be expanded at compile-time, and this is |
1230 | 1319 more efficient.) |
1231 @example | 1320 |
1232 $(ELCS) auto-autoloads.elc custom-load.elc | 1321 If your package keeps some or all Lisp code somewhere other than the top |
1233 @end example | 1322 directory, then an entry in @code{package-name-to-directory} is also |
1234 | 1323 necessary, or requires will fail, leading to the problems just described. |
1235 Other targets (such as Info files) may need to be added as dependencies | |
1236 for the @code{all} target. | |
1237 | |
1238 @item srckit | |
1239 The target for generating a source package. Not implemented. If it | |
1240 were, the normal dependency would be @samp{srckit-std}. | |
1241 | |
1242 @item binkit | |
1243 The target for creating a ``master'' installation. Binary packages are | |
1244 actually generated by the @samp{bindist} target. @xref{Building Packages}. | |
1245 @end table | |
1246 | |
1247 Standard dependencies for @code{srckit} and @code{binkit} are defined in | |
1248 @file{XEmacs.rules}. The most useful of these values are given in the | |
1249 following table. | |
1250 | |
1251 @table @samp | |
1252 @item srckit-std | |
1253 Build a standard source kit. Not fully implemented. | |
1254 | |
1255 @item binkit-sourceonly | |
1256 The @samp{binkit} target need only install source and compiled Lisp in | |
1257 the staging area. There is nothing to install in a data directory or | |
1258 info directory. | |
1259 | |
1260 @item binkit-sourceinfo | |
1261 Both source and info files are to be installed in the staging area. | |
1262 | |
1263 @item binkit-sourcedata | |
1264 Both source and etc (data) files are to be installed in the staging | |
1265 area. | |
1266 | |
1267 @item binkit-sourcedatainfo | |
1268 Source, etc (data), and info files all are present and need to be | |
1269 installed in the staging area. | |
1270 | |
1271 @item binkit-common | |
1272 A dependency for all the above. (In fact in the current implementation | |
1273 @samp{binkit-common} does all the work for all of the @samp{binkit} | |
1274 targets.) | |
1275 @end table | |
1276 | |
1277 Data files include things like pixmaps for a package-specific toolbar, | |
1278 and are normally installed in @file{etc/@var{PACKAGE_NAME}}. A few | |
1279 packages have needs beyond the basic templates. See @file{XEmacs.rules} | |
1280 or a future revision of this manual for details. | |
1281 | |
1282 | 1324 |
1283 @node Documenting Packages, Issues, Creating Packages, Packaging | 1325 @node Documenting Packages, Issues, Creating Packages, Packaging |
1284 @comment node-name, next, previous, up | 1326 @comment node-name, next, previous, up |
1285 @cindex documenting packages | 1327 @cindex documenting packages |
1286 @heading Documenting Packages: | 1328 @heading Documenting Packages: |