From cd38c424ebdd2ea167b56d4548670d9d18853ebc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 9 Dec 1996 01:15:16 +0000 Subject: [PATCH] exec directoriess are installed by install-exec --- ChangeLog | 3 +++ TODO | 13 ------------ automake.in | 2 +- automake.texi | 63 +++++++++++++++++++++++++++++++++++++++++++---------------- version.texi | 2 +- 5 files changed, 51 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index d70e3dd..e1e1fdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Sun Dec 8 12:29:52 1996 Tom Tromey + * automake.in (am_install_var): Directory with 'exec' in its name + is installed by install-exec. + * subdirs.am (maintainer-clean-recursive): Make commands quiet. * texinfos.am: Make commands quiet. * scripts.am: Make commands quiet. diff --git a/TODO b/TODO index 7d95342..b77763b 100644 --- a/TODO +++ b/TODO @@ -8,9 +8,6 @@ non-C source in a libtool library specification. * must split $obj into two parts: one for libtool and one for deansification. Otherwise .S files will be deansified! -* should install-foo target for a new dir (eg fooexecdir) be run via - install-data or install-exec? Consider examining name of variable. - ================================================================ * finish up TAGS work @@ -347,8 +344,6 @@ include Greg Woods' more sophisticated "cvs-dist" target. document rebuilding configure. CONFIGURE_DEPENDENCIES -_DEPENDENCIES -vs- _LIBADD/_LDADD; the tradeoffs - -- must document all variables that are supposed to be public knowledge @@ -359,21 +354,13 @@ must document the targets required for integration with non-automake-using subdirs use of (eg) EXTRA_PROGRAMS is not very clear right now - document EXTRA_foo_SOURCES - document why EXTRA_* vars must be statically knowable document the "make SHELL='/bin/sh -x'" trick for debugging section on relationship to GNU make -LDFLAGS; maybe why it is different from LIBADD/LDADD - -document that dependencies: -* are put into .deps -* are system-dependent - add a concept index ================================================================ diff --git a/automake.in b/automake.in index bcec016..964d264 100755 --- a/automake.in +++ b/automake.in @@ -4500,7 +4500,7 @@ sub am_install_var push (@uninstall, 'uninstall-' . $X . $primary); push (@phony, 'uninstall-' . $X . $primary); push (@installdirs, '$(' . $X . 'dir)'); - if ($exec_dir_p{$X}) + if (defined $exec_dir_p{$X} ? $exec_dir_p{$X} : ($X =~ /exec/)) { push (@install_exec, 'install-' . $X . $primary); push (@phony, 'install-' . $X . $primary); diff --git a/automake.texi b/automake.texi index eda09a8..df92dc6 100644 --- a/automake.texi +++ b/automake.texi @@ -166,7 +166,12 @@ To create all the @file{Makefile.in}s for a package, run the @code{automake} program in the top level directory, with no arguments. @code{automake} will automatically find each appropriate @file{Makefile.am} (by scanning @file{configure.in}; @pxref{configure}) -and generate the corresponding @file{Makefile.in}. +and generate the corresponding @file{Makefile.in}. Note that +@code{automake} has a rather simplistic view of what constitutes a +package; it assumes that a package has only one @file{configure.in}, at +the top. If your package has multiple @file{configure.in}s, then you +must run @code{automake} in each directory holding a +@file{configure.in}. You can optionally give @code{automake} an argument; @samp{.am} is appended to the argument and the result is used as the name of the input @@ -416,8 +421,8 @@ For each primary, there is one additional variable named by prepending @samp{EXTRA_} to the primary name. This variable is used to list objects which may or may not be built, depending on what @code{configure} decides. This variable is required because Automake -must know the entire list of objects to be built in order to generate a -@file{Makefile.in} that will work in all cases. +must statically know the entire list of objects to be built in order to +generate a @file{Makefile.in} that will work in all cases. For instance, @code{cpio} decides at configure time which programs are built. Some of the programs are installed in @code{bindir}, and some @@ -429,7 +434,8 @@ bin_PROGRAMS = cpio pax sbin_PROGRAMS = @@PROGRAMS@@ @end example -Defining a primary variable is an error. +Defining a primary variable without a prefix (eg @code{PROGRAMS}) is an +error. Note that the common @samp{dir} suffix is left off when constructing the variable names; thus one writes @samp{bin_PROGRAMS} and not @@ -847,8 +853,8 @@ to build C programs and libraries. In a directory containing source that gets built into a program (as opposed to a library), the @samp{PROGRAMS} primary is used. Programs -can be installed in @code{bindir}, @code{sbindir}, @code{libexecdir}, -@code{pkglibdir}, or not at all. +can be installed in @samp{bindir}, @samp{sbindir}, @samp{libexecdir}, +@samp{pkglibdir}, or not at all (@samp{noinst}). For instance: @@ -889,7 +895,7 @@ Sometimes it is useful to determine the programs that are to be built at configure time. For instance, GNU @code{cpio} only builds @code{mt} and @code{rmt} under special circumstances. -In this case, you must notify @code{Automake} of all the programs that +In this case, you must notify @code{automake} of all the programs that can possibly be built, but at the same time cause the generated @file{Makefile.in} to use the programs specified by @code{configure}. This is done by having @code{configure} substitute values into each @@ -942,9 +948,12 @@ using the @samp{prog_DEPENDENCIES} variable. Each program depends on the contents of such a variable, but no further interpretation is done. If @samp{prog_DEPENDENCIES} is not supplied, it is computed by Automake. -The automatically-assigned value is the contents of @samp{prog_LDADD}. -Be warned that @file{configure} substitutions are preserved; this can -lead to bad dependencies if you are not careful. +The automatically-assigned value is the contents of @samp{prog_LDADD}, +with most configure substitutions, @samp{-l}, and @samp{-L} options +removed. The configure substitutions that are left in are only +@samp{@@LIBOBJS@@} and @samp{@@ALLOCA@@}; these are left because it is +known that they will not cause an invalid value for +@samp{prog_DEPENDENCIES} to be generated. @node A Library @@ -1257,6 +1266,11 @@ If you unpack a distribution made by @code{make dist}, and you want to turn on the dependency-tracking code again, simply re-run @code{automake}. +The actual dependency files are put under the build directory, in a +subdirectory named @file{.deps}. These depencencies are machine +specific. It is safe to delete them if you like; they will be +automatically recreated during the next build. + @node Other objects @chapter Other Derived Objects @@ -1541,6 +1555,21 @@ targets exist, they will be run at @samp{make install} time. @trindex install-exec-local @trindex install-data-local +Variables using the standard directory prefixes @samp{data}, +@samp{info}, @samp{man}, @samp{include}, @samp{oldinclude}, +@samp{pkgdata}, or @samp{pkginclude} (eg @samp{data_DATA}) are installed +by @samp{install-data}. + +Variables using the standard directory prefixes @samp{bin}, @samp{sbin}, +@samp{libexec}, @samp{sysconf}, @samp{localstate}, @samp{lib}, or +@samp{pkglib} (eg @samp{bin_PROGRAMS}) are installed by +@samp{install-exec}. + +Any variable using a user-defined directory prefix with @samp{exec} in +the name (eg @samp{myexecbin_PROGRAMS} is installed by +@samp{install-exec}. All other user-defined prefixes are installed by +@samp{install-data}. + @node Clean @chapter What Gets Cleaned @@ -1877,16 +1906,16 @@ implied. The macro @samp{AM_MAINTAINER_MODE} is required. @end itemize +GNU maintainers are advised to use @samp{gnu} strictness in preference +to the special Cygnus mode. + @node Extending @chapter When Automake Isn't Enough -Sometimes @code{automake} isn't enough. Then you just lose. - -Actually, @code{automake}s implicit copying semantics means that many -problems can be worked around by simply adding some @code{make} targets -and rules to @file{Makefile.in}. @code{automake} will ignore these -additions. +@code{automake}s implicit copying semantics means that many problems can +be worked around by simply adding some @code{make} targets and rules to +@file{Makefile.in}. @code{automake} will ignore these additions. There are some caveats to doing this. Although you can overload a target already used by @code{automake}, it is often inadvisable, @@ -1911,7 +1940,7 @@ data or just executables. @trindex install-exec @trindex uninstall -For instance, here is how to install a file in @file{/etc}: +For instance, here is one way to install a file in @file{/etc}: @example install-data-local: diff --git a/version.texi b/version.texi index 30b8784..1cf2d6d 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 5 December 1996 +@set UPDATED 8 December 1996 @set EDITION 1.1l @set VERSION 1.1l -- 2.7.4