+Fri Sep 20 09:06:37 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * tags.am (TAGS): Minor cleanup.
+
+ * clean.am (distclean-generic): Don't remove CONFIG_HEADER.
+
+ * remake-hdr.am (mostlyclean-hdr, clean-hdr, distclean-hdr,
+ maintainer-clean-hdr): New targets.
+
+ * automake.in (handle_configure): Define CONFIG_HEADER correctly
+ when it is in current directory.
+ (handle_configure): Push "hdr" on @clean.
+
+ * remake-hdr.am (stamp-h): Run config.status in top_builddir.
+ ($(srcdir)/stamp-h.in): Run autoheader in top_srcdir.
+
+ * automake.in (scan_configure): Check for install.sh here.
+ (basename): New sub.
+ (handle_configure): Handle case where config.h is in subdir.
+ (handle_configure): Make stamp-in.h for user if it doesn't already
+ exist.
+ (touch): New sub.
+
Tue Sep 17 23:35:14 1996 Tom Tromey <tromey@creche.cygnus.com>
* Makefile.am (EXTRA_DIST): Include pkgdata_DATA.
Priorities for release:
[ none ]
-support config.h in subdir
+must move CONFIG_HEADER from tags.am... allow it to work in subdir.
-consider auto-creating stamp-h.in for user
+if @...@ substitution in _PROGRAMS, then require EXTRA_PROGRAMS!
take diff-n-query code from libit
* can do this by looking at subdirs, seeing configure.in
and auto-running Automake there
-dejagnu support:
-* use RUNTEST_FOR_TARGET in some cases?
-
These can both be handled via dist-hook:
. Consider supporting guile-style PLUGIN directories automatically?
. Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
must document the targets required for integration with
non-automake-using subdirs
+use of (eg) EXTRA_PROGRAMS is not very clear right now
+
================================================================
Libraries:
. $strictness_name
. '/g',
'remake');
+ $top_reldir = '';
+ }
- &am_error
- ("\`install.sh' is an anachronism; use \`install-sh' instead")
- if -f $relative_dir . '/install.sh';
-
- # If we have a configure header, require it.
- if ($config_header)
- {
- # FIXME: this restriction should be lifted.
- # FIXME: first see if it is even needed as-is.
- &am_conf_line_error ($config_header_line,
- "argument to AC_CONFIG_HEADER contains \`/'\n")
- if ($config_header =~ /\//);
-
- &require_file_with_conf_line ($config_header_line,
- $FOREIGN, $config_header);
-
- # Header defined and in this directory.
- if (-f 'acconfig.h')
- {
- &define_variable ("ACCONFIG", "acconfig.h");
- &push_dist_common ('acconfig.h');
- }
- if (-f $config_name . '.top')
- {
- &define_variable ("CONFIG_TOP", "${config_name}.top");
- &push_dist_common ($config_name . '.top');
- }
- if (-f $config_name . '.bot')
- {
- &define_variable ("CONFIG_BOT", "${config_name}.bot");
- &push_dist_common ($config_name . '.bot');
- }
+ # If we have a configure header, require it.
+ if ($config_header && $relative_dir eq &dirname ($config_header))
+ {
+ local ($ch_sans_dir) = &basename ($config_header);
+ local ($cn_sans_dir) = &basename ($config_name);
- &require_file_with_conf_line ($config_header_line, $FOREIGN,
- 'stamp-h.in');
+ &require_file_with_conf_line ($config_header_line,
+ $FOREIGN, $ch_sans_dir);
- $output_rules .= &file_contents ('remake-hdr');
- &define_variable ("CONFIG_HEADER_IN", "${config_header}");
+ # Header defined and in this directory.
+ if (-f $relative_dir . '/acconfig.h')
+ {
+ &define_variable ("ACCONFIG", "acconfig.h");
+ &push_dist_common ('acconfig.h');
+ }
+ if (-f $config_name . '.top')
+ {
+ &define_variable ("CONFIG_TOP", "${cn_sans_dir}.top");
+ &push_dist_common ($cn_sans_dir . '.top');
+ }
+ if (-f $config_name . '.bot')
+ {
+ &define_variable ("CONFIG_BOT", "${cn_sans_dir}.bot");
+ &push_dist_common ($cn_sans_dir . '.bot');
}
- $top_reldir = '';
+ &touch ($relative_dir . '/stamp-h.in');
+ &require_file_with_conf_line ($config_header_line, $FOREIGN,
+ 'stamp-h.in');
+
+ $output_rules .= &file_contents ('remake-hdr');
+ push (@clean, 'hdr');
+ &push_phony_cleaners ('hdr');
+ &define_variable ("CONFIG_HEADER_IN", "${ch_sans_dir}");
}
# Set location of mkinstalldirs.
"\`CONFIG_HEADER' is an anachronism; now determined from \`configure.in'")
if &variable_defined ('CONFIG_HEADER');
- # Generate CONFIG_HEADER define.
- &define_variable ("CONFIG_HEADER", "${top_builddir}/${config_name}")
- if $config_name;
+ if ($config_name)
+ {
+ # Generate CONFIG_HEADER define.
+ if ($relative_dir eq &dirname ($config_name))
+ {
+ &define_variable ("CONFIG_HEADER", &basename ($config_name));
+ }
+ else
+ {
+ &define_variable ("CONFIG_HEADER",
+ "${top_builddir}/${config_name}");
+ }
+ }
# Now look for other files in this directory which must be remade
# by config.status, and generate rules for them.
# the file-finding machinery works.
local ($relative_dir) = '.';
&require_config_file ($FOREIGN, 'install-sh', 'mkinstalldirs');
+ &am_error ("\`install.sh' is an anachronism; use \`install-sh' instead")
+ if -f $config_aux_path[0] . '/install.sh';
}
################################################################
return $sub;
}
+# Return file name of a file.
+sub basename
+{
+ local ($file) = @_;
+ local ($sub);
+
+ ($sub = $file) =~s,^.*/+,,g;
+ return $sub;
+}
+
+# Touch a file.
+sub touch
+{
+ local ($file) = @_;
+
+ open (TOUCH, ">> $file");
+ close (TOUCH);
+}
+
################################################################
# Print an error message and set exit status.
Still, sometimes there are files which must be distributed, but which
are not covered in the automatic rules. These files should be listed in
-the @code{EXTRA_DIST} variable.
+the @code{EXTRA_DIST} variable. Note that @code{EXTRA_DIST} can only
+handle files in the current directory; files in other directories will
+cause @code{make dist} runtime failures.
@vindex EXTRA_DIST
Occasionally it is useful to be able to change the distribution before
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)
- rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
+ rm -f config.cache config.log stamp-h
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)
- rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
+ rm -f config.cache config.log stamp-h
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
## 02111-1307, USA.
$(CONFIG_HEADER): stamp-h
stamp-h: $(CONFIG_HEADER_IN) config.status
- CONFIG_FILES= CONFIG_HEADERS=$(CONFIG_HEADER) ./config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=$(CONFIG_HEADER) ./config.status
@echo timestamp > stamp-h
$(srcdir)/$(CONFIG_HEADER_IN): @MAINT@stamp-h.in
$(srcdir)/stamp-h.in: configure.in $(ACLOCAL) $(ACCONFIG) $(CONFIG_TOP) $(CONFIG_BOT)
- cd $(srcdir) && autoheader
+ cd $(top_srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ rm -f $(CONFIG_HEADER)
+
+maintainer-clean-hdr:
tags=; \
here=`pwd`; \
for subdir in $(SUBDIRS); do \
- test -f $$subdir/TAGS && { \
- tags="$$tags -i $$here/$$subdir/TAGS"; \
- } \
+ 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" \
## 02111-1307, USA.
$(CONFIG_HEADER): stamp-h
stamp-h: $(CONFIG_HEADER_IN) config.status
- CONFIG_FILES= CONFIG_HEADERS=$(CONFIG_HEADER) ./config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=$(CONFIG_HEADER) ./config.status
@echo timestamp > stamp-h
$(srcdir)/$(CONFIG_HEADER_IN): @MAINT@stamp-h.in
$(srcdir)/stamp-h.in: configure.in $(ACLOCAL) $(ACCONFIG) $(CONFIG_TOP) $(CONFIG_BOT)
- cd $(srcdir) && autoheader
+ cd $(top_srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ rm -f $(CONFIG_HEADER)
+
+maintainer-clean-hdr:
tags=; \
here=`pwd`; \
for subdir in $(SUBDIRS); do \
- test -f $$subdir/TAGS && { \
- tags="$$tags -i $$here/$$subdir/TAGS"; \
- } \
+ 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" \
+Fri Sep 20 09:39:27 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * confsub.test: New file.
+
Mon Sep 16 00:05:52 1996 Tom Tromey <tromey@creche.cygnus.com>
* spell2.test: New file.
man.test info.test obsolete.test lex.test scripts.test subdir2.test \
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
-gnits.test interp2.test colneq.test implicit.test spell.test spell2.test
+gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
+confsub.test
EXTRA_DIST = defs $(TESTS)
man.test info.test obsolete.test lex.test scripts.test subdir2.test \
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
-gnits.test interp2.test colneq.test implicit.test spell.test spell2.test
+gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
+confsub.test
EXTRA_DIST = defs $(TESTS)
mkinstalldirs = $(top_srcdir)/mkinstalldirs
--- /dev/null
+#! /bin/sh
+
+# Test to make sure config.h can be in subdir.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_PROG_MAKE_SET
+AC_CONFIG_HEADER(subdir/config.h)
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_ARG_PROGRAM
+AM_PROG_INSTALL
+AC_OUTPUT(Makefile subdir/Makefile)
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = subdir
+END
+
+mkdir subdir
+cat > subdir/Makefile.am << 'END'
+bin_PROGRAMS = fred
+END
+
+: > subdir/config.h.in
+
+$AUTOMAKE
-@set UPDATED 17 September 1996
+@set UPDATED 20 September 1996
@set EDITION 1.1f
@set VERSION 1.1f