From 2bb759206f9fbaea0054214c7dbbdc3e6981f899 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 18 Jul 2006 14:52:53 +0000 Subject: [PATCH] Build gcc library of libfl. --- commands/flex-2.5.4/Makefile.in | 16 +++++++++------- commands/flex-2.5.4/build | 19 +++++++++++++++++-- commands/flex-2.5.4/configure | 1 + 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/commands/flex-2.5.4/Makefile.in b/commands/flex-2.5.4/Makefile.in index 0f4a016bb..97ea9bd4e 100644 --- a/commands/flex-2.5.4/Makefile.in +++ b/commands/flex-2.5.4/Makefile.in @@ -17,7 +17,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ -LDFLAGS = -stack 256k +LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ # Installation targeting. Files will be installed under the tree @@ -50,8 +50,8 @@ VPATH = @srcdir@ LN_S = @LN_S@ YACC = @YACC@ CC = @CC@ -AR = ar -RANLIB = true +AR = @AR@ +RANLIB = @RANLIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -94,6 +94,7 @@ all: $(FLEX) $(FLEX): .bootstrap $(OBJECTS) $(FLEXLIB) $(CC) $(CFLAGS) -o $(FLEX) $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS) + install -S256k $(FLEX) .bootstrap: initscan.c @rm -f scan.c @@ -164,15 +165,16 @@ $(FLEXLIB): $(LIBOBJS) $(FLEX).man: flex.1 cd $(srcdir) && nroff -man flex.1 >$(FLEX).man -install: $(FLEX) $(FLEXLIB) installdirs install.$(INSTALLMAN) +install: $(FLEX) installlib installdirs install.$(INSTALLMAN) $(INSTALL_PROGRAM) $(FLEX) $(bindir)/$(FLEX) @rm -f $(bindir)/$(FLEX)++ cd $(bindir) && $(LN_S) $(FLEX) $(FLEX)++ - $(INSTALL_DATA) $(FLEXLIB) $(libdir)/$(FLEXLIB) - $(INSTALL_DATA) $(FLEXLIB) /usr/lib/i386/ - -cd $(libdir) && $(RANLIB) $(FLEXLIB) $(INSTALL_DATA) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h +installlib: $(FLEXLIB) + $(INSTALL_DATA) $(FLEXLIB) $(libdir)/$(FLEXLIB) + -cd $(libdir) && $(RANLIB) $(FLEXLIB) + # Note, the following rules delete any vestigial flexdoc installed # for a prior flex release. install.man: flex.1 diff --git a/commands/flex-2.5.4/build b/commands/flex-2.5.4/build index 931105a18..791ff4015 100755 --- a/commands/flex-2.5.4/build +++ b/commands/flex-2.5.4/build @@ -1,5 +1,20 @@ #!/bin/sh -CC=cc /bin/sh ./configure --prefix=/usr && make all + +CCACHE=config.cache +rm -f $CCACHE +RANLIB=true AR=ar CONFIG_SHELL=/bin/bigsh CC=cc /bin/bigsh ./configure --prefix=/usr +make clean all + if [ "$1" != build ] -then make install +then make install +fi + +if [ -f /usr/gnu/bin/gcc ] +then PATH=/usr/gnu/bin:$PATH + rm -f $CCACHE + CC=gcc CONFIG_SHELL=/bin/bigsh AR=gar /bin/bigsh ./configure --prefix=/usr/local/gnu + make clean libfl.a + if [ "$1" != build ] + then make installlib + fi fi diff --git a/commands/flex-2.5.4/configure b/commands/flex-2.5.4/configure index be7f861b8..ddd4d77a0 100755 --- a/commands/flex-2.5.4/configure +++ b/commands/flex-2.5.4/configure @@ -1447,6 +1447,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF $ac_vpsub $extrasub +s%@AR@%$AR%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g