From e0709f52102f80bf8d567beaad2b589b2c2be99d Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 15 Oct 2006 16:49:57 +0000 Subject: [PATCH] * doc/automake.texi (Examples): Introduce the example, and point to Hello World. (Hello): Remove this obsolete node. --- ChangeLog | 6 ++ doc/automake.texi | 133 ++++----------------------------------- lib/Automake/Makefile.in | 1 + lib/Makefile.in | 1 + 4 files changed, 21 insertions(+), 120 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fe3466c..8d71fc25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-15 Alexandre Duret-Lutz + + * doc/automake.texi (Examples): Introduce the example, and point + to Hello World. + (Hello): Remove this obsolete node. + 2006-10-15 Hans Ulrich Niedermann Ralf Wildenhues diff --git a/doc/automake.texi b/doc/automake.texi index a2819c22..d8985ef0 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -164,7 +164,6 @@ General ideas Some example packages * Complete:: A simple example, start to finish -* Hello:: A classic program * true:: Building true and false Scanning @file{configure.ac} @@ -2127,9 +2126,21 @@ parallel. @node Examples @chapter Some example packages +This section contains two small examples. + +The first example (@pxref{Complete}) assumes you have an existing +project already using Autoconf, with handcrafted @file{Makefile}s, and +that you want to convert it to using Automake. If you are discovering +both tools, it is probably better that you look at the Hello World +example presented earlier (@pxref{Hello World}). + +The second example (@pxref{true}) shows how two programs can be built +from the same file, using different compilation parameters. It +contains some technical digressions that are probably best skipped on +first read. + @menu * Complete:: A simple example, start to finish -* Hello:: A classic program * true:: Building true and false @end menu @@ -2201,124 +2212,6 @@ Now you can run @samp{automake --add-missing} to generate your you're done! -@node Hello -@section A classic program - -@cindex Example, GNU Hello -@cindex Hello example -@cindex GNU Hello, example - -@uref{ftp://prep.ai.mit.edu/pub/gnu/hello-1.3.tar.gz, GNU hello} is -renowned for its classic simplicity and versatility. This section shows -how Automake could be used with the GNU Hello package. The examples -below are from the latest beta version of GNU Hello, but with all of the -maintainer-only code 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. - -@cindex @file{configure.ac}, from GNU Hello -@cindex GNU Hello, @file{configure.ac} -@cindex Hello, @file{configure.ac} - -Here is the @file{configure.ac} from GNU Hello. -@strong{Please note:} The calls to @code{AC_INIT} and @code{AM_INIT_AUTOMAKE} -in this example use a deprecated syntax. For the current approach, -see the description of @code{AM_INIT_AUTOMAKE} in @ref{Public macros}. - -@c FIXME: This definitely requires an update, e.g., to GNU Hello 2.1.1. - -@example -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/hello.c) -AM_INIT_AUTOMAKE(hello, 1.3.11) -AM_CONFIG_HEADER(config.h) - -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 @command{gettextize}; they will not be discussed here. - -@cindex Texinfo file handling example -@cindex Example, handling Texinfo files - -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 GNU Hello -manual. - -@cindex Regression test example -@cindex Example, regression test - -Here is @file{tests/Makefile.am}: - -@example -TESTS = hello -EXTRA_DIST = hello.in testdata -@end example - -The script @file{hello} is generated by @command{configure}, and is the -only test case. @samp{make check} will run this test. - -@cindex @code{INCLUDES}, example usage -@vindex INCLUDES - -Last we have @file{src/Makefile.am}, where all the real work is done: -@c FIXME: As all the Hello World excerpts in this manual, this -@c shows deprecated features (here: $(INCLUDES)). - -@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 true @section Building true and false diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 732b24c0..09dbb4ca 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -429,6 +429,7 @@ distdir: $(DISTFILES) top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ diff --git a/lib/Makefile.in b/lib/Makefile.in index bcab7583..243551af 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -405,6 +405,7 @@ distdir: $(DISTFILES) top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ -- 2.43.5