diff options
author | Will Estes <westes575@gmail.com> | 2014-02-14 07:52:31 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-02-16 09:19:51 -0500 |
commit | 269620b90047cf95cc8f65c98ca599d4fe18e779 (patch) | |
tree | 3fe9f5c8153e91d652284ae5af934ece646274d9 | |
parent | 638d8a1448fa3d2241c71aff016d323c8654373c (diff) | |
download | flex-git-269620b90047cf95cc8f65c98ca599d4fe18e779.tar.gz |
move flex program sources into src/ directory
The *.[chly] sources are now in the src directory. This implies a
bunch of changes in Makefile.am and friends to account for the new
location. The .gitignore files are now more local to places where various object files and generated source files occur.
-rw-r--r-- | .gitignore | 36 | ||||
-rw-r--r-- | Makefile.am | 147 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | doc/.gitignore | 41 | ||||
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rw-r--r-- | lib/.gitignore | 3 | ||||
-rw-r--r-- | src/.gitignore | 10 | ||||
-rw-r--r-- | src/FlexLexer.h (renamed from FlexLexer.h) | 0 | ||||
-rw-r--r-- | src/Makefile.am | 140 | ||||
-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-x | src/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
@@ -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/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/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/mkskel.sh b/src/mkskel.sh index 02c397a..02c397a 100755 --- a/mkskel.sh +++ b/src/mkskel.sh 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/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/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/version.h b/src/version.h index b9e5d6c..b9e5d6c 100644 --- a/version.h +++ b/src/version.h |