377 |
files and libraries. It is much cleaner to make other data files |
files and libraries. It is much cleaner to make other data files |
378 |
architecture-independent, and it is generally not hard. |
architecture-independent, and it is generally not hard. |
379 |
|
|
380 |
Therefore, here are the variables Makefiles should use to specify |
Here are the variables Makefiles should use to specify directories |
381 |
directories: |
to put these various kinds of files in: |
382 |
|
|
383 |
@table @samp |
@table @samp |
384 |
|
@item datarootdir |
385 |
|
The root of the directory tree for read-only architecture-independent |
386 |
|
data files. This should normally be @file{/usr/local/share}, but |
387 |
|
write it as @file{$(prefix)/share}. @samp{datadir}'s default value is |
388 |
|
based on this variable; so are @samp{infodir}, @samp{mandir}, and others. |
389 |
|
|
390 |
@item datadir |
@item datadir |
391 |
The directory for installing read-only architecture independent data |
The directory for installing ideosyncratic read-only |
392 |
files. This should normally be @file{/usr/local/share}, but write it as |
architecture-independent data files for this program. This is usually |
393 |
@file{$(prefix)/share}. |
the same place as @samp{datarootdir}, but we use the two separate |
394 |
(If you are using Autoconf, write it as @samp{@@datadir@@}.) |
variables so that you can move these ideosyncratic files without |
395 |
As a special exception, see @file{$(infodir)} |
altering the location for Info files, man pages, etc. |
396 |
and @file{$(includedir)} below. |
|
397 |
|
The default definition of @samp{datadir} should be |
398 |
|
@file{$(datarootdir)}. (If you are using Autoconf, write it as |
399 |
|
@samp{@@datadir@@}.) |
400 |
|
|
401 |
@item sysconfdir |
@item sysconfdir |
402 |
The directory for installing read-only data files that pertain to a |
The directory for installing read-only data files that pertain to a |
428 |
should normally be @file{/usr/local/var}, but write it as |
should normally be @file{/usr/local/var}, but write it as |
429 |
@file{$(prefix)/var}. |
@file{$(prefix)/var}. |
430 |
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.) |
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.) |
431 |
|
@end table |
432 |
|
|
433 |
@item libdir |
These variables specify the directory for installing certain specific |
434 |
The directory for object files and libraries of object code. Do not |
types of files, if your program has them. Every GNU package should |
435 |
install executables here, they probably ought to go in @file{$(libexecdir)} |
have Info files, so every program needs @samp{infodir}, but not all |
436 |
instead. The value of @code{libdir} should normally be |
need @samp{libdir} or @samp{lispdir}. |
|
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}. |
|
|
(If you are using Autoconf, write it as @samp{@@libdir@@}.) |
|
|
|
|
|
@item infodir |
|
|
The directory for installing the Info files for this package. By |
|
|
default, it should be @file{/usr/local/info}, but it should be written |
|
|
as @file{$(prefix)/info}. |
|
|
(If you are using Autoconf, write it as @samp{@@infodir@@}.) |
|
|
|
|
|
@item lispdir |
|
|
The directory for installing any Emacs Lisp files in this package. By |
|
|
default, it should be @file{/usr/local/share/emacs/site-lisp}, but it |
|
|
should be written as @file{$(prefix)/share/emacs/site-lisp}. |
|
|
|
|
|
If you are using Autoconf, write the default as @samp{@@lispdir@@}. |
|
|
In order to make @samp{@@lispdir@@} work, you need the following lines |
|
|
in your @file{configure.in} file: |
|
|
|
|
|
@example |
|
|
lispdir='$@{datadir@}/emacs/site-lisp' |
|
|
AC_SUBST(lispdir) |
|
|
@end example |
|
437 |
|
|
438 |
|
@table @samp |
439 |
@item includedir |
@item includedir |
440 |
@c rewritten to avoid overfull hbox --roland |
@c rewritten to avoid overfull hbox --roland |
441 |
The directory for installing header files to be included by user |
The directory for installing header files to be included by user |
470 |
|
|
471 |
To tell whether @file{foo.h} came from the Foo package, put a magic |
To tell whether @file{foo.h} came from the Foo package, put a magic |
472 |
string in the file---part of a comment---and @code{grep} for that string. |
string in the file---part of a comment---and @code{grep} for that string. |
473 |
|
|
474 |
|
@item infodir |
475 |
|
The directory for installing the Info files for this package. By |
476 |
|
default, it should be @file{/usr/local/share/info}, but it should be |
477 |
|
written as @file{$(datarootdir)/info}. (If you are using Autoconf, |
478 |
|
write it as @samp{@@infodir@@}.) |
479 |
|
|
480 |
|
@item libdir |
481 |
|
The directory for object files and libraries of object code. Do not |
482 |
|
install executables here, they probably ought to go in @file{$(libexecdir)} |
483 |
|
instead. The value of @code{libdir} should normally be |
484 |
|
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}. |
485 |
|
(If you are using Autoconf, write it as @samp{@@libdir@@}.) |
486 |
|
|
487 |
|
@item lispdir |
488 |
|
The directory for installing any Emacs Lisp files in this package. By |
489 |
|
default, it should be @file{/usr/local/share/emacs/site-lisp}, but it |
490 |
|
should be written as @file{$(datarootdir)/emacs/site-lisp}. |
491 |
|
|
492 |
|
If you are using Autoconf, write the default as @samp{@@lispdir@@}. |
493 |
|
In order to make @samp{@@lispdir@@} work, you need the following lines |
494 |
|
in your @file{configure.in} file: |
495 |
|
|
496 |
|
@example |
497 |
|
lispdir='$@{datarootdir@}/emacs/site-lisp' |
498 |
|
AC_SUBST(lispdir) |
499 |
|
@end example |
500 |
|
|
501 |
|
@item localedir |
502 |
|
The directory for installing locale-specific message catalogs for this |
503 |
|
package. By default, it should be @file{/usr/local/share/locale}, but |
504 |
|
it should be written as @file{$(datarootdir)/locale}. (If you are |
505 |
|
using Autoconf, write it as @samp{@@localedir@@}.) |
506 |
@end table |
@end table |
507 |
|
|
508 |
Unix-style man pages are installed in one of the following: |
Unix-style man pages are installed in one of the following: |
510 |
@table @samp |
@table @samp |
511 |
@item mandir |
@item mandir |
512 |
The top-level directory for installing the man pages (if any) for this |
The top-level directory for installing the man pages (if any) for this |
513 |
package. It will normally be @file{/usr/local/man}, but you should |
package. It will normally be @file{/usr/local/share/man}, but you |
514 |
write it as @file{$(prefix)/man}. |
should write it as @file{$(datarootdir)/man}. (If you are using |
515 |
(If you are using Autoconf, write it as @samp{@@mandir@@}.) |
Autoconf, write it as @samp{@@mandir@@}.) |
516 |
|
|
517 |
@item man1dir |
@item man1dir |
518 |
The directory for installing section 1 man pages. Write it as |
The directory for installing section 1 man pages. Write it as |
557 |
# Common prefix for installation directories. |
# Common prefix for installation directories. |
558 |
# NOTE: This directory must exist when you start the install. |
# NOTE: This directory must exist when you start the install. |
559 |
prefix = /usr/local |
prefix = /usr/local |
560 |
|
datarootdir = $(prefix)/share |
561 |
|
datadir = $(datarootdir) |
562 |
exec_prefix = $(prefix) |
exec_prefix = $(prefix) |
563 |
# Where to put the executable for the command `gcc'. |
# Where to put the executable for the command `gcc'. |
564 |
bindir = $(exec_prefix)/bin |
bindir = $(exec_prefix)/bin |
565 |
# Where to put the directories used by the compiler. |
# Where to put the directories used by the compiler. |
566 |
libexecdir = $(exec_prefix)/libexec |
libexecdir = $(exec_prefix)/libexec |
567 |
# Where to put the Info files. |
# Where to put the Info files. |
568 |
infodir = $(prefix)/info |
infodir = $(datarootdir)/info |
569 |
@end smallexample |
@end smallexample |
570 |
|
|
571 |
If your program installs a large number of files into one of the |
If your program installs a large number of files into one of the |