1 \input texinfo @c -*- texinfo -*-
7 @c @setchapternewpage odd
8 @c @footnotestyle separate
10 @dircategory Administration
12 * Stow: (stow). GNU Stow.
18 This file describes GNU Stow version @value{VERSION}, a program for
19 managing the installation of software packages.
21 Software and documentation Copyright @copyright{} 1993, 1994, 1995, 1996
22 by Bob Glickstein <bobg+stow@@zanshin.com>.
23 Copyright @copyright{} 2000, 2001 Guillaume Morin <gmorin@@gnu.org>.
24 Copyright @copyright{} 2007 Kahlil (Kal) Hodgson <kahlil@@internode.on.net>.
26 Permission is granted to make and distribute verbatim copies of this
27 manual provided the copyright notice and this permission notice are
28 preserved on all copies.
31 Permission is granted to process this file through TeX and print the
32 results, provided the printed document carries a copying permission
33 notice identical to this one except for the removal of this paragraph
34 (this paragraph not being relevant to the printed manual).
37 Permission is granted to copy and distribute modified versions of this
38 manual under the conditions for verbatim copying, provided also that the
39 section entitled ``GNU General Public License'' is included with the
40 modified manual, and provided that the entire resulting derived work is
41 distributed under the terms of a permission notice identical to this
44 Permission is granted to copy and distribute translations of this manual
45 into another language, under the above conditions for modified versions,
46 except that this permission notice may be stated in a translation
47 approved by the Free Software Foundation.
51 @title Stow @value{VERSION}
52 @subtitle Managing the installation of software packages
53 @author Bob Glickstein, Zanshin Software, Inc.
54 @author Kahlil Hodgson, RMIT Univerity, Australia.
56 @vskip 0pt plus 1filll
57 This manual describes GNU Stow version @value{VERSION}, a program for
58 managing the installation of software packages.
60 Software and documentation Copyright @copyright{} 1993, 1994, 1995, 1996
61 by Bob Glickstein <bobg+stow@@zanshin.com>.
62 Copyright @copyright{} 2000,2001 Guillaume Morin <gmorin@@gnu.org>
63 Copyright @copyright{} 2007 Kahlil (Kal) Hodgson <kahlil@@internode.on.net>
65 Permission is granted to make and distribute verbatim copies of this
66 manual provided the copyright notice and this permission notice are
67 preserved on all copies.
69 Permission is granted to copy and distribute modified versions of this
70 manual under the conditions for verbatim copying, provided also that the
71 section entitled ``GNU General Public License'' is included with the
72 modified manual, and provided that the entire resulting derived work is
73 distributed under the terms of a permission notice identical to this
76 Permission is granted to copy and distribute translations of this manual
77 into another language, under the above conditions for modified versions,
78 except that this permission notice may be stated in a translation
79 approved by the Free Software Foundation.
83 @c ==========================================================================
84 @node Top, Introduction, (dir), (dir)
87 This manual describes GNU Stow @value{VERSION}, a program for managing
88 the installation of software packages.
92 * Introduction:: Description of Stow.
93 * Terminology:: Terms used by this manual.
94 * Invoking Stow:: Option summary.
95 * Installing Packages:: Using Stow to install.
96 * Deleting Packages:: Using Stow to uninstall.
97 * Conflicts:: When Stow can't stow.
98 * Deferred Operation:: Using two passes to stow.
99 * Mixing Operations:: Multiple actions per invocation.
100 * Multiple Stow Directories:: Further segregating software.
101 * Target Maintenance:: Cleaning up mistakes.
102 * Resource Files:: Setting default command line options.
103 * Compile-time vs Install-time:: Faking out `make install'.
104 * Bootstrapping:: When stow and perl are not yet stowed.
105 * Reporting Bugs:: How, what, where, and when to report.
106 * Known Bugs:: Don't report any of these.
107 * GNU General Public License:: Copying terms.
108 * Index:: Index of concepts.
110 --- The Detailed Node Listing ---
112 Compile-time and install-time
115 * Other FSF Software::
117 * Perl and Perl 5 Modules::
121 @c ===========================================================================
122 @node Introduction, Terminology, Top, Top
123 @chapter Introduction
125 Stow is a tool for managing the installation of multiple software
126 packages in the same run-time directory tree. One historical difficulty
127 of this task has been the need to administer, upgrade, install, and
128 remove files in independent packages without confusing them with other
129 files sharing the same file system space. For instance, it is common to
130 install Perl and Emacs in @file{/usr/local}. When one does so, one
131 winds up with the following files@footnote{As of Perl 4.036 and Emacs
132 19.22.} in @file{/usr/local/man/man1}:
145 Now suppose it's time to uninstall Perl. Which man pages
146 get removed? Obviously @file{perl.1} is one of them, but it should not
147 be the administrator's responsibility to memorize the ownership of
148 individual files by separate packages.
150 The approach used by Stow is to install each package into its own
151 tree, then use symbolic links to make it appear as though the files are
152 installed in the common tree. Administration can be performed in the
153 package's private tree in isolation from clutter from other packages.
154 Stow can then be used to update the symbolic links. The structure
155 of each private tree should reflect the desired structure in the common
156 tree; i.e. (in the typical case) there should be a @file{bin} directory
157 containing executables, a @file{man/man1} directory containing section 1
158 man pages, and so on.
160 Stow was inspired by Carnegie Mellon's Depot program, but is
161 substantially simpler and safer. Whereas Depot required database files
162 to keep things in sync, Stow stores no extra state between runs, so
163 there's no danger (as there was in Depot) of mangling directories when
164 file hierarchies don't match the database. Also unlike Depot, Stow will
165 never delete any files, directories, or links that appear in a Stow
166 directory (e.g., @file{/usr/local/stow/emacs}), so it's always possible
167 to rebuild the target tree (e.g., @file{/usr/local}).
169 For information about the latest version of Stow, you can refer to
170 http://www.gnu.org/software/stow/.
173 @c ===========================================================================
174 @node Terminology, Invoking Stow, Introduction, Top
179 A @dfn{package} is a related collection of files and directories that
180 you wish to administer as a unit --- e.g., Perl or Emacs --- and that needs
181 to be installed in a particular directory structure --- e.g., with
182 @file{bin}, @file{lib}, and @file{man} subdirectories.
184 @cindex target directory
185 A @dfn{target directory} is the root of a tree in which one or more
186 packages wish to @emph{appear} to be installed. A common, but by no
187 means the only such location is @file{/usr/local}. The examples in this
188 manual will use @file{/usr/local} as the target directory.
190 @cindex stow directory
191 A @dfn{stow directory} is the root of a tree containing separate
192 packages in private subtrees. When Stow runs, it uses the current
193 directory as the default stow directory. The examples in this manual
194 will use @file{/usr/local/stow} as the stow directory, so that
195 individual packages will be, for example, @file{/usr/local/stow/perl}
196 and @file{/usr/local/stow/emacs}.
198 @cindex installation image
199 An @dfn{installation image} is the layout of files and directories
200 required by a package, relative to the target directory. Thus, the
201 installation image for Perl includes: a @file{bin} directory containing
202 @file{perl} and @file{a2p} (among others); an @file{info} directory
203 containing Texinfo documentation; a @file{lib/perl} directory containing
204 Perl libraries; and a @file{man/man1} directory containing man pages.
206 @cindex package directory
208 A @dfn{package directory} is the root of a tree containing the
209 installation image for a particular package. Each package directory
210 must reside in a stow directory --- e.g., the package directory
211 @file{/usr/local/stow/perl} must reside in the stow directory
212 @file{/usr/local/stow}. The @dfn{name} of a package is the name of its
213 directory within the stow directory --- e.g., @file{perl}.
215 Thus, the Perl executable might reside in
216 @file{/usr/local/stow/perl/bin/perl}, where @file{/usr/local} is the
217 target directory, @file{/usr/local/stow} is the stow directory,
218 @file{/usr/local/stow/perl} is the package directory, and
219 @file{bin/perl} within is part of the installation image.
222 @cindex relative symlink
223 @cindex absolute symlink
224 A @dfn{symlink} is a symbolic link. A symlink can be @dfn{relative} or
225 @dfn{absolute}. An absolute symlink names a full path; that is, one
226 starting from @file{/}. A relative symlink names a relative path; that
227 is, one not starting from @file{/}. The target of a relative symlink is
228 computed starting from the symlink's own directory. Stow only
229 creates relative symlinks.
231 @c ===========================================================================
232 @node Invoking Stow, Installing Packages, Terminology, Top
233 @chapter Invoking Stow
235 The syntax of the @code{stow} command is:
238 stow [@var{options}] [@var{action flag}] @var{package @dots{}}
242 Each @var{package} is the name of a package (e.g., @samp{perl}) in the stow
243 directory that we wish to install into (or delete from) the target directory.
244 The default action is to install the given packages, although alternate actions
245 may be specified by preceding the package name(s) with an @var{action flag}.
246 Unless otherwise specified, the stow directory is assumed to be
247 the current directory and the target directory is assumed to be the parent of
248 the current directory, so it is typical to execute @code{stow} from the
249 directory @file{/usr/local/stow}.
252 The following options are supported:
257 @itemx --dir=@var{dir}
258 Set the stow directory to @var{dir} instead of the current directory.
259 This also has the effect of making the default target directory be the
263 @itemx --target=@var{dir}
264 Set the target directory to @var{dir} instead of the parent of the stow
267 @item --ignore='<regex>'
268 This (repeatable) option lets you suppress acting on files that match the
269 given perl regular expression. For example, using the options
272 --ignore='~' --ignore='\.#.*'
276 will cause stow to ignore emacs and CVS backup files.
278 Note that the regular expression is anchored to the end of the filename,
279 because this is what you will want to do most of the time.
281 @item --defer='<regex>'
282 This (repeatable) option lets you defer stowing a file matching the given
283 regular expression, if that file is already stowed by another package. For
284 example, the following options
287 --defer='man' --defer='info'
291 will cause stow to skip over pre-existing man and info pages.
293 Equivalently, you could use --defer='man|info' since the argument is just
296 Note that the regular expression is anchored to the beginning of the path
297 relative to the target directory, because this is what you will want to do most
300 @item --override='<regex>'
301 This (repeatable) option forces any file matching the regular expression to be
302 stowed, even if the file is already stowed to another package. For example,
303 the following options
306 --override='man' --override='info'
310 will permit stow to overwrite links that point to pre-existing man and info
311 pages that are owned by stow and would otherwise cause a conflict.
313 The regular expression is anchored to the beginning of the path relative to
314 the target directory, because this is what you will want to do most of the time.
319 Do not perform any operations that modify the file system; in combination with
320 @samp{-v} can be used to merely show what would happen.
323 @itemx --verbose[=@var{n}]
324 Send verbose output to standard error describing what Stow is
325 doing. Verbosity levels are 0, 1, 2, and 3; 0 is the default. Using
326 @samp{-v} or @samp{--verbose} increases the verbosity by one; using
327 @samp{--verbose=@var{n}} sets it to @var{n}.
331 Scan the whole target tree when unstowing. By default, only directories
332 specified in the @dfn{installation image} are scanned during an unstow
333 operation. Scanning the whole tree can be prohibitive if your target tree is
334 very large. This option restores the legacy behaviour; however, the
335 @samp{--badlinks} option may be a better way of ensuring that your
336 installation does not have any dangling symlinks.
340 Show Stow version number, and exit.
344 Show Stow command syntax, and exit.
347 The following @var{action flags} are supported:
352 Delete (unstow) the package name(s) that follow this option from the @dfn{target
353 directory}. This option may be repeated any number of times.
357 Restow (first unstow, then stow again) the package names that follow this
358 option. This is useful for pruning obsolete symlinks from the target tree
359 after updating the software in a package. This option may be repeated any
364 explictly stow the package name(s) that follow this option. May be omitted if
365 you are not using the @samp{-D} or @samp{-R} options in the same invocation.
366 See @xref{Mixing Operations}, for details of when you might like to use this
367 feature. This option may be repeated any number of times.
370 The following options are useful for cleaning up your target tree:
375 Checks target directory for bogus symbolic links. That is, links that point to
380 Checks for files in the target directory that are not symbolic links. The
381 target directory should be managed by stow alone, except for directories that
382 contain a @file{.stow} file.
386 Will display the target package for every symbolic link in the stow target
388 The following options are deprecated:
391 The following options are deprecated as of Stow Version 2:
395 Print any conflicts that are encountered. This option
396 implies @samp{-n}, and is used to search for all conflicts that might
397 arise from an actual Stow operation.
399 This option is deprecated as conflicts are now printed by default and no
400 operations will be performed if any conflicts are detected.
403 @ref{Resource Files} for a way to set default values for any of these options
406 @c ===========================================================================
407 @node Installing Packages, Deleting Packages, Invoking Stow, Top
408 @chapter Installing Packages
411 The default action of Stow is to install a package. This means creating
412 symlinks in the target tree that point into the package tree. Stow
413 attempts to do this with as few symlinks as possible; in other words, if
414 Stow can create a single symlink that points to an entire subtree within
415 the package tree, it will choose to do that rather than create a
416 directory in the target tree and populate it with symlinks.
419 @cindex directory folding
420 @cindex folding trees
421 For example, suppose that no packages have yet been installed in
422 @file{/usr/local}; it's completely empty (except for the @file{stow}
423 subdirectory, of course). Now suppose the Perl package is installed.
424 Recall that it includes the following directories in its installation
425 image: @file{bin}; @file{info}; @file{lib/perl}; @file{man/man1}.
426 Rather than creating the directory @file{/usr/local/bin} and populating
427 it with symlinks to @file{../stow/perl/bin/perl} and
428 @file{../stow/perl/bin/a2p} (and so on), Stow will create a
429 single symlink, @file{/usr/local/bin}, which points to
430 @file{stow/perl/bin}. In this way, it still works to refer to
431 @file{/usr/local/bin/perl} and @file{/usr/local/bin/a2p}, and fewer
432 symlinks have been created. This is called @dfn{tree folding}, since an
433 entire subtree is ``folded'' into a single symlink.
435 To complete this example, Stow will also create the symlink
436 @file{/usr/local/info} pointing to @file{stow/perl/info}; the symlink
437 @file{/usr/local/lib} pointing to @file{stow/perl/lib}; and the symlink
438 @file{/usr/local/man} pointing to @file{stow/perl/man}.
440 Now suppose that instead of installing the Perl package into an empty
441 target tree, the target tree is not empty to begin with. Instead, it
442 contains several files and directories installed under a different
443 system-administration philosophy. In particular, @file{/usr/local/bin}
444 already exists and is a directory, as are @file{/usr/local/lib} and
445 @file{/usr/local/man/man1}. In this case, Stow will descend into
446 @file{/usr/local/bin} and create symlinks to
447 @file{../stow/perl/bin/perl} and @file{../stow/perl/bin/a2p} (etc.),
448 and it will descend into @file{/usr/local/lib} and create the
449 tree-folding symlink @file{perl} pointing to
450 @file{../stow/perl/lib/perl}, and so on. As a rule, Stow only
451 descends as far as necessary into the target tree when it can create a
452 tree-folding symlink.
454 @cindex splitting open folded trees
455 @cindex unfolding trees
456 The time often comes when a tree-folding symlink has to be undone
457 because another package uses one or more of the folded subdirectories in
458 its installation image. This operation is called @dfn{splitting open} or
459 @dfn{unfolding} a folded tree. It involves removing the original symlink from
460 the target tree, creating a true directory in its place, and then populating the
461 new directory with symlinks to the newly-installed package @emph{and} to
462 the old package that used the old symlink. For example, suppose that
463 after installing Perl into an empty @file{/usr/local}, we wish to
464 install Emacs. Emacs's installation image includes a @file{bin}
465 directory containing the @file{emacs} and @file{etags} executables,
466 among others. Stow must make these files appear to be installed
467 in @file{/usr/local/bin}, but presently @file{/usr/local/bin} is a
468 symlink to @file{stow/perl/bin}. Stow therefore takes the
469 following steps: the symlink @file{/usr/local/bin} is deleted; the
470 directory @file{/usr/local/bin} is created; links are made from
471 @file{/usr/local/bin} to @file{../stow/emacs/bin/emacs} and
472 @file{../stow/emacs/bin/etags}; and links are made from
473 @file{/usr/local/bin} to @file{../stow/perl/bin/perl} and
474 @file{../stow/perl/bin/a2p}.
477 When splitting open a folded tree, Stow makes sure that the
478 symlink it is about to remove points inside a valid package in the
479 current stow directory. @emph{Stow will never delete anything
480 that it doesn't own}. Stow ``owns'' everything living in the
481 target tree that points into a package in the stow directory. Anything
482 Stow owns, it can recompute if lost: symlinks that point into a package in
483 the stow directory, or directories that only contain sysmlinks that stow
484 ``owns''. Note that by this definition, Stow doesn't ``own'' anything
485 @emph{in} the stow directory or in any of the packages.
488 If Stow needs to create a directory or a symlink in the target
489 tree and it cannot because that name is already in use and is not owned
490 by Stow, then a @dfn{conflict} has arisen. @xref{Conflicts}.
493 @c ===========================================================================
494 @node Deleting Packages, Conflicts, Installing Packages, Top
495 @chapter Deleting Packages
498 When the @samp{-D} option is given, the action of Stow is to
499 delete a package from the target tree. Note that Stow will not
500 delete anything it doesn't ``own''. Deleting a package does @emph{not}
501 mean removing it from the stow directory or discarding the package
504 To delete a package, Stow recursively scans the target tree, skipping over any
505 directory that is not included in the installation image.@footnote{This
506 approach was introduced in version 2 of GNU Stow. Previously, the whole
507 target tree was scanned and stow directories were explicitly omitted. This
508 became problematic when dealing with very large installations. The only
509 situation where this is useful is if you accidentally delete a directory in
510 the package tree, leaving you with a whole bunch of dangling links. Note that
511 you can enable the old approach with the @samp{-p} option. Alternatively, you can
512 use the @samp{--badlinks} option get stow to search for dangling links in your target tree and remove the offenders manually.}
513 For example, if the target directory is @file{/usr/local} and the
514 installation image for the package being deleted has only a @file{bin}
515 directory and a @file{man} directory at the top level, then we only scan
516 @file{/usr/local/bin} and @file{/usr/local/bin/man}, and not
517 @file{/usr/local/lib} or @file{/usr/local/share}, or for that matter
518 @file{/usr/local/stow}. Any symlink it finds that points into the package
519 being deleted is removed. Any directory that contained only symlinks to the
520 package being deleted is removed. Any directory that, after removing symlinks
521 and empty subdirectories, contains only symlinks to a single other package, is
522 considered to be a previously ``folded'' tree that was ``split open.'' Stow
523 will re-fold the tree by removing the symlinks to the surviving package,
524 removing the directory, then linking the directory back to the surviving
528 @c ===========================================================================
529 @node Conflicts, Deferred Operation, Deleting Packages, Top
532 If, during installation, a file or symlink exists in the target tree and
533 has the same name as something Stow needs to create, and if the
534 existing name is not a folded tree that can be split open, then a
535 @dfn{conflict} has arisen. A conflict also occurs if a directory exists
536 where Stow needs to place a symlink to a non-directory. On the
537 other hand, if the existing name is merely a symlink that already points
538 where Stow needs it to, then no conflict has occurred. (Thus it
539 is harmless to install a package that has already been installed.)
541 A conflict causes Stow to exit immediately and print a warning
542 (unless @samp{-c} is given), even if that means aborting an installation
545 @cindex false conflict
546 When running Stow with the @samp{-n} or @samp{-c} options, no actual
547 filesystem-modifying operations take place. Thus if a folded tree would
548 have been split open, but instead was left in place because @samp{-n} or
549 @samp{-c} was used, then Stow will report a @dfn{false conflict}, since
550 the directory that Stow was expecting to populate has remained an
551 un-populatable symlink.
553 @c ===========================================================================
554 @node Deferred Operation, Mixing Operations, Conflicts, Top
555 @chapter Deferred Operation
557 For complex packages, scanning the stow and target trees in tandem, and
558 deciding whether to make directories or links, split-open or fold directories,
559 can actually take a long time (a number of seconds). Moreover, an accurate
560 analysis of potential conflicts, requires us to take in to account all of
563 Accidentally stowing a package that will result in a conflict
565 @c ===========================================================================
566 @node Mixing Operations, Multiple Stow Directories, Deferred Operation, Top
567 @chapter Mixing Operations
569 Since Version 2.0, multiple distinct actions can be specified in a single
570 invocation of GNU Stow. For example, to update an installation of Emacs from
571 version 21.3 to 21.4a you can now do the following:
574 stow -D emacs-21.3 -S emacs-21.4a
578 which will replace emacs-21.3 with emacs-21.4a using a single invocation.
580 This is much faster and cleaner than performing two separate invocations of
581 stow, because redundant folding/unfolding operations can be factored out.
582 In addition, all the operations are calculated and merged before being executed
583 @pxref{Deferred Operation}, so the amount of of time in which GNU Emacs is unavailable is minimised.
585 You can mix and match any number of actions, for example,
588 stow -S pkg1 pkg2 -D pkg3 pkg4 -S pkg5 -R pkg6
592 will unstow pkg3, pkg4 and pkg6, then stow pkg1, pkg2, pkg5 and pkg6.
594 @c ===========================================================================
595 @node Multiple Stow Directories, Target Maintenance, Mixing Operations, Top
596 @chapter Multiple Stow Directories
598 If there are two or more system administrators who wish to maintain
599 software separately, or if there is any other reason to want two or more
600 stow directories, it can be done by creating a file named @file{.stow}
601 in each stow directory. The presence of @file{/usr/local/foo/.stow}
602 informs Stow that, though @file{foo} is not the current stow
603 directory, and though it is a subdirectory of the target directory,
604 nevertheless it is @emph{a} stow directory and as such Stow
605 doesn't ``own'' anything in it (@pxref{Installing Packages}). This will
606 protect the contents of @file{foo} from a @samp{stow -D}, for instance.
608 XXX is this still true? XXX
610 When multiple stow directories share a target tree, the effectiveness
611 of Stow is reduced. If a tree-folding symlink is encountered and
612 needs to be split open during an installation, but the symlink points
613 into the wrong stow directory, Stow will report a conflict rather
614 than split open the tree (because it doesn't consider itself to own the
615 symlink, and thus cannot remove it).
618 @c ===========================================================================
619 @node Target Maintenance, Resource Files, Multiple Stow Directories, Top
620 @chapter Target Maintenance
622 From time to time you will need to clean up your target tree.
623 Stow includes three operational modes that performs checks that
624 would generally be too expensive to performed during normal stow
627 I've added a -l option to chkstow
628 which will give you a listing of every package name that has already been stowed
629 should be able to diff this with your directory listing
633 diff <(../bin/chkstow -l) <(ls -1)
636 @c ===========================================================================
637 @node Resource Files, Compile-time vs Install-time, Target Maintenance, Top
638 @chapter Resource Files
640 Default command line options may be set in `.stowrc' (current directory) or
641 `~/.stowrc' (home directory). These are parsed in that order, and effectively
642 prepended to you command line. This feature can be used for some interesting
645 For example, suppose your site uses more than one stow directory, perhaps in
646 order to share around responsibilities with a number of systems
647 administrators. One of the administrators might have the following in there
651 --dir=/usr/local/stow2
657 so that the `stow' command will default to operating on the @file{/usr/local/stow2}
658 directory, with @file{/usr/local} as the target, and ignoring vi backup files
661 If you had a stow directory `/usr/local/stow/perl-extras' that was only used
662 for Perl modules, then you might place the following in
663 `/usr/local/stow/perl-extras/.stowrc':
666 --dir=/usr/local/stow/perl-extras
670 --ignore='perllocal\.pod'
671 --ignore='\.packlist'
675 so that the when your are in the @file{/usr/local/stow/perl-extras} directory,
676 `stow' will regard any subdirectories as stow packages, with @file{/usr/local}
677 as the target (rather than the immediate parent directoy
678 @file{/usr/local/stow}), overriding any pre-existing links to bin files or man
679 pages, and ignoring some cruft that gets installed by default.
682 @c ===========================================================================
683 @node Compile-time vs Install-time, Bootstrapping, Resource Files, Top
684 @chapter Compile-time vs Install-time
686 Software whose installation is managed with Stow needs to be installed
687 in one place (the package directory, e.g. @file{/usr/local/stow/perl})
688 but needs to appear to run in another place (the target tree, e.g.,
689 @file{/usr/local}). Why is this important? What's wrong with Perl, for
690 instance, looking for its files in @file{/usr/local/stow/perl} instead
691 of in @file{/usr/local}?
693 The answer is that there may be another package, e.g.,
694 @file{/usr/local/stow/perl-extras}, stowed under @file{/usr/local}. If
695 Perl is configured to find its files in @file{/usr/local/stow/perl}, it
696 will never find the extra files in the @samp{perl-extras} package, even
697 though they're intended to be found by Perl. On the other hand, if Perl
698 looks for its files in @file{/usr/local}, then it will find the
699 intermingled Perl and @samp{perl-extras} files.
701 This means that when you compile a package, you must tell it the
702 location of the run-time, or target tree; but when you install it, you
703 must place it in the stow tree.
705 Some software packages allow you to specify, at compile-time, separate
706 locations for installation and for run-time. Perl is one such package;
707 @xref{Perl and Perl 5 Modules}. Others allow you to compile the
708 package, then give a different destination in the @samp{make install}
709 step without causing the binaries or other files to get rebuilt. Most
710 GNU software falls into this category; Emacs is a notable exception.
711 See @ref{GNU Emacs}, and @ref{Other FSF Software}.
713 Still other software packages cannot abide the idea of separate
714 installation and run-time locations at all. If you try to @samp{make
715 install prefix=/usr/local/stow/@var{foo}}, then first the whole package
716 will be recompiled to hardwire the @file{/usr/local/stow/@var{foo}}
717 path. With these packages, it is best to compile normally, then run
718 @samp{make -n install}, which should report all the steps needed to
719 install the just-built software. Place this output into a file, edit
720 the commands in the file to remove recompilation steps and to reflect
721 the Stow-based installation location, and execute the edited file as a
722 shell script in place of @samp{make install}. Be sure to execute the
723 script using the same shell that @samp{make install} would have used.
725 (If you use GNU Make and a shell [such as GNU bash] that understands
726 @code{pushd} and @code{popd}, you can do the following:
730 Replace all lines matching @samp{make[@var{n}]: Entering directory
731 `@var{dir}'} with @code{pushd @var{dir}}.
733 Replace all lines matching @samp{make[@var{n}]: Leaving directory
734 `@var{dir}'} with @code{popd}.
736 Delete all lines matching @samp{make[@var{n}]: Nothing to be done for
740 Then find other lines in the output containing @code{cd} or @code{make}
741 commands and rewrite or delete them. In particular, you should be able
742 to delete sections of the script that resemble this:
745 for i in @var{dir_1} @var{dir_2} @r{@dots{}}; do \
746 (cd $i; make @var{args} @r{@dots{}}) \
751 Note, that's ``should be able to,'' not ``can.'' Be sure to modulate
752 these guidelines with plenty of your own intelligence.
754 The details of stowing some specific packages are described in the
759 * Other FSF Software::
761 * Perl and Perl 5 Modules::
764 @c ---------------------------------------------------------------------------
765 @node GNU Emacs, Other FSF Software, Compile-time vs Install-time, Compile-time vs Install-time
768 Although the Free Software Foundation has many enlightened practices
769 regarding Makefiles and software installation (see @pxref{Other FSF
770 Software}), Emacs, its flagship program, doesn't quite follow the
771 rules. In particular, most GNU software allows you to write:
775 make install prefix=/usr/local/stow/@var{package}
779 If you try this with Emacs, then the new value for @code{prefix} in the
780 @samp{make install} step will cause some files to get recompiled with
781 the new value of @code{prefix} wired into them. In Emacs 19.23 and
782 later,@footnote{As I write this, the current version of Emacs is 19.31.}
783 the way to work around this problem is:
787 make install-arch-dep install-arch-indep prefix=/usr/local/stow/emacs
790 In 19.22 and some prior versions of Emacs, the workaround was:
794 make do-install prefix=/usr/local/stow/emacs
797 @c ---------------------------------------------------------------------------
798 @node Other FSF Software, Cygnus Software, GNU Emacs, Compile-time vs Install-time
799 @section Other FSF Software
801 The Free Software Foundation, the organization behind the GNU project,
802 has been unifying the build procedure for its tools for some time.
803 Thanks to its tools @samp{autoconf} and @samp{automake}, most packages
804 now respond well to these simple steps, with no other intervention
808 ./configure @var{options}
810 make install prefix=/usr/local/stow/@var{package}
813 Hopefully, these tools can evolve to be aware of Stow-managed packages,
814 such that providing an option to @samp{configure} can allow @samp{make}
815 and @samp{make install} steps to work correctly without needing to
816 ``fool'' the build process.
818 @c ---------------------------------------------------------------------------
819 @node Cygnus Software, Perl and Perl 5 Modules, Other FSF Software, Compile-time vs Install-time
820 @section Cygnus Software
822 Cygnus is a commercial supplier and supporter of GNU software. It has
823 also written several of its own packages, released under the terms of
824 the GNU General Public License; and it has taken over the maintenance of
825 other packages. Among the packages released by Cygnus are @samp{gdb},
826 @samp{gnats}, and @samp{dejagnu}.
828 Cygnus packages have the peculiarity that each one unpacks into a
829 directory tree with a generic top-level Makefile, which is set up to
830 compile @emph{all} of Cygnus' packages, any number of which may reside
831 under the top-level directory. In other words, even if you're only
832 building @samp{gnats}, the top-level Makefile will look for, and try to
833 build, @file{gdb} and @file{dejagnu} subdirectories, among many others.
835 The result is that if you try @samp{make -n install
836 prefix=/usr/local/stow/@var{package}} at the top level of a Cygnus
837 package, you'll get a bewildering amount of output. It will then be
838 very difficult to visually scan the output to see whether the install
839 will proceed correctly. Unfortunately, it's not always clear how to
840 invoke an install from the subdirectory of interest.
842 In cases like this, the best approach is to run your @samp{make install
843 prefix=@r{@dots{}}}, but be ready to interrupt it if you detect that it
844 is recompiling files. Usually it will work just fine; otherwise,
847 @c ---------------------------------------------------------------------------
848 @node Perl and Perl 5 Modules, , Cygnus Software, Compile-time vs Install-time
849 @section Perl and Perl 5 Modules
851 Perl 4.036 allows you to specify different locations for installation
852 and for run-time. It is the only widely-used package in this author's
853 experience that allows this, though hopefully more packages will adopt
856 Unfortunately, the authors of Perl believed that only AFS sites need
857 this ability. The configuration instructions for Perl 4 misleadingly
858 state that some occult means are used under AFS to transport files from
859 their installation tree to their run-time tree. In fact, that confusion
860 arises from the fact that Depot, Stow's predecessor, originated at
861 Carnegie Mellon University, which was also the birthplace of AFS. CMU's
862 need to separate install-time and run-time trees stemmed from its use of
865 The result of this confusion is that Perl 5's configuration script
866 doesn't even offer the option of separating install-time and run-time
867 trees @emph{unless} you're running AFS. Fortunately, after you've
868 entered all the configuration settings, Perl's setup script gives you
869 the opportunity to edit those settings in a file called
870 @file{config.sh}. When prompted, you should edit this file and replace
874 inst@r{@dots{}}/usr/local@r{@dots{}}
881 inst@r{@dots{}}/usr/local/stow/perl@r{@dots{}}
885 You can do this with the following Unix command:
888 sed 's,^\(inst.*/usr/local\),\1/stow/perl,' config.sh > config.sh.new
889 mv config.sh.new config.sh
892 Hopefully, the Perl authors will correct this deficiency in Perl 5's
893 configuration mechanism.
895 Perl 5 modules---i.e., extensions to Perl 5---generally conform to a set
896 of standards for building and installing them. The standard says that
897 the package comes with a top-level @file{Makefile.PL}, which is a Perl
898 script. When it runs, it generates a @file{Makefile}.
900 If you followed the instructions above for editing @file{config.sh} when
901 Perl was built, then when you create a @file{Makefile} from a
902 @file{Makefile.PL}, it will contain separate locations for run-time
903 (@file{/usr/local}) and install-time (@file{/usr/local/stow/perl}).
913 and the files will be installed into @file{/usr/local/stow/perl}.
914 However, you might prefer each Perl module to be stowed separately. In
915 that case, you must edit the resulting Makefile, replacing
916 @file{/usr/local/stow/perl} with @file{/usr/local/stow/@var{module}}.
917 The best way to do this is:
921 find . -name Makefile -print | \
922 xargs perl -pi~ -e 's,^(INST.*/stow)/perl,$1/@var{module},;'
928 (The use of @samp{find} and @samp{xargs} ensures that all Makefiles in
929 the module's source tree, even those in subdirectories, get edited.) A
930 good convention to follow is to name the stow directory for a Perl
931 @var{module} @file{cpan.@var{module}}, where @samp{cpan} stands for
932 Comprehensive Perl Archive Network, a collection of FTP sites that is
933 the source of most Perl 5 extensions. This way, it's easy to tell at a
934 glance which of the subdirectories of @file{/usr/local/stow} are Perl 5
937 When you stow separate Perl 5 modules separately, you are likely to
938 encounter conflicts (@pxref{Conflicts}) with files named @file{.exists}
939 and @file{perllocal.pod}. One way to work around this is to remove
940 those files before stowing the module. If you use the
941 @file{cpan.@var{module}} naming convention, you can simply do this:
945 find cpan.* \( -name .exists -o -name perllocal.pod \) -print | \
950 @c ---------------------------------------------------------------------------
951 @node Bootstrapping, Reporting Bugs, Compile-time vs Install-time, Top
952 @chapter Bootstrapping
954 Suppose you have a stow directory all set up and ready to go:
955 @file{/usr/local/stow/perl} contains the Perl installation,
956 @file{/usr/local/stow/stow} contains Stow itself, and perhaps you have
957 other packages waiting to be stowed. You'd like to be able to do this:
965 but @code{stow} is not yet in your @code{PATH}. Nor can you do this:
973 because the @samp{#!} line at the beginning of @code{stow} tries to
974 locate Perl (usually in @file{/usr/local/bin/perl}), and that won't be
975 found. The solution you must use is:
979 perl/bin/perl stow/bin/stow -vv *
982 @c ===========================================================================
983 @node Reporting Bugs, Known Bugs, Bootstrapping, Top
984 @chapter Reporting Bugs
986 Please send bug reports to the current maintaner, Kal Hodgson, by electronic
987 mail. The address to use is @samp{<bug-stow@@gnu.org>}. Please
992 the version number of Stow (@samp{stow --version});
995 the version number of Perl (@samp{perl -v});
998 the system information, which can often be obtained with @samp{uname
1002 a description of the bug;
1005 the precise command you gave;
1008 the output from the command (preferably verbose output, obtained by
1009 adding @samp{--verbose=3} to the Stow command line).
1012 If you are really keen, consider developing a minimal test case and creating a
1013 new test. See the @file{t/} for lots of examples.
1015 Before reporting a bug, please read the manual carefully, especially
1016 @ref{Known Bugs}, to see whether you're encountering
1017 something that doesn't need reporting.
1018 (@pxref{Conflicts}).
1020 @c ===========================================================================
1021 @node Known Bugs, GNU General Public License, Reporting Bugs, Top
1026 When using multiple stow directories (@pxref{Multiple Stow
1027 Directories}), Stow fails to ``split open'' tree-folding symlinks
1028 (@pxref{Installing Packages}) that point into a stow directory which is
1029 not the one in use by the current Stow command. Before failing, it
1030 should search the target of the link to see whether any element of the
1031 path contains a @file{.stow} file. If it finds one, it can ``learn''
1032 about the cooperating stow directory to short-circuit the @file{.stow}
1033 search the next time it encounters a tree-folding symlink.
1036 @c ===========================================================================
1037 @node GNU General Public License, Index, Known Bugs, Top
1038 @unnumbered GNU General Public License
1040 @center Version 2, June 1991
1043 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1044 675 Mass Ave, Cambridge, MA 02139, USA
1046 Everyone is permitted to copy and distribute verbatim copies
1047 of this license document, but changing it is not allowed.
1050 @unnumberedsec Preamble
1052 The licenses for most software are designed to take away your
1053 freedom to share and change it. By contrast, the GNU General Public
1054 License is intended to guarantee your freedom to share and change free
1055 software---to make sure the software is free for all its users. This
1056 General Public License applies to most of the Free Software
1057 Foundation's software and to any other program whose authors commit to
1058 using it. (Some other Free Software Foundation software is covered by
1059 the GNU Library General Public License instead.) You can apply it to
1062 When we speak of free software, we are referring to freedom, not
1063 price. Our General Public Licenses are designed to make sure that you
1064 have the freedom to distribute copies of free software (and charge for
1065 this service if you wish), that you receive source code or can get it
1066 if you want it, that you can change the software or use pieces of it
1067 in new free programs; and that you know you can do these things.
1069 To protect your rights, we need to make restrictions that forbid
1070 anyone to deny you these rights or to ask you to surrender the rights.
1071 These restrictions translate to certain responsibilities for you if you
1072 distribute copies of the software, or if you modify it.
1074 For example, if you distribute copies of such a program, whether
1075 gratis or for a fee, you must give the recipients all the rights that
1076 you have. You must make sure that they, too, receive or can get the
1077 source code. And you must show them these terms so they know their
1080 We protect your rights with two steps: (1) copyright the software, and
1081 (2) offer you this license which gives you legal permission to copy,
1082 distribute and/or modify the software.
1084 Also, for each author's protection and ours, we want to make certain
1085 that everyone understands that there is no warranty for this free
1086 software. If the software is modified by someone else and passed on, we
1087 want its recipients to know that what they have is not the original, so
1088 that any problems introduced by others will not reflect on the original
1089 authors' reputations.
1091 Finally, any free program is threatened constantly by software
1092 patents. We wish to avoid the danger that redistributors of a free
1093 program will individually obtain patent licenses, in effect making the
1094 program proprietary. To prevent this, we have made it clear that any
1095 patent must be licensed for everyone's free use or not licensed at all.
1097 The precise terms and conditions for copying, distribution and
1098 modification follow.
1101 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1104 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1109 This License applies to any program or other work which contains
1110 a notice placed by the copyright holder saying it may be distributed
1111 under the terms of this General Public License. The ``Program'', below,
1112 refers to any such program or work, and a ``work based on the Program''
1113 means either the Program or any derivative work under copyright law:
1114 that is to say, a work containing the Program or a portion of it,
1115 either verbatim or with modifications and/or translated into another
1116 language. (Hereinafter, translation is included without limitation in
1117 the term ``modification''.) Each licensee is addressed as ``you''.
1119 Activities other than copying, distribution and modification are not
1120 covered by this License; they are outside its scope. The act of
1121 running the Program is not restricted, and the output from the Program
1122 is covered only if its contents constitute a work based on the
1123 Program (independent of having been made by running the Program).
1124 Whether that is true depends on what the Program does.
1127 You may copy and distribute verbatim copies of the Program's
1128 source code as you receive it, in any medium, provided that you
1129 conspicuously and appropriately publish on each copy an appropriate
1130 copyright notice and disclaimer of warranty; keep intact all the
1131 notices that refer to this License and to the absence of any warranty;
1132 and give any other recipients of the Program a copy of this License
1133 along with the Program.
1135 You may charge a fee for the physical act of transferring a copy, and
1136 you may at your option offer warranty protection in exchange for a fee.
1139 You may modify your copy or copies of the Program or any portion
1140 of it, thus forming a work based on the Program, and copy and
1141 distribute such modifications or work under the terms of Section 1
1142 above, provided that you also meet all of these conditions:
1146 You must cause the modified files to carry prominent notices
1147 stating that you changed the files and the date of any change.
1150 You must cause any work that you distribute or publish, that in
1151 whole or in part contains or is derived from the Program or any
1152 part thereof, to be licensed as a whole at no charge to all third
1153 parties under the terms of this License.
1156 If the modified program normally reads commands interactively
1157 when run, you must cause it, when started running for such
1158 interactive use in the most ordinary way, to print or display an
1159 announcement including an appropriate copyright notice and a
1160 notice that there is no warranty (or else, saying that you provide
1161 a warranty) and that users may redistribute the program under
1162 these conditions, and telling the user how to view a copy of this
1163 License. (Exception: if the Program itself is interactive but
1164 does not normally print such an announcement, your work based on
1165 the Program is not required to print an announcement.)
1168 These requirements apply to the modified work as a whole. If
1169 identifiable sections of that work are not derived from the Program,
1170 and can be reasonably considered independent and separate works in
1171 themselves, then this License, and its terms, do not apply to those
1172 sections when you distribute them as separate works. But when you
1173 distribute the same sections as part of a whole which is a work based
1174 on the Program, the distribution of the whole must be on the terms of
1175 this License, whose permissions for other licensees extend to the
1176 entire whole, and thus to each and every part regardless of who wrote it.
1178 Thus, it is not the intent of this section to claim rights or contest
1179 your rights to work written entirely by you; rather, the intent is to
1180 exercise the right to control the distribution of derivative or
1181 collective works based on the Program.
1183 In addition, mere aggregation of another work not based on the Program
1184 with the Program (or with a work based on the Program) on a volume of
1185 a storage or distribution medium does not bring the other work under
1186 the scope of this License.
1189 You may copy and distribute the Program (or a work based on it,
1190 under Section 2) in object code or executable form under the terms of
1191 Sections 1 and 2 above provided that you also do one of the following:
1195 Accompany it with the complete corresponding machine-readable
1196 source code, which must be distributed under the terms of Sections
1197 1 and 2 above on a medium customarily used for software interchange; or,
1200 Accompany it with a written offer, valid for at least three
1201 years, to give any third party, for a charge no more than your
1202 cost of physically performing source distribution, a complete
1203 machine-readable copy of the corresponding source code, to be
1204 distributed under the terms of Sections 1 and 2 above on a medium
1205 customarily used for software interchange; or,
1208 Accompany it with the information you received as to the offer
1209 to distribute corresponding source code. (This alternative is
1210 allowed only for noncommercial distribution and only if you
1211 received the program in object code or executable form with such
1212 an offer, in accord with Subsection b above.)
1215 The source code for a work means the preferred form of the work for
1216 making modifications to it. For an executable work, complete source
1217 code means all the source code for all modules it contains, plus any
1218 associated interface definition files, plus the scripts used to
1219 control compilation and installation of the executable. However, as a
1220 special exception, the source code distributed need not include
1221 anything that is normally distributed (in either source or binary
1222 form) with the major components (compiler, kernel, and so on) of the
1223 operating system on which the executable runs, unless that component
1224 itself accompanies the executable.
1226 If distribution of executable or object code is made by offering
1227 access to copy from a designated place, then offering equivalent
1228 access to copy the source code from the same place counts as
1229 distribution of the source code, even though third parties are not
1230 compelled to copy the source along with the object code.
1233 You may not copy, modify, sublicense, or distribute the Program
1234 except as expressly provided under this License. Any attempt
1235 otherwise to copy, modify, sublicense or distribute the Program is
1236 void, and will automatically terminate your rights under this License.
1237 However, parties who have received copies, or rights, from you under
1238 this License will not have their licenses terminated so long as such
1239 parties remain in full compliance.
1242 You are not required to accept this License, since you have not
1243 signed it. However, nothing else grants you permission to modify or
1244 distribute the Program or its derivative works. These actions are
1245 prohibited by law if you do not accept this License. Therefore, by
1246 modifying or distributing the Program (or any work based on the
1247 Program), you indicate your acceptance of this License to do so, and
1248 all its terms and conditions for copying, distributing or modifying
1249 the Program or works based on it.
1252 Each time you redistribute the Program (or any work based on the
1253 Program), the recipient automatically receives a license from the
1254 original licensor to copy, distribute or modify the Program subject to
1255 these terms and conditions. You may not impose any further
1256 restrictions on the recipients' exercise of the rights granted herein.
1257 You are not responsible for enforcing compliance by third parties to
1261 If, as a consequence of a court judgment or allegation of patent
1262 infringement or for any other reason (not limited to patent issues),
1263 conditions are imposed on you (whether by court order, agreement or
1264 otherwise) that contradict the conditions of this License, they do not
1265 excuse you from the conditions of this License. If you cannot
1266 distribute so as to satisfy simultaneously your obligations under this
1267 License and any other pertinent obligations, then as a consequence you
1268 may not distribute the Program at all. For example, if a patent
1269 license would not permit royalty-free redistribution of the Program by
1270 all those who receive copies directly or indirectly through you, then
1271 the only way you could satisfy both it and this License would be to
1272 refrain entirely from distribution of the Program.
1274 If any portion of this section is held invalid or unenforceable under
1275 any particular circumstance, the balance of the section is intended to
1276 apply and the section as a whole is intended to apply in other
1279 It is not the purpose of this section to induce you to infringe any
1280 patents or other property right claims or to contest validity of any
1281 such claims; this section has the sole purpose of protecting the
1282 integrity of the free software distribution system, which is
1283 implemented by public license practices. Many people have made
1284 generous contributions to the wide range of software distributed
1285 through that system in reliance on consistent application of that
1286 system; it is up to the author/donor to decide if he or she is willing
1287 to distribute software through any other system and a licensee cannot
1290 This section is intended to make thoroughly clear what is believed to
1291 be a consequence of the rest of this License.
1294 If the distribution and/or use of the Program is restricted in
1295 certain countries either by patents or by copyrighted interfaces, the
1296 original copyright holder who places the Program under this License
1297 may add an explicit geographical distribution limitation excluding
1298 those countries, so that distribution is permitted only in or among
1299 countries not thus excluded. In such case, this License incorporates
1300 the limitation as if written in the body of this License.
1303 The Free Software Foundation may publish revised and/or new versions
1304 of the General Public License from time to time. Such new versions will
1305 be similar in spirit to the present version, but may differ in detail to
1306 address new problems or concerns.
1308 Each version is given a distinguishing version number. If the Program
1309 specifies a version number of this License which applies to it and ``any
1310 later version'', you have the option of following the terms and conditions
1311 either of that version or of any later version published by the Free
1312 Software Foundation. If the Program does not specify a version number of
1313 this License, you may choose any version ever published by the Free Software
1317 If you wish to incorporate parts of the Program into other free
1318 programs whose distribution conditions are different, write to the author
1319 to ask for permission. For software which is copyrighted by the Free
1320 Software Foundation, write to the Free Software Foundation; we sometimes
1321 make exceptions for this. Our decision will be guided by the two goals
1322 of preserving the free status of all derivatives of our free software and
1323 of promoting the sharing and reuse of software generally.
1326 @heading NO WARRANTY
1333 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1334 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
1335 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1336 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1337 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1338 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
1339 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
1340 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1341 REPAIR OR CORRECTION.
1344 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1345 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1346 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1347 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1348 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1349 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1350 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1351 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1352 POSSIBILITY OF SUCH DAMAGES.
1356 @heading END OF TERMS AND CONDITIONS
1359 @center END OF TERMS AND CONDITIONS
1363 @unnumberedsec How to Apply These Terms to Your New Programs
1365 If you develop a new program, and you want it to be of the greatest
1366 possible use to the public, the best way to achieve this is to make it
1367 free software which everyone can redistribute and change under these terms.
1369 To do so, attach the following notices to the program. It is safest
1370 to attach them to the start of each source file to most effectively
1371 convey the exclusion of warranty; and each file should have at least
1372 the ``copyright'' line and a pointer to where the full notice is found.
1375 @var{one line to give the program's name and an idea of what it does.}
1376 Copyright (C) 19@var{yy} @var{name of author}
1378 This program is free software; you can redistribute it and/or
1379 modify it under the terms of the GNU General Public License
1380 as published by the Free Software Foundation; either version 2
1381 of the License, or (at your option) any later version.
1383 This program is distributed in the hope that it will be useful,
1384 but WITHOUT ANY WARRANTY; without even the implied warranty of
1385 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
1386 GNU General Public License for more details.
1388 You should have received a copy of the GNU General Public License
1389 along with this program; if not, write to the Free Software
1390 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1393 Also add information on how to contact you by electronic and paper mail.
1395 If the program is interactive, make it output a short notice like this
1396 when it starts in an interactive mode:
1399 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
1400 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1401 type `show w'. This is free software, and you are welcome
1402 to redistribute it under certain conditions; type `show c'
1406 The hypothetical commands @samp{show w} and @samp{show c} should show
1407 the appropriate parts of the General Public License. Of course, the
1408 commands you use may be called something other than @samp{show w} and
1409 @samp{show c}; they could even be mouse-clicks or menu items---whatever
1412 You should also get your employer (if you work as a programmer) or your
1413 school, if any, to sign a ``copyright disclaimer'' for the program, if
1414 necessary. Here is a sample; alter the names:
1418 Yoyodyne, Inc., hereby disclaims all copyright
1419 interest in the program `Gnomovision'
1420 (which makes passes at compilers) written
1423 @var{signature of Ty Coon}, 1 April 1989
1424 Ty Coon, President of Vice
1428 This General Public License does not permit incorporating your program
1429 into proprietary programs. If your program is a subroutine library, you
1430 may consider it more useful to permit linking proprietary applications
1431 with the library. If this is what you want to do, use the GNU Library
1432 General Public License instead of this License.
1434 @node Index, , GNU General Public License, Top