automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

58-ansi2knr-am.patch


From: Akim Demaille
Subject: 58-ansi2knr-am.patch
Date: Mon, 19 Mar 2001 10:21:33 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * automake.in (&get_object_extension): Use ansi2knr.am.
        * clean-kr.am, kr-extra.am: Remove, merged into...
        * ansi2knr.am: this new file.

Index: Makefile.am
--- Makefile.am Sun, 11 Mar 2001 21:03:14 +0100 akim (am/f/46_Makefile.a 1.20 
644)
+++ Makefile.am Sun, 11 Mar 2001 21:15:36 +0100 akim (am/f/46_Makefile.a 1.20 
644)
@@ -10,10 +10,10 @@
 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: Makefile.in
--- Makefile.in Sun, 11 Mar 2001 21:03:14 +0100 akim (am/h/16_Makefile.i 1.50 
644)
+++ Makefile.in Sun, 11 Mar 2001 21:15:42 +0100 akim (am/h/16_Makefile.i 1.50 
644)
@@ -84,10 +84,10 @@
 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: automake.in
--- automake.in Sun, 11 Mar 2001 21:03:14 +0100 akim (am/f/39_automake.i 1.176 
755)
+++ automake.in Sun, 11 Mar 2001 21:26:56 +0100 akim (am/f/39_automake.i 1.176 
755)
@@ -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;
        }
Index: ansi2knr.am
--- ansi2knr.am Sun, 11 Mar 2001 21:32:08 +0100 akim ()
+++ ansi2knr.am Sun, 11 Mar 2001 21:13:08 +0100 akim (am/h/37_ansi2knr.a  644)
@@ -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
Index: clean-kr.am
--- clean-kr.am Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/51_clean-kr.a 1.2 
644)
+++ clean-kr.am Sun, 11 Mar 2001 21:32:08 +0100 akim ()
@@ -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: kr-extra.am
--- kr-extra.am Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/35_kr-extra.a 1.2 
644)
+++ kr-extra.am Sun, 11 Mar 2001 21:32:08 +0100 akim ()
@@ -1,29 +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: 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]