CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
-LDFLAGS = -stack 256k
+LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
# Installation targeting. Files will be installed under the tree
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@
$(FLEX): .bootstrap $(OBJECTS) $(FLEXLIB)
$(CC) $(CFLAGS) -o $(FLEX) $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS)
+ install -S256k $(FLEX)
.bootstrap: initscan.c
@rm -f scan.c
$(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) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h
+
+installlib: $(FLEXLIB)
$(INSTALL_DATA) $(FLEXLIB) $(libdir)/$(FLEXLIB)
- $(INSTALL_DATA) $(FLEXLIB) /usr/lib/i386/
-cd $(libdir) && $(RANLIB) $(FLEXLIB)
- $(INSTALL_DATA) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h
# Note, the following rules delete any vestigial flexdoc installed
# for a prior flex release.
#!/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