+Thu Jan 11 23:14:18 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): New variable.
+
+ * automake.in (strictness, strictness_name): Renamed.
+ (initialize_per_input): Set strictness, strictness_name.
+ Initialize %options.
+ (generate_makefile): Run handle_options.
+ (handle_options): New function.
+ (handle_man_pages): Make install-man depend on $(MANS). Turn off
+ man page install if no-installman option given.
+ (read_am_file): Deprecate @kr@.
+ (get_object_extension): Look at ansi2knr option.
+ (parse_arguments): Take global strictness from command-line
+ options.
+
+Tue Jan 9 11:24:14 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ Fixes from François Pinard:
+ * depend.am ($(srcdir)/.deps/%.P): Handle deansification.
+ * automake.in (get_object_extension): Use $o, not $(kr)o.
+ (handle_source_transform): Don't look for $(kr)c files.
+ * kr-vars.am (o): New macro.
+ (kr): Removed.
+
+ * depend.am (DEP_FILES): Removed.
+ * automake.in (handle_source_transform): Push .P file onto
+ dep_files.
+ (initialize_per_input): New variable %dep_files.
+ (handle_dependencies): Generate DEP_FILES here.
+
+Mon Jan 8 22:27:33 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (do_one_clean_target): Only remove config.status in
+ top-level directory.
+ (handle_tags): Removed 'id' from .PHONY list. From Jim Meyering.
+
+ * clean.am (maintainer-clean-generic): Remove BUILT_SOURCES.
+
+ * automake.in (handle_dist): Make "ln" quiet.
+
+ * tags-subd.am (ID): Depend on HEADERS and SOURCES.
+
Sat Jan 6 10:58:23 1996 Tom Tromey <tromey@cambric.colorado.edu>
* automake.in (handle_merge_targets): 'check' shouldn't depend on
+AUTOMAKE_OPTIONS = gnits
+
bin_SCRIPTS = automake
TEXINFOS = automake.texi
# SUBDIRS = intl po
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
+AUTOMAKE_OPTIONS = gnits
+
bin_SCRIPTS = automake
TEXINFOS = automake.texi
# SUBDIRS = intl po
ACLOCAL = aclocal.m4
DIST_COMMON = README mkinstalldirs configure Makefile.in stamp-vti \
-configure.in ChangeLog THANKS README version.texi mdate-sh TODO INSTALL \
-COPYING Makefile.am texinfo.tex NEWS aclocal.m4 install-sh
+AUTHORS configure.in ChangeLog THANKS README version.texi mdate-sh TODO \
+INSTALL COPYING Makefile.am texinfo.tex NEWS aclocal.m4 install-sh
PACKAGE = @PACKAGE@
$(srcdir)/configure: configure.in $(ACLOCAL)
cd $(srcdir) && autoconf
-ID:
+ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f $$here/ID $(SOURCES) $(HEADERS)
tags: TAGS
&& automake --include-deps --output-dir=$$distdir --strictness=gnits
@for file in $(DISTFILES); do \
test -f $(distdir)/$$file \
- || ln $(srcdir)/$$file $(distdir)/$$file \
+ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
done
for subdir in $(SUBDIRS); do \
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-binSCRIPTS mostlyclean-vti mostlyclean-info \
mostlyclean-tags mostlyclean-generic
clean-binSCRIPTS maintainer-clean-binSCRIPTS uninstall-binSCRIPTS \
mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
install-info uninstall-info mostlyclean-info distclean-info clean-info \
-maintainer-clean-info uninstall-pkgdataDATA tags id mostlyclean-tags \
+maintainer-clean-info uninstall-pkgdataDATA tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags dist all info dvi check \
installcheck install-exec install-data install uninstall installdirs \
mostlyclean-generic distclean-generic clean-generic \
* More standards checking
* Bug fixes
* Cleaned up 'dist' targets
+* Added AUTOMAKE_OPTIONS variable
\f
New in 0.27:
* Works with Perl 4 again
* am_error should use printf-style arguments (for eventual gettext scheme)
-Add AM_OPTIONS macro. Can include:
+BUILT_SOURCES should go in distribution
+
+Add AUTOMAKE_OPTIONS macro. Can include:
"gnits", "gnu", "normal", "ansi2kr", "installman"
uninstall and pkg-dirs should rm -rf the dir.
existence. [ This is nixed for now because of the auto-dependency
tracking stuff ]
-automake.in: should ".cc" really -> ".${kr}o"? This doesn't really
+automake.in: should ".cc" really -> ".$(kr)o"? This doesn't really
seem right, but maybe it is so names can be rewritten uniformly? Must
check
# Variables global to entire run.
-# Strictness level.
-$strictness = $NORMAL;
+# Strictness level as set on command line.
+$default_strictness = $NORMAL;
-# Name of strictness level.
-$strictness_name = 'normal';
+# Name of strictness level, as set on command line.
+$default_strictness_name = 'normal';
# This is TRUE if GNU make specific automatic dependency generation
# code should be included in generated Makefile.in.
shift (@arglist);
}
+ # Take global strictness from whatever we currently have set.
+ $default_strictness = $strictness;
+ $default_strictness_name = $strictness_name;
+
if (! @make_list)
{
# Look around for some files.
push (@phony, 'default');
&read_am_file ($makefile . '.am');
+ &handle_options;
# Check first, because we might modify some state.
&check_gnu_standards;
################################################################
+# Handle AUTOMAKE_OPTIONS variable.
+sub handle_options
+{
+ return if ! defined $contents{'AUTOMAKE_OPTIONS'};
+
+ foreach (split (/\s+/, $contents{'AUTOMAKE_OPTIONS'}))
+ {
+ $options{$_} = 1;
+ if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'normal')
+ {
+ &set_strictness ($_);
+ }
+ elsif ($_ eq 'no-installman' || $_ eq 'ansi2knr')
+ {
+ # Explicitly recognize these.
+ }
+ else
+ {
+ &am_error ('option ', $_, 'not recognized');
+ }
+ }
+}
+
# Return object extension. Just once, put some code into the output.
sub get_object_extension
{
push (@suffixes, '.c', '.o');
push (@clean, 'compile');
- if (defined $contents{'@kr@'})
+ if (defined $options{'ansi2knr'} || defined $contents{'@kr@'})
{
- $dir_holds_sources = '.$(kr)o';
+ $dir_holds_sources = '$o';
push (@suffixes, '._c', '._o');
&require_file ($NORMAL, 'ansi2knr.c', 'ansi2knr.1');
# Turn sources into objects.
local (@files) = split (/\s+/, $contents{$one_file . "_SOURCES"});
# Ugh: Perl syntax vs Emacs.
- local ($krc1, $krc2) = ('\.\$\{kr\}c', '\.\$\(kr\)c');
+ # local ($krc1, $krc2) = ('\.\$\{kr\}c', '\.\$\(kr\)c');
local (@result) = ();
foreach (@files)
{
# Transform source files into .o files.
s/\.cc$/$obj/g;
- s/$krc1$/$obj/g;
- s/$krc2$/$obj/g;
+ # s/$krc1$/$obj/g;
+ # s/$krc2$/$obj/g;
s/\.[cCmylfs]$/$obj/g;
-
push (@result, $_);
+
+ # Transform .o file into .P file (for automatic
+ # dependency code).
+ s/$obj/.P/g;
+ $dep_files{$_} = 1;
}
&pretty_print ($one_file . "_OBJECTS =", '', @result);
}
# Generate list of install dirs.
- $output_rules .= "install-man:\n";
+ $output_rules .= "install-man: $(MANS)\n";
foreach (keys %sections)
{
push (@installdirs, '$(mandir)/man' . $_);
$output_vars .= &file_contents ('mans-vars');
- push (@install_data, 'install-man');
- push (@uninstall, 'uninstall-man');
- push (@all, '$(MANS)');
+ if (! defined $options{'no-installman'})
+ {
+ push (@install_data, 'install-man');
+ push (@uninstall, 'uninstall-man');
+ push (@all, '$(MANS)');
+ }
}
# Handle DATA variables.
elsif ($dir_holds_sources || defined $contents{'ETAGS_ARGS'})
{
$output_rules .= &file_contents ('tags-subd');
- push (@phony, 'id');
$tagging = 1;
}
# distribution.
$output_rules .= ' @for file in $(DISTFILES); do \\
test -f $(distdir)/$$file \\
- || ln $(srcdir)/$$file $(distdir)/$$file \\
+ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \\
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \\
done
';
# Include GNU-make-specific auto-dep code.
if ($dir_holds_sources)
{
+ &pretty_print ('DEP_FILES =', '', sort keys %dep_files);
$output_rules .= &file_contents ('depend');
}
}
$output_rules .=
("\t\@echo \"This command is intended for maintainers to use;\"\n"
. "\t\@echo \"it deletes files that may require special "
- . "tools to rebuild.\"\n"
- . "\trm -f config.status\n");
+ . "tools to rebuild.\"\n");
+
+ $output_rules .= "\trm -f config.status\n"
+ if $relative_dir eq '.';
}
elsif ($name . $target eq 'distclean')
{
elsif ($_ eq "\@kr\@\n")
{
# Special case: this means we want automatic
- # de-ANSI-fication. FIXME think of a better way.
+ # de-ANSI-fication. This is deprecated. Remove in the
+ # future.
$contents{'@kr@'} = 1;
+ &am_error ('@kr@ is deprecated; put "ansi2knr" in AUTOMAKE_OPTIONS instead');
}
else
{
# TRUE if install targets should work recursively.
$recursive_install = 0;
+
+ # All .P files.
+ %dep_files = ();
+
+ # Strictness levels.
+ $strictness = $default_strictness;
+ $strictness_name = $default_strictness_name;
+
+ # Options from AUTOMAKE_OPTIONS.
+ %options = ();
}
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-## Use $(kr) in case we are doing auto-deANSIfication.
-DEP_FILES = $(patsubst %.$(kr)o, $(srcdir)/.deps/%.P,$(OBJECTS))
-
## We use ".P" as the name of our placeholder because it can't be
## duplicated by any C source file. (Well, there could be ".c", but
## no one does that in practice)
## operator, and commonly appears in filenames.
@re=`echo 's,\<$(srcdir),,g' | sed 's/\./\\./g'`; \
$(MKDEP) $< | sed $$re > $@-tmp
- @mv $@-tmp $@
+ @if test -n "$o"; then \
+ sed 's/\.o:/$$o:/' $@-tmp > $@; \
+ else \
+ mv $@-tmp $@; \
+ fi
# End of maintainer-only section
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
ANSI2KNR = @ANSI2KNR@
-kr = @U@
+o = @U@o
+AUTOMAKE_OPTIONS = gnits
+
bin_SCRIPTS = automake
TEXINFOS = automake.texi
# SUBDIRS = intl po
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-## Use $(kr) in case we are doing auto-deANSIfication.
-DEP_FILES = $(patsubst %.$(kr)o, $(srcdir)/.deps/%.P,$(OBJECTS))
-
## We use ".P" as the name of our placeholder because it can't be
## duplicated by any C source file. (Well, there could be ".c", but
## no one does that in practice)
## operator, and commonly appears in filenames.
@re=`echo 's,\<$(srcdir),,g' | sed 's/\./\\./g'`; \
$(MKDEP) $< | sed $$re > $@-tmp
- @mv $@-tmp $@
+ @if test -n "$o"; then \
+ sed 's/\.o:/$$o:/' $@-tmp > $@; \
+ else \
+ mv $@-tmp $@; \
+ fi
# End of maintainer-only section
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-ID:
+ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f $$here/ID $(SOURCES) $(HEADERS)
tags: TAGS