summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore36
-rw-r--r--Makefile.am147
-rw-r--r--configure.ac10
-rw-r--r--doc/.gitignore41
-rw-r--r--doc/Makefile.am4
-rw-r--r--lib/.gitignore3
-rw-r--r--src/.gitignore10
-rw-r--r--src/FlexLexer.h (renamed from FlexLexer.h)0
-rw-r--r--src/Makefile.am140
-rw-r--r--src/buf.c (renamed from buf.c)0
-rw-r--r--src/ccl.c (renamed from ccl.c)0
-rw-r--r--src/dfa.c (renamed from dfa.c)0
-rw-r--r--src/ecs.c (renamed from ecs.c)0
-rw-r--r--src/filter.c (renamed from filter.c)0
-rw-r--r--src/flex.skl (renamed from flex.skl)0
-rw-r--r--src/flexdef.h (renamed from flexdef.h)0
-rw-r--r--src/flexint.h (renamed from flexint.h)0
-rw-r--r--src/gen.c (renamed from gen.c)0
-rw-r--r--src/gettext.h (renamed from gettext.h)0
-rw-r--r--src/libmain.c (renamed from libmain.c)0
-rw-r--r--src/libyywrap.c (renamed from libyywrap.c)0
-rw-r--r--src/main.c (renamed from main.c)0
-rw-r--r--src/misc.c (renamed from misc.c)0
-rwxr-xr-xsrc/mkskel.sh (renamed from mkskel.sh)0
-rw-r--r--src/nfa.c (renamed from nfa.c)0
-rw-r--r--src/options.c (renamed from options.c)0
-rw-r--r--src/options.h (renamed from options.h)0
-rw-r--r--src/parse.y (renamed from parse.y)0
-rw-r--r--src/regex.c (renamed from regex.c)0
-rw-r--r--src/scan.l (renamed from scan.l)0
-rw-r--r--src/scanflags.c (renamed from scanflags.c)0
-rw-r--r--src/scanopt.c (renamed from scanopt.c)0
-rw-r--r--src/scanopt.h (renamed from scanopt.h)0
-rw-r--r--src/sym.c (renamed from sym.c)0
-rw-r--r--src/tables.c (renamed from tables.c)0
-rw-r--r--src/tables.h (renamed from tables.h)0
-rw-r--r--src/tables_shared.c (renamed from tables_shared.c)0
-rw-r--r--src/tables_shared.h (renamed from tables_shared.h)0
-rw-r--r--src/tblcmp.c (renamed from tblcmp.c)0
-rw-r--r--src/version.h (renamed from version.h)0
-rw-r--r--src/yylex.c (renamed from yylex.c)0
41 files changed, 191 insertions, 200 deletions
diff --git a/.gitignore b/.gitignore
index 1120ef6..f8d94e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,11 @@
+*.orig
+*.rej
*.tar.bz2
*.tar.gz
-.bootstrap
+*.tar.xz
+*~
.deps
+.libs
ABOUT-NLS
ChangeLog
INSTALL
@@ -9,34 +13,10 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache
-compile
-conf.in
-config.cache
-config.guess
-config.h
+build-aux
config.log
-config.status*
-config.sub
+config.status
configure
-depcomp
-flex
-flex-*
-install-sh
-missing
+libtool
mkinstalldirs
-parse.c
-parse.h
-scan.c
-skel.c
stamp-*
-config.rpath
-ylwrap
-*.o
-.libs
-*.lo
-*.la
-libtool
-ltmain.sh
-*~
-*.orig
-*.rej
diff --git a/Makefile.am b/Makefile.am
index fc51921..23396ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,129 +33,32 @@
# For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
# additional info.
-AM_YFLAGS = -d
ACLOCAL_AMFLAGS = -I m4
m4 = @M4@
indent = @INDENT@
-bin_PROGRAMS = flex
-lib_LTLIBRARIES = \
- libfl.la \
- libfl_pic.la
-
-flex_SOURCES = \
- ccl.c \
- dfa.c \
- ecs.c \
- scanflags.c \
- gen.c \
- main.c \
- misc.c \
- nfa.c \
- parse.y \
- scan.l \
- skel.c \
- sym.c \
- tblcmp.c \
- yylex.c \
- options.c \
- scanopt.c \
- buf.c \
- tables.c \
- tables_shared.c \
- filter.c \
- regex.c
-
-
-LDADD = lib/libcompat.la
-
-libfl_la_SOURCES = \
- libmain.c \
- libyywrap.c
-
-libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
-
-libfl_pic_la_SOURCES = \
- libmain.c \
- libyywrap.c
-
-libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
-
-noinst_HEADERS = \
- flexdef.h \
- flexint.h \
- version.h \
- options.h \
- scanopt.h \
- tables.h \
- tables_shared.h
-
-include_HEADERS = \
- FlexLexer.h
-
dist_doc_DATA = \
AUTHORS \
COPYING \
NEWS \
ONEWS \
- README \
- TODO
+ README
EXTRA_DIST = \
.indent.pro \
ABOUT-NLS \
INSTALL \
autogen.sh \
- flex.skl \
- mkskel.sh \
- config.rpath \
- gettext.h
-
-BUILT_SOURCES = \
- skel.c
+ config.rpath
SUBDIRS = \
lib \
- . \
+ src \
doc \
examples \
po \
tests
-localedir = $(datadir)/locale
-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
-LIBS = @LIBINTL@ @LIBS@
-
-skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
- sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
-
-# Explicitly describe dependencies.
-# You can recreate this with `gcc -I. -MM *.c'
-buf.o: buf.c flexdef.h flexint.h
-ccl.o: ccl.c flexdef.h flexint.h
-dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
-ecs.o: ecs.c flexdef.h flexint.h
-scanflags.o: scanflags.c flexdef.h flexint.h
-gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
-libmain.o: libmain.c
-libyywrap.o: libyywrap.c
-main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
- tables.h tables_shared.h
-misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
-nfa.o: nfa.c flexdef.h flexint.h
-options.o: options.c options.h scanopt.h flexdef.h flexint.h
-parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
-scan.o: scan.c flexdef.h flexint.h parse.h
-scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
-skel.o: skel.c flexdef.h flexint.h
-sym.o: sym.c flexdef.h flexint.h
-tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
-tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
- tables_shared.h
-tblcmp.o: tblcmp.c flexdef.h flexint.h
-yylex.o: yylex.c flexdef.h flexint.h parse.h
-filter.o: filter.c flexdef.h flexint.h
-
# Create the ChangeLog, but only if we're inside a git working directory
ChangeLog: $(srcdir)/tools/git2cl
@@ -163,50 +66,6 @@ ChangeLog: $(srcdir)/tools/git2cl
$(srcdir)/tools/git2cl > $@ \
; fi
-# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
-#
-# Whole idea:
-# 1. Check for .indent.pro, otherwise indent will use unknown
-# settings, or worse, the GNU defaults.)
-# 2. Check that this is GNU indent.
-# 3. Make sure to process only the NON-generated .c and .h files.
-# 4. Run indent twice per file. The first time is a test.
-# Otherwise, indent overwrites your file even if it fails!
-indentfiles = \
- buf.c \
- ccl.c \
- dfa.c \
- ecs.c \
- scanflags.c \
- filter.c \
- flexdef.h \
- gen.c \
- libmain.c \
- libyywrap.c \
- main.c \
- misc.c \
- nfa.c \
- options.c \
- options.h \
- regex.c \
- scanopt.c \
- scanopt.h \
- sym.c \
- tables.c \
- tables.h \
- tables_shared.c \
- tables_shared.h \
- tblcmp.c
-
-indent:
- if [ -f .indent.pro ] ; then \
- for f in $(indentfiles);\
- do\
- echo indenting $$f ;\
- $(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\
- done \
- fi
-
install-exec-hook:
cd $(DESTDIR)$(bindir) && \
$(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)
diff --git a/configure.ac b/configure.ac
index deade14..b83f166 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,15 +24,16 @@
# autoconf requirements and initialization
-AC_INIT([the fast lexical analyser generator], [2.6.0
+AC_INIT([the fast lexical analyser generator], [2.6.0],
[flex-help@lists.sourceforge.net], [flex])
SHARED_VERSION_INFO="2:0:0"
AC_SUBST(SHARED_VERSION_INFO)
-
-AC_CONFIG_SRCDIR([scan.l])
+AC_CONFIG_SRCDIR([src/scan.l])
+AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([gnu check-news std-options dist-bzip2 dist-xz 1.10])
-AC_CONFIG_HEADER([config.h:conf.in])
+AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_LIBOBJ_DIR([lib])
+AC_CONFIG_MACRO_DIR([m4])
# checks for programs
@@ -118,6 +119,7 @@ examples/fastwc/Makefile
examples/manual/Makefile
lib/Makefile
po/Makefile.in
+src/Makefile
tests/Makefile
tests/TEMPLATE/Makefile
tests/test-array-nr/Makefile
diff --git a/doc/.gitignore b/doc/.gitignore
index c74bc7b..1568b38 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,29 +1,26 @@
-*.aux
-*.cp
-*.cps
-*.dvi
-*.fn
-*.fns
-*.hk
-*.hks
-*.info*
-*.ky
-*.log
-*.op
-*.ops
-*.pg
-*.toc
-*.tp
-*.tps
-*.vr
-*.vrs
+flex.aux
+flex.cp
+flex.cps
+flex.dvi
+flex.fn
+flex.fns
+flex.hk
+flex.hks
+flex.info*
+flex.ky
+flex.log
+flex.op
+flex.ops
+flex.pg
+flex.toc
+flex.tp
+flex.tps
+flex.vr
+flex.vrs
Makefile
Makefile.in
flex.1
flex.pdf
flex.ps
-mdate-sh
-stamp-*
version.texi
flex.html
-texinfo.tex
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0e23dca..961e41b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -23,9 +23,9 @@ CLEANFILES = \
flex.vr \
flex.vrs
-$(dist_man_MANS): $(top_srcdir)/main.c
+$(dist_man_MANS): $(top_srcdir)/src/main.c
for i in $(dist_man_MANS) ; do \
$(help2man) --name='$(PACKAGE_NAME)' \
--section=`echo $$i | sed -e 's/.*\.\([^.]*\)$$/\1/'` \
- ../flex$(EXEEXT) > $$i || rm -f $$i ; \
+ $(top_srcdir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \
done
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 0000000..9e23bdd
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1,3 @@
+*.la
+*.lo
+*.o
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..f3a9234
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,10 @@
+*.la
+*.lo
+*.o
+config.h
+config.h.in
+flex
+parse.c
+parse.h
+scan.c
+skel.c
diff --git a/FlexLexer.h b/src/FlexLexer.h
index bad4ce0..bad4ce0 100644
--- a/FlexLexer.h
+++ b/src/FlexLexer.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..9cd7960
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,140 @@
+AM_YFLAGS = -d
+localedir = $(datadir)/locale
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
+LIBS = @LIBINTL@ @LIBS@
+
+bin_PROGRAMS = flex
+lib_LTLIBRARIES = \
+ libfl.la \
+ libfl_pic.la
+
+flex_SOURCES = \
+ ccl.c \
+ dfa.c \
+ ecs.c \
+ scanflags.c \
+ gen.c \
+ main.c \
+ misc.c \
+ nfa.c \
+ parse.y \
+ scan.l \
+ skel.c \
+ sym.c \
+ tblcmp.c \
+ yylex.c \
+ options.c \
+ scanopt.c \
+ buf.c \
+ tables.c \
+ tables_shared.c \
+ filter.c \
+ regex.c
+
+LDADD = ../lib/libcompat.la
+
+libfl_la_SOURCES = \
+ libmain.c \
+ libyywrap.c
+
+libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+
+libfl_pic_la_SOURCES = \
+ libmain.c \
+ libyywrap.c
+
+libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+
+noinst_HEADERS = \
+ flexdef.h \
+ flexint.h \
+ version.h \
+ options.h \
+ scanopt.h \
+ tables.h \
+ tables_shared.h
+
+include_HEADERS = \
+ FlexLexer.h
+
+EXTRA_DIST = \
+ flex.skl \
+ mkskel.sh \
+ gettext.h
+
+BUILT_SOURCES = \
+ skel.c
+
+skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
+ sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
+
+# Explicitly describe dependencies.
+# You can recreate this with `gcc -I. -MM *.c'
+buf.o: buf.c flexdef.h flexint.h
+ccl.o: ccl.c flexdef.h flexint.h
+dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
+ecs.o: ecs.c flexdef.h flexint.h
+scanflags.o: scanflags.c flexdef.h flexint.h
+gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
+libmain.o: libmain.c
+libyywrap.o: libyywrap.c
+main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
+ tables.h tables_shared.h
+misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
+nfa.o: nfa.c flexdef.h flexint.h
+options.o: options.c options.h scanopt.h flexdef.h flexint.h
+parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
+scan.o: scan.c flexdef.h flexint.h parse.h
+scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
+skel.o: skel.c flexdef.h flexint.h
+sym.o: sym.c flexdef.h flexint.h
+tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
+tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
+ tables_shared.h
+tblcmp.o: tblcmp.c flexdef.h flexint.h
+yylex.o: yylex.c flexdef.h flexint.h parse.h
+filter.o: filter.c flexdef.h flexint.h
+
+# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
+#
+# Whole idea:
+# 1. Check for .indent.pro, otherwise indent will use unknown
+# settings, or worse, the GNU defaults.)
+# 2. Check that this is GNU indent.
+# 3. Make sure to process only the NON-generated .c and .h files.
+# 4. Run indent twice per file. The first time is a test.
+# Otherwise, indent overwrites your file even if it fails!
+indentfiles = \
+ buf.c \
+ ccl.c \
+ dfa.c \
+ ecs.c \
+ scanflags.c \
+ filter.c \
+ flexdef.h \
+ gen.c \
+ libmain.c \
+ libyywrap.c \
+ main.c \
+ misc.c \
+ nfa.c \
+ options.c \
+ options.h \
+ regex.c \
+ scanopt.c \
+ scanopt.h \
+ sym.c \
+ tables.c \
+ tables.h \
+ tables_shared.c \
+ tables_shared.h \
+ tblcmp.c
+
+indent:
+ if [ -f .indent.pro ] ; then \
+ for f in $(indentfiles);\
+ do\
+ echo indenting $$f ;\
+ $(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\
+ done \
+ fi
diff --git a/buf.c b/src/buf.c
index e5deb4e..e5deb4e 100644
--- a/buf.c
+++ b/src/buf.c
diff --git a/ccl.c b/src/ccl.c
index 8d66bb6..8d66bb6 100644
--- a/ccl.c
+++ b/src/ccl.c
diff --git a/dfa.c b/src/dfa.c
index b8b68eb..b8b68eb 100644
--- a/dfa.c
+++ b/src/dfa.c
diff --git a/ecs.c b/src/ecs.c
index e2abbe4..e2abbe4 100644
--- a/ecs.c
+++ b/src/ecs.c
diff --git a/filter.c b/src/filter.c
index c82f7f8..c82f7f8 100644
--- a/filter.c
+++ b/src/filter.c
diff --git a/flex.skl b/src/flex.skl
index f878ff0..f878ff0 100644
--- a/flex.skl
+++ b/src/flex.skl
diff --git a/flexdef.h b/src/flexdef.h
index 046dd9a..046dd9a 100644
--- a/flexdef.h
+++ b/src/flexdef.h
diff --git a/flexint.h b/src/flexint.h
index f9fa80c..f9fa80c 100644
--- a/flexint.h
+++ b/src/flexint.h
diff --git a/gen.c b/src/gen.c
index 8261951..8261951 100644
--- a/gen.c
+++ b/src/gen.c
diff --git a/gettext.h b/src/gettext.h
index ea67f30..ea67f30 100644
--- a/gettext.h
+++ b/src/gettext.h
diff --git a/libmain.c b/src/libmain.c
index 49262e4..49262e4 100644
--- a/libmain.c
+++ b/src/libmain.c
diff --git a/libyywrap.c b/src/libyywrap.c
index 8561a43..8561a43 100644
--- a/libyywrap.c
+++ b/src/libyywrap.c
diff --git a/main.c b/src/main.c
index 069b7b2..069b7b2 100644
--- a/main.c
+++ b/src/main.c
diff --git a/misc.c b/src/misc.c
index e3fdd50..e3fdd50 100644
--- a/misc.c
+++ b/src/misc.c
diff --git a/mkskel.sh b/src/mkskel.sh
index 02c397a..02c397a 100755
--- a/mkskel.sh
+++ b/src/mkskel.sh
diff --git a/nfa.c b/src/nfa.c
index 26b162c..26b162c 100644
--- a/nfa.c
+++ b/src/nfa.c
diff --git a/options.c b/src/options.c
index c673173..c673173 100644
--- a/options.c
+++ b/src/options.c
diff --git a/options.h b/src/options.h
index 1f3925b..1f3925b 100644
--- a/options.h
+++ b/src/options.h
diff --git a/parse.y b/src/parse.y
index bbc738c..bbc738c 100644
--- a/parse.y
+++ b/src/parse.y
diff --git a/regex.c b/src/regex.c
index e12cf65..e12cf65 100644
--- a/regex.c
+++ b/src/regex.c
diff --git a/scan.l b/src/scan.l
index 1bcb09b..1bcb09b 100644
--- a/scan.l
+++ b/src/scan.l
diff --git a/scanflags.c b/src/scanflags.c
index f75aa82..f75aa82 100644
--- a/scanflags.c
+++ b/src/scanflags.c
diff --git a/scanopt.c b/src/scanopt.c
index f76ecd3..f76ecd3 100644
--- a/scanopt.c
+++ b/src/scanopt.c
diff --git a/scanopt.h b/src/scanopt.h
index 359a18a..359a18a 100644
--- a/scanopt.h
+++ b/src/scanopt.h
diff --git a/sym.c b/src/sym.c
index 8d0b2e9..8d0b2e9 100644
--- a/sym.c
+++ b/src/sym.c
diff --git a/tables.c b/src/tables.c
index f3f056f..f3f056f 100644
--- a/tables.c
+++ b/src/tables.c
diff --git a/tables.h b/src/tables.h
index 2e4afe5..2e4afe5 100644
--- a/tables.h
+++ b/src/tables.h
diff --git a/tables_shared.c b/src/tables_shared.c
index b962666..b962666 100644
--- a/tables_shared.c
+++ b/src/tables_shared.c
diff --git a/tables_shared.h b/src/tables_shared.h
index bbf9910..bbf9910 100644
--- a/tables_shared.h
+++ b/src/tables_shared.h
diff --git a/tblcmp.c b/src/tblcmp.c
index a56aaab..a56aaab 100644
--- a/tblcmp.c
+++ b/src/tblcmp.c
diff --git a/version.h b/src/version.h
index b9e5d6c..b9e5d6c 100644
--- a/version.h
+++ b/src/version.h
diff --git a/yylex.c b/src/yylex.c
index f06e5e6..f06e5e6 100644
--- a/yylex.c
+++ b/src/yylex.c