automake
[Top][All Lists]
Advanced

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

45-fix-yacc2-test.patch


From: Akim Demaille
Subject: 45-fix-yacc2-test.patch
Date: Sun, 11 Mar 2001 19:09:46 +0100

There is still one test which fails, but it's because I don't know
what happens: subobj2.test.

=== Running test ./subobj2.test
Makefile.am:0: @address@hidden multiply defined in condition TRUE
  @address@hidden (Automake, where = 0) =
  {


    TRUE => @CXXDEPMODE@
  }
FAIL: subobj2.test

I you look at the output, you see:

@address@hidden = @CXXDEPMODE@

.cc.o:
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
        $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<

.cc.obj:
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
        $(CXXCOMPILE) -c -o $@ `cygpath -w $<`


@address@hidden = @CXXDEPMODE@

.cxx.o:
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
        $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<

.cxx.obj:
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
        $(CXXCOMPILE) -c -o $@ `cygpath -w $<`


i.e., in the CC chunk. it is CXXDEPMODE which is being defined.  And
since it is redefined when loading the C++ snippets, automake
complains.

I am not sure it is right or wrong to use the C++ variables to compile
C code, so I am leaving the complaints from automake.  If it is _not_
meant, then quite some work is needed, as it's like this at least
since 1.4b.  If that's meant, it just means that CXXMODE must be set
some other way, that's easy.



Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * tests/yacc2.test: Don't define several times a variable, as
        automake complains.

Index: tests/yacc2.test
--- tests/yacc2.test Sat, 13 Jan 2001 18:11:09 +0100 akim (am/6_yacc2.test 1.1 
775)
+++ tests/yacc2.test Sun, 11 Mar 2001 16:55:21 +0100 akim (am/6_yacc2.test 1.1 
775)
@@ -15,11 +15,20 @@
 zardoz_SOURCES = zardoz.y
 END

+# Don't redefine several times the same variable.
+cp Makefile.am Makefile.AM
+
+
+
+
 $AUTOMAKE || exit 1

 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1

+
+
+cp Makefile.AM Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am

 $AUTOMAKE || exit 1
@@ -27,6 +36,9 @@
 # If zardoz.h is NOT mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null || exit 1

+
+
+cp Makefile.AM Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am

 $AUTOMAKE || exit 1
@@ -34,6 +46,9 @@
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1

+
+
+cp Makefile.AM Makefile.am
 echo 'YFLAGS = -d' >> Makefile.am

 $AUTOMAKE || exit 1
@@ -41,6 +56,9 @@
 # If zardoz.h is NOT mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null || exit 1

+
+
+cp Makefile.AM Makefile.am
 echo 'YFLAGS = ' >> Makefile.am

 $AUTOMAKE || exit 1



reply via email to

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