]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (&get_object_extension): Use ansi2knr.am.
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:31:05 +0000 (10:31 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:31:05 +0000 (10:31 +0000)
* clean-kr.am, kr-extra.am: Remove, merged into...
* ansi2knr.am: this new file.

ChangeLog
Makefile.am
Makefile.in
ansi2knr.am [moved from kr-extra.am with 66% similarity]
automake.in
clean-kr.am [deleted file]
lib/am/Makefile.am
lib/am/ansi2knr.am [new file with mode: 0644]

index 3b588677bd8eb52d73f7ac0f46dd176ea6250cd0..9b14344ff7d57a26ccf3d1c4e0c89a9a40c3f85b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 162e8e4d06d2d55f483fb6ff79e2aea23fd04f2a..33c4abfb7cf9af5027eaa357ec0af482e475634a 100644 (file)
@@ -10,10 +10,10 @@ SUBDIRS = . m4 tests
 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
index cf15ecd5fd573b77236b8f173a0b942b17d0ae55..4a939b414046c21ff45ae79ff980f6ba31c07a63 100644 (file)
@@ -83,10 +83,10 @@ SUBDIRS = . m4 tests
 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
similarity index 66%
rename from kr-extra.am
rename to ansi2knr.am
index 40db02e78078b650d0c3a694d64c8d5157dc9cab..3550e14ff99e8a115bbdce24afc13c2ec08c5ba9 100644 (file)
 ## 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
@@ -27,3 +52,16 @@ 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
index 12b502bc43254e605f93c2455fa6ed27a1b5d1a9..82e7967aeb6f100c5d0a853f777d69150ef0ec93 100755 (executable)
@@ -1328,31 +1328,6 @@ sub get_object_extension
            {
                &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,
@@ -1371,7 +1346,12 @@ sub get_object_extension
                &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;
        }
diff --git a/clean-kr.am b/clean-kr.am
deleted file mode 100644 (file)
index 50c04ae..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-## 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
index 162e8e4d06d2d55f483fb6ff79e2aea23fd04f2a..33c4abfb7cf9af5027eaa357ec0af482e475634a 100644 (file)
@@ -10,10 +10,10 @@ SUBDIRS = . m4 tests
 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
diff --git a/lib/am/ansi2knr.am b/lib/am/ansi2knr.am
new file mode 100644 (file)
index 0000000..3550e14
--- /dev/null
@@ -0,0 +1,67 @@
+## 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