octave-maintainers
[Top][All Lists]
Advanced

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

Re: build trouble on MacOS 10.5 [patch]


From: Rob Mahurin
Subject: Re: build trouble on MacOS 10.5 [patch]
Date: Wed, 23 Dec 2009 11:46:12 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Dec 22, 2009 at 05:54:35PM -0600, John W. Eaton wrote:
> On 22-Dec-2009, Rob Mahurin wrote:
> | diff -r 6918d86add73 src/Makefile.am
> | --- a/src/Makefile.am       Fri Dec 18 13:26:05 2009 -0500
> | +++ b/src/Makefile.am       Sat Dec 19 12:56:16 2009 -0500
> | @@ -707,10 +707,9 @@
> |  #  @echo "expect 14 shift/reduce conflicts"
> |  #  $(YACC) $(YFLAGS) --output=$@ --defines=y.tab.h $<
> |  
> | -#lex.cc : lex.l
> | -#  $(LEX) $(LFLAGS) $< > $(@F)-t
> | -#  @mv $(@F)-t $@
> | -
> | +lex.cc : lex.ll
> | +   $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- 
> $(LEXCOMPILE)
> | +   $(PERL) -i -pe 'print qq[#ifdef HAVE_CONFIG_H\n#include 
> <config.h>\n#endif\n] if !$$i++' $@
> |  
> |  $(OPT_INC) : %.h : %.in
> |     $(MAKE) -C $(@D) $@
> 
> Instead of doing this, I think I would prefer to add a source file
> that looks like this:
> 
>   #ifdef HAVE_CONFIG_H
>   #include <config.h>
>   #endif
> 
>   #include <lex.cc>
> 
> and then compile that instead of compiling lex.cc directly.

I agree.  At present the Makefile contains rules for generating lex.cc
from lex.ll, for the name of the target (in my case
liboctinterp_la-lex.lo) that requires lex.cc, and for the final rule
that links this object code somewhere else.  None of this logic is
obvious to me in Makefile.am.  How do I add a new file to this
chain?  I tried a couple of things but did not succeed.

> | diff -r 6918d86add73 src/gl2ps.c
> | --- a/src/gl2ps.c   Fri Dec 18 13:26:05 2009 -0500
> | +++ b/src/gl2ps.c   Sat Dec 19 12:56:16 2009 -0500
> | @@ -33,6 +33,9 @@
> |   * Please report all bugs and problems to <address@hidden>.
> |   */
> |  
> | +#ifdef HAVE_CONFIG_H                                                       
>    
> | +#include <config.h>                                                        
>    
> | +#endif                                                                     
>    
> |  #include "gl2ps.h"
> |  
> |  #include <math.h>
> 
> We will probably periodically update gl2ps.c from the upstream source
> from time to time.  I'd rather not have to remember to make this
> change each time we update.  I think it would be better to use a
> wrapper file similar to what I proposed for lex.cc. 
> 
> Would you please make those changes and submit another patch?

Eventually :)

Cheers,
Rob


reply via email to

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