]> sourceware.org Git - automake.git/commitdiff
* automake.in (&output_lex_build_rule): Output this...
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:00:49 +0000 (10:00 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 10:00:49 +0000 (10:00 +0000)
* lex.am: New file.

ChangeLog
Makefile.am
Makefile.in
automake.in
lex.am [new file with mode: 0644]
lib/am/Makefile.am
lib/am/lex.am [new file with mode: 0644]

index c4eb82e5ed0de9d4911f9b91f99759d7978059c7..765523a23cce46c9dfc44e7be785df4bc5bb5a40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&output_lex_build_rule): Output this...
+       * lex.am: New file.
+
 2001-04-09  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&condition_negate): New.
index ba257991a00652a7172bd9f2824751411f9bf832..6a244e765a9cedb1f3935646fc9f1da01abbcdf6 100644 (file)
@@ -11,11 +11,11 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.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 library.am libs.am libtool.am lisp.am ltlib.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 mans-vars.am mans.am multilib.am program.am progs.am \
-python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am          \
+python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am \
 texi-vers.am texibuild.am texinfos.am yacc.am
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
index 5352795f997cf27fd333f1c49563cebaa32c1e9a..c92d216cd45b2760d6b46abc51ba20c572574d73 100644 (file)
@@ -84,11 +84,11 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.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 library.am libs.am libtool.am lisp.am ltlib.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 mans-vars.am mans.am multilib.am program.am progs.am \
-python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am          \
+python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am \
 texi-vers.am texibuild.am texinfos.am yacc.am
 
 
index ec6a0726265afe307b051ae76ffddecf1aabcb0e..0454bdeb3ef81fbd89107cf2cd98769ba0967a94 100755 (executable)
@@ -1499,9 +1499,9 @@ sub output_yacc_build_rule
 
     # Generate rule for c/c++.
     $output_rules .= &file_contents ('yacc',
-                                    ('YACC_SUFFIX' => $yacc_suffix,
-                                     'C_SUFFIX'    => $c_suffix,
-                                     'YLWRAP'      => $use_ylwrap));
+                                    ('YLWRAP'      => $use_ylwrap,
+                                     'YACC_SUFFIX' => $yacc_suffix,
+                                     'C_SUFFIX'    => $c_suffix));
 }
 
 sub output_lex_build_rule
@@ -1510,23 +1510,10 @@ sub output_lex_build_rule
 
     (my $c_suffix = $lex_suffix) =~ tr/l/c/;
 
-    push (@suffixes, $lex_suffix);
-    &define_configure_variable ('LEX_OUTPUT_ROOT');
-    &define_configure_variable ('LEXLIB');
-    $output_rules .= "$lex_suffix$c_suffix:\n\t";
-
-    if ($use_ylwrap)
-    {
-        # Is the $@ correct here?  If so, why not use it in the ylwrap
-        # build rule for yacc above?
-       $output_rules .= '$(SHELL) $(YLWRAP)'
-           . ' "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)';
-    }
-    else
-    {
-       $output_rules .= '$(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@';
-    }
-    $output_rules .= "\n";
+    $output_rules .= &file_contents ('lex',
+                                    ('YLWRAP'     => $use_ylwrap,
+                                     'LEX_SUFFIX' => $lex_suffix,
+                                     'C_SUFFIX'   => $c_suffix));
 }
 
 
diff --git a/lex.am b/lex.am
new file mode 100644 (file)
index 0000000..006e0be
--- /dev/null
+++ b/lex.am
@@ -0,0 +1,28 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright 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.
+
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
+
+## Generate rule for c/c++.
+%LEX_SUFFIX%%C_SUFFIX%:
+if %?YLWRAP%
+       $(SHELL) $(YLWRAP) $(LEX) $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)
+else
+       $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+endif %?YLWRAP%
index ba257991a00652a7172bd9f2824751411f9bf832..6a244e765a9cedb1f3935646fc9f1da01abbcdf6 100644 (file)
@@ -11,11 +11,11 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.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 library.am libs.am libtool.am lisp.am ltlib.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 mans-vars.am mans.am multilib.am program.am progs.am \
-python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am          \
+python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am \
 texi-vers.am texibuild.am texinfos.am yacc.am
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
diff --git a/lib/am/lex.am b/lib/am/lex.am
new file mode 100644 (file)
index 0000000..006e0be
--- /dev/null
@@ -0,0 +1,28 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright 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.
+
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
+
+## Generate rule for c/c++.
+%LEX_SUFFIX%%C_SUFFIX%:
+if %?YLWRAP%
+       $(SHELL) $(YLWRAP) $(LEX) $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)
+else
+       $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+endif %?YLWRAP%
This page took 0.052493 seconds and 5 git commands to generate.