From 6dd56d0cf84625c4a42caf0e09625d204f3cf812 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 18 Nov 1996 21:36:28 +0000 Subject: [PATCH] Removed old macro --- ChangeLog | 18 +++++++++++++++ Makefile.am | 3 +-- Makefile.in | 8 +++---- TODO | 18 +++++---------- aclocal.in | 1 + automake.in | 64 ++++++++++++++++++++++++++++++++++-------------------- automake.texi | 38 ++++++++++++++++++++++++++++---- lib/am/Makefile.am | 3 +-- lib/am/tags.am | 18 +++++++-------- m4/Makefile.am | 2 +- m4/Makefile.in | 4 ++-- m4/ccsanity.m4 | 17 --------------- tags-subd.am | 24 -------------------- tags.am | 18 +++++++-------- version.texi | 2 +- 15 files changed, 125 insertions(+), 113 deletions(-) delete mode 100644 m4/ccsanity.m4 delete mode 100644 tags-subd.am diff --git a/ChangeLog b/ChangeLog index 0a26f88..b82fb21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ +Mon Nov 18 13:29:55 1996 Tom Tromey + + * aclocal.in (obsolete_macros): Include AM_SANITY_CHECK_CC; now + part of autoconf proper. + * m4/ccsanity.m4: Removed. + +Sun Nov 17 12:25:17 1996 Tom Tromey + + * automake.in (check_typos): Check to make sure EXTRA_ variables + don't contain configure subs. + (handle_dist_worker): Removed EXTRA_DIST_DIRS; not needed. + Fri Nov 15 18:58:04 1996 Tom Tromey + * tags-subd.am: Removed. + + * tags.am (tags-recursive): Removed. + (TAGS): Depend on @DIRS@, @CONFIG@. Use @CONFIG@ in rule. + (ID): From tags-subd.am. + * aclocal.in (obsolete_macros): Include AM_FUNC_FNMATCH. * automake.in (scan_configure): Recognize AC_FUNC_FNMATCH. * m4/fnmatch.m4: Removed (now in autoconf). diff --git a/Makefile.am b/Makefile.am index a510b0f..91e160d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,6 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 -PERL = @PERL@ SUBDIRS = tests m4 @@ -13,7 +12,7 @@ pkgdata_DATA = clean-kr.am clean.am compile-kr.am comp-vars.am \ compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am footer.am \ header.am header-vars.am kr-extra.am libs.am library.am \ mans-vars.am program.am progs.am remake-hdr.am remake-subd.am \ -remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \ +remake.am scripts.am subdirs.am tags.am tags-clean.am \ texi-vers.am texinfos.am libs-clean.am \ progs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \ ansi2knr.1 lisp.am lisp-clean.am diff --git a/Makefile.in b/Makefile.in index 73c73bd..e37b153 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.1g from Makefile.am +# Makefile.in generated automatically by automake 1.1h from Makefile.am # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -37,10 +37,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ +PERL = @PERL@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 -PERL = @PERL@ SUBDIRS = tests m4 @@ -51,7 +51,7 @@ pkgdata_DATA = clean-kr.am clean.am compile-kr.am comp-vars.am \ compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am footer.am \ header.am header-vars.am kr-extra.am libs.am library.am \ mans-vars.am program.am progs.am remake-hdr.am remake-subd.am \ -remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \ +remake.am scripts.am subdirs.am tags.am tags-clean.am \ texi-vers.am texinfos.am libs-clean.am \ progs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \ ansi2knr.1 lisp.am lisp-clean.am @@ -93,7 +93,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \ TAR = tar default: all -aclocal.m4: configure.in +$(srcdir)/aclocal.m4: configure.in cd $(srcdir) && aclocal $(srcdir)/Makefile.in: Makefile.am configure.in diff --git a/TODO b/TODO index 0d13e94..fa7d8d2 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ Priorities for release: !! documentation (eg new macros) +!! finish up TAGS work * `acinstall' * echo in installs? * `missing' program @@ -9,10 +10,6 @@ Priorities for release: * clean up source directory by moving stuff into subdirs -!! EXTRA_FOO should not be allowed to contain automake interpolations - the whole point of this variable is so automake can statically know... - This should probably be true for all EXTRA_ variables - * consider adding pkglibexecdir, maybe others? requests for pkg-dirs with version included @@ -21,8 +18,6 @@ Further: - consider adding "echo"s to installs again. users can use make SHELL='sh -x' to get the full dirt -* must move CONFIG_HEADER from tags.am... allow it to work in subdir. - Avoid loops when installing; instead unroll them in automake Some long-term projects: @@ -36,9 +31,6 @@ To support --help/--version checking? take diff-n-query code from libit -must at least partially rewrite dist system (to handle distributing -info files, which is currently somewhat broken). - Per Bothner says: Per> 1) Being able to build a set of non-source programs Per> from source programs, without necessarily linking them together. @@ -310,6 +302,10 @@ containing application. Document: +rationale for avoiding + make CFLAGS="$CFLAGS" ... +in subdirs make rule + a package that installs its own aclocal macros --cygnus @@ -350,14 +346,10 @@ non-automake-using subdirs use of (eg) EXTRA_PROGRAMS is not very clear right now -document EXTRA_DIST_DIRS, distributing things in subdirs - document EXTRA_foo_SOURCES document why EXTRA_* vars must be statically knowable -document guile enhancements! - document the "make SHELL='/bin/sh -x'" trick for debugging ================================================================ diff --git a/aclocal.in b/aclocal.in index 2b40bd8..4ba3976 100644 --- a/aclocal.in +++ b/aclocal.in @@ -79,6 +79,7 @@ $verbosity = 0; # Now part of autoconf proper, under a different name. 'AM_FUNC_FNMATCH', + 'AM_SANITY_CHECK_CC', # These aren't quite obsolete. # 'md_PATH_PROG', diff --git a/automake.in b/automake.in index 790dc3c..e5a6802 100755 --- a/automake.in +++ b/automake.in @@ -1309,10 +1309,11 @@ sub handle_libraries &define_configure_variable ('RANLIB'); } -# See if any _SOURCES variable were misspelled. +# See if any _SOURCES variable were misspelled. Also, make sure that +# EXTRA_ variables don't contain configure substitutions. sub check_typos { - local ($varname, $primary); + local ($varname, $primary, $ckey); foreach $varname (keys %contents) { foreach $primary ('_SOURCES', '_LIBADD', '_LDADD', '_DEPENDENCIES') @@ -1323,6 +1324,18 @@ sub check_typos "invalid unused variable name: \`$varname'"); } } + + if ($varname =~ /^EXTRA_/) + { + foreach $ckey (&variable_value_as_list ($varname)) + { + if ($ckey =~ /^\@.*\@$/) + { + &am_line_error ($varname, "variable \`$varname' must not contain configure substitution"); + last; + } + } + } } } @@ -1633,35 +1646,44 @@ sub handle_data # Handle TAGS. sub handle_tags { - local ($tagging) = 0; - push (@phony, 'tags'); + local (@tag_deps) = (); if (&variable_defined ('SUBDIRS')) { - $output_rules .= &file_contents ('tags'); + $output_rules .= ("tags-recursive:\n" + . "\tlist=\"\$(SUBDIRS)\"; for subdir in \$\$list; do \\\n" + # Never fail here if a subdir fails; it + # isn't important. + . "\t (cd \$\$subdir && \$(MAKE) tags); \\\n" + . "\tdone\n"); + push (@tag_deps, 'tags-recursive'); push (@phony, 'tags-recursive'); - $tagging = 1; - } - elsif ($dir_holds_sources - || $dir_holds_headers - || &variable_defined ('ETAGS_ARGS')) - { - $output_rules .= &file_contents ('tags-subd'); - $tagging = 1; - } - elsif (&variable_defined ('TAGS_DEPENDENCIES')) - { - &am_line_error ('TAGS_DEPENDENCIES', - "doesn't make sense to define \`TAGS_DEPENDENCIES' without sources or \`ETAGS_ARGS'"); } - if ($tagging) + if ($dir_holds_sources + || $dir_holds_headers + || &variable_defined ('ETAGS_ARGS')) { + local ($xform) = ''; + if ($config_header && $relative_dir eq &dirname ($config_header)) + { + # The config header is in this directory. So require it. + ($xform = &basename ($config_header)) =~ s/(\W)/\\\1/g; + } + $xform = ('s/\@CONFIG\@/' . $xform . '/;' + . 's/\@DIRS\@/' . join (' ', @tag_deps) . '/'); + + $output_rules .= &file_contents_with_transform ($xform, 'tags'); $output_rules .= &file_contents ('tags-clean'); push (@clean, 'tags'); &push_phony_cleaners ('tags'); &examine_variable ('TAGS_DEPENDENCIES'); } + elsif (&variable_defined ('TAGS_DEPENDENCIES')) + { + &am_line_error ('TAGS_DEPENDENCIES', + "doesn't make sense to define \`TAGS_DEPENDENCIES' without sources or \`ETAGS_ARGS'"); + } else { # Every Makefile must define some sort of TAGS rule. @@ -1733,10 +1755,6 @@ sub handle_dist_worker unless $_ eq '.'; } } - if (&variable_defined ('EXTRA_DIST_DIRS')) - { - push (@dist_dirs, &variable_value_as_list ('EXTRA_DIST_DIRS')); - } if (@dist_dirs) { # Prepend $(distdir) to each directory given. Doing it via a diff --git a/automake.texi b/automake.texi index 5c6f898..86c8e06 100644 --- a/automake.texi +++ b/automake.texi @@ -739,7 +739,7 @@ Print the version number of Automake and exit. @c consider generating this node automatically from m4 files. @table @code -@item AM_FUNC_FNMATCH +@item AC_FUNC_FNMATCH If the @code{fnmatch} function is not available, or does not work correctly (like the one on SunOS 5.4), add @samp{fnmatch.o} to output variable @code{LIBOBJS}. @@ -1019,24 +1019,29 @@ Automake includes full support for C++, and rudimentary support for other languages. Support for other languages will be improved based on demand. -Any package including C++ code must use @code{AC_PROG_CXX} in its -@file{configure.in}. +Any package including C++ code must define the output variable +@samp{CXX} in @file{configure.in}; the simplest way to do this is to use +the @code{AC_PROG_CXX} macro. A few additional variables are defined when a C++ source file is seen: @table @code @item CXX The name of the C++ compiler. +@vindex CXX @item CXXFLAGS Any flags to pass to the C++ compiler. +@vindex CXXFLAGS @item CXXCOMPILE The command used to actually compile a C++ source file. The file name is appended to form the complete command line. +@vindex CXXCOMPILE @item CXXLINK The command used to actually link a C++ program. +@vindex CXXLINK @end table @@ -1228,6 +1233,7 @@ tools. @menu * Emacs Lisp:: Emacs Lisp * gettext:: Gettext +* Guile:: Guile @end menu @node Emacs Lisp @@ -1264,6 +1270,27 @@ in @file{configure.in} corresponds to all the valid @samp{.po} files, and nothing more. +@node Guile +@section Guile + +Automake provides some automatic support for writing Guile modules. +Automake will turn on Guile support if the @code{AM_INIT_GUILE_MODULE} +macro is used in @file{configure.in}. + +Right now Guile support just means that the @code{AM_INIT_GUILE_MODULE} +macro is understood to mean: +@itemize @bullet +@item +@code{AM_INIT_AUTOMAKE} is run. + +@item +@code{AC_CONFIG_AUX_DIR} is run, with a path of @file{..}. +@end itemize + +As the Guile module code matures, no doubt the Automake support will +grow as well. + + @node Documentation @chapter Building documentation @@ -2060,8 +2087,11 @@ There will be support for automatically recoding a distribution. The intent is to allow a maintainer to use whatever character set is most convenient locally, but for all distributions to be Unicode or @w{ISO 10646} with the UTF-8 encoding. -@end itemize +@item +Support for automatically generating packages (eg Solaris packages, or +RPM packages). +@end itemize @node Variables @unnumbered Index of Variables diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index a510b0f..91e160d 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -2,7 +2,6 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 -PERL = @PERL@ SUBDIRS = tests m4 @@ -13,7 +12,7 @@ pkgdata_DATA = clean-kr.am clean.am compile-kr.am comp-vars.am \ compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am footer.am \ header.am header-vars.am kr-extra.am libs.am library.am \ mans-vars.am program.am progs.am remake-hdr.am remake-subd.am \ -remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \ +remake.am scripts.am subdirs.am tags.am tags-clean.am \ texi-vers.am texinfos.am libs-clean.am \ progs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \ ansi2knr.1 lisp.am lisp-clean.am diff --git a/lib/am/tags.am b/lib/am/tags.am index 6da6509..fdf435a 100644 --- a/lib/am/tags.am +++ b/lib/am/tags.am @@ -17,19 +17,17 @@ ## 02111-1307, USA. tags: TAGS -tags-recursive: - list="$(SUBDIRS)"; for subdir in $$list; do \ -## Never fail here if a subdir fails. - (cd $$subdir && $(MAKE) tags); \ - done +ID: $(HEADERS) $(SOURCES) + here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) \ - $(TAGS_DEPENDENCIES) +TAGS: @DIRS@ $(HEADERS) $(SOURCES) @CONFIG@ $(TAGS_DEPENDENCIES) tags=; \ here=`pwd`; \ - for subdir in $(SUBDIRS); do \ +## It is ok to examine SUBDIRS here in every case; if it is empty, +## there is a slight performance hit. But we don't care. + list="$(SUBDIRS)"; for subdir in $$list; do \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ done; \ ## Make sure we have something to run etags on. - test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \ - || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS) + test -z "$(ETAGS_ARGS)@CONFIG@$(SOURCES)$(HEADERS)$$tags" \ + || cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $(SOURCES) $(HEADERS) -o $$here/TAGS diff --git a/m4/Makefile.am b/m4/Makefile.am index 1ac5a6c..5b98da3 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal -m4data_DATA = ccsanity.m4 ccstdc.m4 dmalloc.m4 init.m4 install.m4 \ +m4data_DATA = ccstdc.m4 dmalloc.m4 init.m4 install.m4 \ lispdir.m4 maintainer.m4 protos.m4 ptrdiff.m4 regex.m4 strtod.m4 termios.m4 \ winsz.m4 mktime.m4 error.m4 obstack.m4 sanity.m4 diff --git a/m4/Makefile.in b/m4/Makefile.in index 76a075b..bea4e92 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.1g from Makefile.am +# Makefile.in generated automatically by automake 1.1h from Makefile.am # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -43,7 +43,7 @@ AUTOMAKE_OPTIONS = gnits MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal -m4data_DATA = ccsanity.m4 ccstdc.m4 dmalloc.m4 init.m4 install.m4 \ +m4data_DATA = ccstdc.m4 dmalloc.m4 init.m4 install.m4 \ lispdir.m4 maintainer.m4 protos.m4 ptrdiff.m4 regex.m4 strtod.m4 termios.m4 \ winsz.m4 mktime.m4 error.m4 obstack.m4 sanity.m4 diff --git a/m4/ccsanity.m4 b/m4/ccsanity.m4 deleted file mode 100644 index de7e57e..0000000 --- a/m4/ccsanity.m4 +++ /dev/null @@ -1,17 +0,0 @@ -AC_DEFUN(AM_SANITY_CHECK_CC, -[dnl Derived from macros from Bruno Haible and from Cygnus. -AC_MSG_CHECKING([whether the compiler ($CC $CFLAGS $LDFLAGS) actually works]) -AC_LANG_SAVE - AC_LANG_C - AC_TRY_RUN([main() { exit(0); }], - am_cv_prog_cc_works=yes, am_cv_prog_cc_works=no, - dnl When crosscompiling, just try linking. - AC_TRY_LINK([], [], am_cv_prog_cc_works=yes, - am_cv_prog_cc_works=no)) -AC_LANG_RESTORE -case "$am_cv_prog_cc_works" in - *no) AC_MSG_ERROR([Installation or configuration problem: C compiler cannot create executables.]) ;; - *yes) ;; -esac -AC_MSG_RESULT(yes) -])dnl diff --git a/tags-subd.am b/tags-subd.am deleted file mode 100644 index c0338f7..0000000 --- a/tags-subd.am +++ /dev/null @@ -1,24 +0,0 @@ -## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. - -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -## 02111-1307, USA. -ID: $(HEADERS) $(SOURCES) - here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) - -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) - here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS diff --git a/tags.am b/tags.am index 6da6509..fdf435a 100644 --- a/tags.am +++ b/tags.am @@ -17,19 +17,17 @@ ## 02111-1307, USA. tags: TAGS -tags-recursive: - list="$(SUBDIRS)"; for subdir in $$list; do \ -## Never fail here if a subdir fails. - (cd $$subdir && $(MAKE) tags); \ - done +ID: $(HEADERS) $(SOURCES) + here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) \ - $(TAGS_DEPENDENCIES) +TAGS: @DIRS@ $(HEADERS) $(SOURCES) @CONFIG@ $(TAGS_DEPENDENCIES) tags=; \ here=`pwd`; \ - for subdir in $(SUBDIRS); do \ +## It is ok to examine SUBDIRS here in every case; if it is empty, +## there is a slight performance hit. But we don't care. + list="$(SUBDIRS)"; for subdir in $$list; do \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ done; \ ## Make sure we have something to run etags on. - test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \ - || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS) + test -z "$(ETAGS_ARGS)@CONFIG@$(SOURCES)$(HEADERS)$$tags" \ + || cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $(SOURCES) $(HEADERS) -o $$here/TAGS diff --git a/version.texi b/version.texi index 4b0b234..2cac392 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 15 November 1996 +@set UPDATED 18 November 1996 @set EDITION 1.1h @set VERSION 1.1h -- 2.7.4