From 65c81945747b0292a33748af8fc828ae4c5182d2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 19 Mar 1997 07:24:11 +0000 Subject: [PATCH] fixlets; doc updates --- TODO | 11 +- automake.in | 5 - automake.texi | 661 +++++++++++++++++++------------------------------- stamp-vti | 2 +- version.texi | 2 +- 5 files changed, 252 insertions(+), 429 deletions(-) diff --git a/TODO b/TODO index 2263af71..f9cdfeb8 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ Priorities for release: -!! documentation (eg new macros) * copyrights on m4 files, aclocal output * should not put texiname_TEXINFOS into distribution @@ -16,10 +15,12 @@ non-C source in a libtool library specification. - if the target is mandated (eg, "info"), tell the user consider auto-modifying the program name to work around this -* if it isn't possible do use .SUFFIXES as a target, then give error - if it appears in Makefile.am +* should separate actual options from strictness levels + strictness should only cover requirements + You should be able to pick and choose options -================================================================ +* cygwin32 support: add .exe to all executables; discover cygwin32 + without using ac_canonical_*. should clean up texinfos.am; one rule is repeated 3 times, but shouldn't be @@ -30,8 +31,6 @@ rewrite in guile * finish up TAGS work * `acinstall' -* `missing' program -* CONFIG_HEADER is passed incorrectly in ":" mode. * put parser.h into distribution if "yacc -d" is used * only remove libtool at top level? diff --git a/automake.in b/automake.in index d19824b1..9b7cd017 100755 --- a/automake.in +++ b/automake.in @@ -3654,11 +3654,6 @@ sub scan_one_configure_file if (/A([CM])_CONFIG_HEADER\s*\((.*)\)/ && $2 ne '[$1]') { - &am_conf_line_error - ($filename, $., - "use \`AM_CONFIG_HEADER', not \`AC_CONFIG_HEADER'") - if $1 eq 'C'; - $config_header_line = $.; $config_name = $2; if ($config_name =~ /^([^:]+):(.+)$/) diff --git a/automake.texi b/automake.texi index 03bce85b..20fb25c4 100644 --- a/automake.texi +++ b/automake.texi @@ -99,8 +99,9 @@ documents version @value{VERSION}. @menu * Introduction:: Automake's purpose -* Invoking Automake:: Creating a Makefile.in * Generalities:: General ideas +* Examples:: Some example packages +* Invoking Automake:: Creating a Makefile.in * configure:: Scanning configure.in * Top level:: The top-level Makefile.am * Programs:: Building programs and libraries @@ -117,7 +118,6 @@ documents version @value{VERSION}. * Cygnus:: The effect of @code{--cygnus} * Extending:: Extending Automake * Distributing:: Distributing the Makefile.in -* Examples:: Some example packages * Future:: Some ideas for the future * Index:: General index @end menu @@ -159,100 +159,6 @@ Mail suggestions and bug reports for Automake to @email{automake-bugs@@gnu.ai.mit.edu}. -@node Invoking Automake -@chapter Creating a @file{Makefile.in} - -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}. 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 -file. This feature is generally only used to automatically rebuild an -out-of-date @file{Makefile.in}. Note that @code{automake} must always -be run from the topmost directory of a project, even if being used to -regenerate the @file{Makefile.in} in some subdirectory. This is -necessary because @code{automake} must scan @file{configure.in}, and -because @code{automake} uses the knowledge that a @file{Makefile.in} is -in a subdirectory to change its behavior in some cases. - -@code{automake} accepts the following options: - -@table @code -@item -a -@itemx --add-missing -Automake requires certain common files to exist in certain situations; -for instance @file{config.guess} is required if @file{configure.in} runs -@code{AC_CANONICAL_HOST}. Automake is distributed with several of these -files; this option will cause the missing ones to be automatically added -to the package, whenever possible. In general if Automake tells you a -file is missing, try using this option. - -@item --amdir=@var{dir} -Look for Automake data files in directory @var{dir} instead of in the -installation directory. This is typically used for debugging. - -@item --build-dir=@var{dir} -Tell Automake where the build directory is. This option is used when -including dependencies into a @file{Makefile.in} generated by @code{make -dist}; it should not be used otherwise. - -@item --cygnus -Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead -of GNU or Gnits rules. @xref{Cygnus} for more information. - -@item --foreign -Set the global strictness to @samp{foreign}. @xref{Strictness} for more -information. - -@item --gnits -Set the global strictness to @samp{gnits}. @xref{Gnits} for more -information. - -@item --gnu -Set the global strictness to @samp{gnu}. @xref{Gnits} for more -information. This is the default strictness. - -@item --help -Print a summary of the command line options and exit. - -@item -i -@itemx --include-deps -Include all automatically generated dependency information -(@pxref{Dependencies}) in the generated -@file{Makefile.in}. This is generally done when making a distribution; -see @ref{Dist}. - -@item -o @var{dir} -@itemx --output-dir=@var{dir} -Put the generated @file{Makefile.in} in the directory @var{dir}. -Ordinarily each @file{Makefile.in} is created in the directory of the -corresponding @file{Makefile.am}. This option is used when making -distributions. - -@item --srcdir-name=@var{dir} -Tell Automake the name of the source directory associated with the -current build. This option is used when including dependencies into a -@file{Makefile.in} generated by @code{make dist}; it should not be used -otherwise. - -@item -v -@itemx --verbose -Cause Automake to print information about which files are being read or -created. - -@item --version -Print the version number of Automake and exit. -@end table - - @node Generalities @chapter General ideas @@ -492,6 +398,233 @@ underscores when making macro references. E.g., if your program is named @code{sniff_glue_SOURCES}, not @code{sniff-glue_SOURCES}. +@node Examples +@chapter Some example packages + +@menu +* Hello:: A classic program +* etags:: Building etags and ctags +@end menu + +@node Hello +@section A classic program + +@code{hello} is renowned for its classic simplicity and versatility. +What better place to begin a tour? The below shows how Automake could +be used with the Hello package. The examples below are from the latest +GNU Hello, but all the maintainer-only code has been stripped out, as +well as all copyright comments. + +Of course, GNU Hello is somewhat more featureful than your traditional +two-liner. GNU Hello is internationalized, does option processing, and +has a manual and a test suite. GNU Hello is a deep package. + +Here is the @file{configure.in} from GNU Hello: + +@example +dnl Process this file with autoconf to produce a configure script. +AC_INIT(src/hello.c) +AC_PREREQ(2.12) +AM_INIT_AUTOMAKE(hello, 1.3.11) +AM_CONFIG_HEADER(config.h) + +AC_ARG_PROGRAM + +dnl Set of available languages. +ALL_LINGUAS="de fr es ko nl no pl pt sl sv" + +dnl Checks for programs. +AC_PROG_CC +AC_ISC_POSIX + +dnl Checks for libraries. + +dnl Checks for header files. +AC_STDC_HEADERS +AC_HAVE_HEADERS(string.h fcntl.h sys/file.h sys/param.h) + +dnl Checks for library functions. +AC_FUNC_ALLOCA + +dnl Check for st_blksize in struct stat +AC_ST_BLKSIZE + +dnl internationalization macros +AM_GNU_GETTEXT +AC_OUTPUT([Makefile doc/Makefile intl/Makefile po/Makefile.in \ + src/Makefile tests/Makefile tests/hello], + [chmod +x tests/hello]) +@end example + +The @samp{AM_} macros are provided by Automake (or the Gettext library); +the rest are standard Autoconf macros. + + +The top-level @file{Makefile.am}: + +@example +EXTRA_DIST = BUGS ChangeLog.O +SUBDIRS = doc intl po src tests +@end example + +As you can see, all the work here is really done in subdirectories. + +The @file{po} and @file{intl} directories are automatically generated +using @code{gettextize}; they will not be discussed here. + +In @file{doc/Makefile.am} we see: + +@example +info_TEXINFOS = hello.texi +hello_TEXINFOS = gpl.texi +@end example + +This is sufficient to build, install, and distribute the Hello manual. + + +Here is @file{tests/Makefile.am}: + +@example +TESTS = hello +EXTRA_DIST = hello.in testdata +@end example + +The script @file{hello} is generated by @code{configure}, and is the +only test case. @code{make check} will run this test. + +Last, @file{src/Makefile.am}, where all the real work is done: + +@example +bin_PROGRAMS = hello +hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h +hello_LDADD = @@INTLLIBS@@ @@ALLOCA@@ +localedir = $(datadir)/locale +INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" +@end example + + +@node etags +@section Building etags and ctags + +Here is another, trickier example. It shows how to generate two +programs (@code{ctags} and @code{etags}) from the same source file +(@file{etags.c}). The difficult part is that each compilation of +@file{etags.c} requires different @code{cpp} flags. + +@example +bin_PROGRAMS = etags ctags +ctags_SOURCES = +ctags_LDADD = ctags.o + +etags.o: + $(COMPILE) -DETAGS_REGEXPS etags.c + +ctags.o: + $(COMPILE) -DCTAGS -o ctags.o etags.c +@end example + +Note that @code{ctags_SOURCES} is defined to be empty---that way no +implicit value is substituted. The implicit value, however, is used to +generate @code{etags} from @file{etags.o}. + +@code{ctags_LDADD} is used to get @file{ctags.o} into the link line. +@code{ctags_DEPENDENCIES} is generated by Automake. + + +@node Invoking Automake +@chapter Creating a @file{Makefile.in} + +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}. 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 +file. This feature is generally only used to automatically rebuild an +out-of-date @file{Makefile.in}. Note that @code{automake} must always +be run from the topmost directory of a project, even if being used to +regenerate the @file{Makefile.in} in some subdirectory. This is +necessary because @code{automake} must scan @file{configure.in}, and +because @code{automake} uses the knowledge that a @file{Makefile.in} is +in a subdirectory to change its behavior in some cases. + +@code{automake} accepts the following options: + +@table @code +@item -a +@itemx --add-missing +Automake requires certain common files to exist in certain situations; +for instance @file{config.guess} is required if @file{configure.in} runs +@code{AC_CANONICAL_HOST}. Automake is distributed with several of these +files; this option will cause the missing ones to be automatically added +to the package, whenever possible. In general if Automake tells you a +file is missing, try using this option. + +@item --amdir=@var{dir} +Look for Automake data files in directory @var{dir} instead of in the +installation directory. This is typically used for debugging. + +@item --build-dir=@var{dir} +Tell Automake where the build directory is. This option is used when +including dependencies into a @file{Makefile.in} generated by @code{make +dist}; it should not be used otherwise. + +@item --cygnus +Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead +of GNU or Gnits rules. @xref{Cygnus} for more information. + +@item --foreign +Set the global strictness to @samp{foreign}. @xref{Strictness} for more +information. + +@item --gnits +Set the global strictness to @samp{gnits}. @xref{Gnits} for more +information. + +@item --gnu +Set the global strictness to @samp{gnu}. @xref{Gnits} for more +information. This is the default strictness. + +@item --help +Print a summary of the command line options and exit. + +@item -i +@itemx --include-deps +Include all automatically generated dependency information +(@pxref{Dependencies}) in the generated +@file{Makefile.in}. This is generally done when making a distribution; +see @ref{Dist}. + +@item -o @var{dir} +@itemx --output-dir=@var{dir} +Put the generated @file{Makefile.in} in the directory @var{dir}. +Ordinarily each @file{Makefile.in} is created in the directory of the +corresponding @file{Makefile.am}. This option is used when making +distributions. + +@item --srcdir-name=@var{dir} +Tell Automake the name of the source directory associated with the +current build. This option is used when including dependencies into a +@file{Makefile.in} generated by @code{make dist}; it should not be used +otherwise. + +@item -v +@itemx --verbose +Cause Automake to print information about which files are being read or +created. + +@item --version +Print the version number of Automake and exit. +@end table + + @node configure @chapter Scanning @file{configure.in} @@ -909,11 +1042,12 @@ not required to contain @file{Makefile.am}s; only @file{Makefile}s which do not use Automake (such as @code{gettext}). In a deep package, the top-level @file{Makefile.am} is often very short. -For instance, here is the @file{Makefile.am} from the textutils +For instance, here is the @file{Makefile.am} from the Hello distribution: @example -SUBDIRS = lib src doc man +EXTRA_DIST = BUGS ChangeLog.O README-alpha +SUBDIRS = doc intl po src tests @end example @code{SUBDIRS} can contain configure substitutions (eg @samp{@@DIRS@@}); @@ -966,11 +1100,11 @@ to generate a program named @code{hello}. The variable into an executable: @example -hello_SOURCES = hello.c +hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h @end example -This causes @file{hello.c} to be compiled into @file{hello.o}, and then -linked to produce @file{hello}. +This causes each mentioned @samp{.c} file to be compiled into the +corresponding @samp{.o}. Then all are linked to produce @file{hello}. If @samp{prog_SOURCES} is needed, but not specified, then it defaults to the single file @file{prog.c}. In the example above, the definition of @@ -1480,13 +1614,7 @@ By default, data files are not included in a distribution. Here is how @code{automake} installs its auxiliary data files: @example -pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \ -compile.am data.am depend.am dist-subd-top.am dist-subd-vars.am \ -dist-subd.am dist-vars.am dist.am footer.am header-vars.am header.am \ -libscripts.am libprograms.am libraries-vars.am libraries.am library.am \ -mans-vars.am mans.am packagedata.am program.am programs.am remake-hdr.am \ -remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \ -texinfos-vars.am texinfos.am hack-make.sed nl-remove.sed +pkgdata_DATA = clean-kr.am clean.am @dots{} @end example @@ -1500,6 +1628,10 @@ should be listed in the @code{BUILT_SOURCES} variable. By default, built sources are not included in a distribution. +Built sources are also not compiled by default. You must either +explicitly mention them in some other @samp{_SOURCES} variable for this +to happen. + @node Other GNU Tools @chapter Other GNU Tools @@ -1613,17 +1745,15 @@ file was last modified. The @file{version.texi} support requires the @code{mdate-sh} program; this program is supplied with Automake. Sometimes an info file actually depends on more than one @samp{.texi} -file. For instance, in the @code{xdvik} distribution, -@file{kpathsea.texi} includes the files @file{install.texi}, -@file{copying.texi}, and @file{freedom.texi}. You can tell Automake -about these dependencies using the @samp{texi_TEXINFOS} variable. Here -is how @code{xdvik} could do it: +file. For instance, in GNU Hello, @file{hello.texi} includes the file +@file{gpl.texi} You can tell Automake about these dependencies using the +@samp{@var{texi}_TEXINFOS} variable. Here is how Hello does it: @vindex TEXINFOS @vindex _TEXINFOS @example -info_TEXINFOS = kpathsea.texi -kpathsea_TEXINFOS = install.texi copying.texi freedom.texi +info_TEXINFOS = hello.texi +hello_TEXINFOS = gpl.texi @end example By default, Automake requires the file @file{texinfo.tex} to appear in @@ -1904,7 +2034,6 @@ There are a few rules and variables that didn't fit anywhere else. @menu * Tags:: Interfacing to etags and mkid * Suffixes:: Handling new file extensions -* Built:: Built sources @end menu @@ -1964,11 +2093,6 @@ source files, you would also need to add these suffixes to the list: SUFFIXES = .java .class @end example -@node Built -@section Built sources - -FIXME write this - @node Gnits @chapter The effect of @code{--gnu} and @code{--gnits} @@ -2136,301 +2260,6 @@ Some of the files that can be automatically installed via the to see. -@node Examples -@chapter Some example packages - -Here are some examples of how Automake can be used. - -@menu -* Hello:: The simplest GNU program -* Tricky:: A trickier example -* Automake:: Automake's own use -* Textutils:: A deep hierarchy -@end menu - -@node Hello -@section The simplest GNU program - -@code{hello} is renowned for its classic simplicity and versatility. -What better place to begin a tour? The below shows what could be used -as the Hello distribution's @file{Makefile.am}. - -@example -bin_PROGRAMS = hello -hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h -hello_LDADD = @@ALLOCA@@ -info_TEXINFOS = hello.texi -hello_TEXINFOS = gpl.texi - -EXTRA_DIST = testdata - -check-local: hello - @@echo expect no output from diff - ./hello > test.out - diff -c $(srcdir)/testdata test.out - rm -f test.out -@end example - -Of course, Automake also requires some minor changes to -@file{configure.in}. The new @file{configure.in} would read: - -@example -dnl Process this file with autoconf to produce a configure script. -AC_INIT(hello.c) -AM_INIT_AUTOMAKE(hello, 1.3) -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_STDC_HEADERS -AC_HAVE_HEADERS(string.h fcntl.h sys/file.h) -AC_ALLOCA -AC_OUTPUT(Makefile) -@end example - -If Hello were really going to use Automake, the @file{version.c} file -would probably be deleted, or changed so as to be automatically -generated. - - -@node Tricky -@section A tricker example - -Here is another, trickier example. It shows how to generate two -programs (@code{ctags} and @code{etags}) from the same source file -(@file{etags.c}). The difficult part is that each compilation of -@file{etags.c} requires different @code{cpp} flags. - -@example -bin_PROGRAMS = etags ctags -ctags_SOURCES = -ctags_LDADD = ctags.o -ctags_DEPENDENCIES = ctags.o - -etags.o: - $(COMPILE) -DETAGS_REGEXPS etags.c - -ctags.o: - $(COMPILE) -DCTAGS -o ctags.o etags.c -@end example - -Note that @code{ctags_SOURCES} is defined to be empty---that way no -implicit value is substituted. The implicit value, however, is used to -generate @code{etags} from @file{etags.o}. - -@code{ctags_LDADD} is used to get @file{ctags.o} into the link line, -while @code{ctags_DEPENDENCIES} exists to make sure that @file{ctags.o} -gets built in the first place. - -This is a somewhat pathological example. - - -@node Automake -@section Automake uses itself - -Automake, of course, uses itself to generate its @file{Makefile.in}. -Since Automake is a shallow package, it has more than one -@file{Makefile.am}. Here is the top-level @file{Makefile.am}: - -@example -## Process this file with automake to create Makefile.in - -AUTOMAKE_OPTIONS = gnits -MAINT_CHARSET = latin1 -PERL = @@PERL@@ - -SUBDIRS = tests - -bin_SCRIPTS = automake -info_TEXINFOS = automake.texi - -pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \ -compile.am data.am depend.am \ -dist-vars.am footer.am header.am header-vars.am \ -kr-vars.am libraries-vars.am \ -libraries.am library.am mans-vars.am \ -program.am programs.am remake-hdr.am \ -remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \ -tags-clean.am \ -texi-version.am texinfos-vars.am texinfos.am \ -libraries-clean.am programs-clean.am data-clean.am \ -COPYING INSTALL texinfo.tex \ -ansi2knr.c ansi2knr.1 \ -aclocal.m4 - -## These must all be executable when installed. -pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs - -# The following requires a fixed version of the Emacs 19.30 etags. -ETAGS_ARGS = automake.in --lang=none \ - --regex='/^@@node[ \t]+\([^,]+\)/\1/' automake.texi - -## `test -x' is not portable. So we use Perl instead. If Perl -## doesn't exist, then this test is meaningless anyway. -# Check to make sure some installed files are executable. -installcheck-local: - $(PERL) -e "exit ! -x '$(pkgdatadir)/config.guess';" - $(PERL) -e "exit ! -x '$(pkgdatadir)/config.sub';" - $(PERL) -e "exit ! -x '$(pkgdatadir)/install-sh';" - $(PERL) -e "exit ! -x '$(pkgdatadir)/mdate-sh';" - $(PERL) -e "exit ! -x '$(pkgdatadir)/mkinstalldirs';" - -# Some simple checks: -# * syntax check with perl4 and perl5. -# * make sure the scripts don't use 'true' -# * expect no instances of '$@{...@}' -# These are only really guaranteed to work on my machine. -maintainer-check: automake check - $(PERL) -c -w automake - @@if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \ - echo "can't use 'true' in GNU Makefile" 1>&2; \ - exit 1; \ - else :; fi - @@if test `fgrep '$$@{' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \ - echo "found too many uses of '\$$@{'" 1>&2; \ - exit 1; \ - fi - if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ - perl4.036 -c -w automake; \ - else :; fi - -# Tag before making distribution. Also, don't make a distribution if -# checks fail. Also, make sure the NEWS file is up-to-date. -cvs-dist: maintainer-check - @@if sed 1q NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \ - echo "NEWS not updated; not releasing" 1>&2; \ - exit 1; \ - fi - cvs tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` - $(MAKE) dist -@end example - -As you can see, Automake defines many of its own rules, to make the -maintainer's job easier. For instance the @code{cvs-dist} rule -automatically tags the current version in the CVS repository, and then -makes a standard distribution. - -Automake consists primarily of one program, @code{automake}, and a -number of auxiliary scripts. Automake also installs a number of -programs which are possibly installed via the @code{--add-missing} -option; these scripts are listed in the @code{pkgdata_SCRIPTS} variable. - -Automake also has a @file{tests} subdirectory, as indicated in the -@code{SUBDIRS} variable above. Here is @file{tests/Makefile.am}: - -@example -## Process this file with automake to create Makefile.in - -AUTOMAKE_OPTIONS = gnits - -TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ -acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ -confincl.test spelling.test prefix.test badprog.test depend.test - -EXTRA_DIST = defs -@end example - -This is where all the tests are really run. @file{defs} is an -initialization file used by each test script; it is explicitly mentioned -because @code{automake} has no way of automatically finding it. - - -@node Textutils -@section A deep hierarchy - -The GNU textutils are a collection of programs for manipulating text -files. They are distributed as a deep package. The textutils have only -recently been modified to use Automake; the examples come from a -prerelease. - -Here is the top-level @file{Makefile.am}: - -@example -SUBDIRS = lib src doc man -@end example - -In the @file{lib} directory, a library is built which is used by each -textutil. Here is @file{lib/Makefile.am}: - -@example -noinst_LIBRARIES = tu - -EXTRA_DIST = rx.c regex.c - -tu_SOURCES = error.h getline.h getopt.h linebuffer.h \ -long-options.h md5.h regex.h rx.h xstrtod.h xstrtol.h xstrtoul.h \ -error.c full-write.c getline.c getopt.c getopt1.c \ -linebuffer.c long-options.c md5.c memchr.c safe-read.c \ -xmalloc.c xstrtod.c xstrtol.c xstrtoul.c - -tu_LIBADD = @@REGEXOBJ@@ @@LIBOBJS@@ @@ALLOCA@@ -@end example - -The @file{src} directory contains the source for all the textutils---23 -programs in all. The @file{Makefile.am} for this directory also -includes some simple checking code, and constructs a @file{version.c} -file on the fly: - -@example -bin_PROGRAMS = cat cksum comm csplit cut expand fmt fold head join md5sum \ -nl od paste pr sort split sum tac tail tr unexpand uniq wc - -noinst_HEADERS = system.h version.h -DISTCLEANFILES = stamp-v version.c - -INCLUDES = -I$(top_srcdir)/lib - -LDADD = version.o ../lib/libtu.a - -$(PROGRAMS): version.o ../lib/libtu.a - -AUTOMAKE_OPTIONS = ansi2knr - -version.c: stamp-v -stamp-v: Makefile - rm -f t-version.c - echo '#include ' > t-version.c - echo '#include "version.h"' >> t-version.c - echo 'const char *version_string = "'GNU @@PACKAGE@@ @@VERSION@@'";' \ - >> t-version.c - if cmp -s version.c t-version.c; then \ - rm t-version.c; \ - else \ - mv t-version.c version.c; \ - fi - echo timestamp > $@@ - -check: md5sum - ./md5sum \ - --string="" \ - --string="a" \ - --string="abc" \ - --string="message digest" \ - --string="abcdefghijklmnopqrstuvwxyz" \ - --string="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" \ - --string="12345678901234567890123456789012345678901234567890123456789012345678901234567890" \ - | diff -c $(srcdir)/md5-test.rfc - -@end example - -The @file{doc} directory builds the info documentation for the -textutils: - -@example -info_TEXINFOS = textutils.texi -@end example - -And, last, the @file{man} directory installs the man pages for all the -textutils: - -@example -man_MANS = cat.1 cksum.1 comm.1 csplit.1 cut.1 expand.1 fmt.1 fold.1 head.1 \ -join.1 md5sum.1 nl.1 od.1 paste.1 pr.1 sort.1 split.1 sum.1 tac.1 tail.1 \ -tr.1 unexpand.1 uniq.1 wc.1 -@end example - -You can now see how easy it is to handle even a largish project using -Automake. - - @node Future @chapter Some ideas for the future diff --git a/stamp-vti b/stamp-vti index a557ee8b..31205f9b 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 18 March 1997 +@set UPDATED 19 March 1997 @set EDITION 1.1m @set VERSION 1.1m diff --git a/version.texi b/version.texi index a557ee8b..31205f9b 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 18 March 1997 +@set UPDATED 19 March 1997 @set EDITION 1.1m @set VERSION 1.1m -- 2.43.5