From: Hans-Bernhard B. <br...@ph...> - 2000-05-09 14:06:53
|
On Mon, 8 May 2000, Mike Hopkirk(hops) wrote: > On Mon May 08,2000 (06:19:30PM +0200), br...@ph...(Hans-Bernhard Broeker) wrote: [...] > > the experience of the FSF, as found in automake? They provide a script > > 'ylwrap' that sort of automatically finds and uses the right tools for the > > job. > > How does it define 'right tools for the job' ? Well, on second reading of its spec, it doesn't. Sorry for spreading misinformation. But my original point was: cscope is by far not the first program on the open software market to be using lex and yacc, so I find it hard to believe it really should be necessary to roll our own autoconf macros to do that. AFAICS, our current setup has three main differences to the default behaviour of automake/autoconf: 1) we search for -ll or -lfl in /usr/local/lib, too 2) added 'configure' option --with-{name} for selecting an incarnation of lex or yacc. 3) we always call 'flex' with the '-l' option. For all three of these, I found existing or alternative means more 'natural' to either my usual compilation setup, or autoconf'ed package building. 1) If you build packages remotely regularly, your compiler should already be set up to find libraries in /usr/local/lib, without any need for extra -L flags on the linking command line. This is what LIBRARY_PATH exists for. Having no 'root' access, I have it containing $HOME/alpha/lib:/usr/local/lib, e.g. 1/2) Environment variables. E.g. if you want 'configure' to use 'lex', 'byacc', 'cc', and need to pass an additional library path, setup the environment for 'configure', appropriately: env CC=cc LEX=lex YACC=byacc LDFLAGS=-L/usr/local/lib ./configure I cannot really see the need for extra configure code, down that road. 3) Instead of checking if LEX==flex, just to get the '-l' option added to it, I just added a line %array to the scanner.l file. That makes the one truly important change implied by the '-l' option, already (yytext is forced to be an array). Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |