* clean-kr.am, kr-extra.am: Remove, merged into...
* ansi2knr.am: this new file.
+2001-04-09 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&get_object_extension): Use ansi2knr.am.
+ * clean-kr.am, kr-extra.am: Remove, merged into...
+ * ansi2knr.am: this new file.
+
2001-04-09 Akim Demaille <akim@epita.fr>
* automake.in (&transform): Fix an incredible bug which was
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = check.am clean-hdr.am clean-kr.am clean.am compile.am \
+amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am kr-extra.am \
-lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lex.am \
+library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = check.am clean-hdr.am clean-kr.am clean.am compile.am \
+amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am kr-extra.am \
-lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lex.am \
+library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
+
+## ---------- ##
+## ansi2knr. ##
+## ---------- ##
+
+if %!ANSI2KNR-DIR%
+
+ansi2knr: ansi2knr.$(OBJEXT)
+ $(LINK) ansi2knr.$(OBJEXT) $(LIBS)
+ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
+
+else %!ANSI2KNR-DIR%
+
+%ANSI2KNR-DIR%/ansi2knr:
+ cd %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
+
+endif %!ANSI2KNR-DIR%
+
+
+## ------------------- ##
+## Cleaning ansi2knr. ##
+## ------------------- ##
+
+
+if %!ANSI2KNR-DIR%
.PHONY: clean-krextra
clean-am: clean-krextra
## should remove it (and if the maintainer built it, then
## maintainer-clean should remove it).
-rm -f ansi2knr
+endif %!ANSI2KNR-DIR%
+
+
+
+## --------------------------------- ##
+## Cleaning the output of ansi2knr. ##
+## --------------------------------- ##
+
+.PHONY: mostlyclean-kr
+
+mostlyclean-am: mostlyclean-kr
+mostlyclean-kr:
+ -rm -f *_.c
{
&require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN,
'ansi2knr.c', 'ansi2knr.1');
- $output_rules .= &file_contents ('kr-extra');
- }
-
- # Generate rules to build ansi2knr. If it is in some
- # other directory, then generate dependencies but have the
- # rule just run elsewhere.
- $output_rules .= ($options{'ansi2knr'} . ': '
- . $options{'ansi2knr'} . '.$(OBJEXT)' . "\n");
- if ($options{'ansi2knr'} eq 'ansi2knr')
- {
- $output_rules .= ("\t\$(LINK) ansi2knr.\$(OBJEXT)"
- . " \$(LIBS)\n"
- . 'ansi2knr.$(OBJEXT)'
- . ": \$(CONFIG_HEADER)\n\n");
- }
- else
- {
- $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'})
- . ' && $(MAKE) $(AM_MAKEFLAGS) '
- . "ansi2knr\n\n");
- # This is required for non-GNU makes.
- $output_rules .= ($options{'ansi2knr'} . '.$(OBJEXT)' . ":\n");
- $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'})
- . ' && $(MAKE) $(AM_MAKEFLAGS)'
- . ' ansi2knr.$(OBJEXT)' . "\n\n");
}
# Make sure ansi2knr can be found: if no path specified,
&define_variable ("ANSI2KNR", $options{'ansi2knr'});
}
- $output_rules .= &file_contents ('clean-kr');
+ my $ansi2knr_dir = '';
+ $ansi2knr_dir = dirname ($options{'ansi2knr'})
+ if $options{'ansi2knr'} ne 'ansi2knr';
+
+ $output_rules .= &file_contents ('ansi2knr',
+ ('ANSI2KNR-DIR' => $ansi2knr_dir));
$included_knr_compile = 1;
}
+++ /dev/null
-## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1997, 2001 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.
-
-.PHONY: mostlyclean-kr
-
-mostlyclean-am: mostlyclean-kr
-mostlyclean-kr:
- -rm -f *_.c
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = check.am clean-hdr.am clean-kr.am clean.am compile.am \
+amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am kr-extra.am \
-lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lex.am \
+library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright 1994, 1995, 1996, 1997, 2001 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.
+
+
+## ---------- ##
+## ansi2knr. ##
+## ---------- ##
+
+if %!ANSI2KNR-DIR%
+
+ansi2knr: ansi2knr.$(OBJEXT)
+ $(LINK) ansi2knr.$(OBJEXT) $(LIBS)
+ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
+
+else %!ANSI2KNR-DIR%
+
+%ANSI2KNR-DIR%/ansi2knr:
+ cd %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
+
+endif %!ANSI2KNR-DIR%
+
+
+## ------------------- ##
+## Cleaning ansi2knr. ##
+## ------------------- ##
+
+
+if %!ANSI2KNR-DIR%
+.PHONY: clean-krextra
+
+clean-am: clean-krextra
+clean-krextra:
+## Why `clean' and not somewhere else? Not `mostlyclean' because
+## people usually don't want to recompile this file. And not
+## `distclean' because of our informal rule: if `make' built it, then
+## `clean' should delete it; if `configure' built it, then `distclean'
+## should remove it (and if the maintainer built it, then
+## maintainer-clean should remove it).
+ -rm -f ansi2knr
+endif %!ANSI2KNR-DIR%
+
+
+
+## --------------------------------- ##
+## Cleaning the output of ansi2knr. ##
+## --------------------------------- ##
+
+.PHONY: mostlyclean-kr
+
+mostlyclean-am: mostlyclean-kr
+mostlyclean-kr:
+ -rm -f *_.c