]> granicus.if.org Git - flex/commitdiff
move flex program sources into src/ directory
authorWill Estes <westes575@gmail.com>
Fri, 14 Feb 2014 12:52:31 +0000 (07:52 -0500)
committerWill Estes <westes575@gmail.com>
Sun, 16 Feb 2014 14:19:51 +0000 (09:19 -0500)
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.

41 files changed:
.gitignore
Makefile.am
configure.ac
doc/.gitignore
doc/Makefile.am
lib/.gitignore [new file with mode: 0644]
src/.gitignore [new file with mode: 0644]
src/FlexLexer.h [moved from FlexLexer.h with 100% similarity]
src/Makefile.am [new file with mode: 0644]
src/buf.c [moved from buf.c with 100% similarity]
src/ccl.c [moved from ccl.c with 100% similarity]
src/dfa.c [moved from dfa.c with 100% similarity]
src/ecs.c [moved from ecs.c with 100% similarity]
src/filter.c [moved from filter.c with 100% similarity]
src/flex.skl [moved from flex.skl with 100% similarity]
src/flexdef.h [moved from flexdef.h with 100% similarity]
src/flexint.h [moved from flexint.h with 100% similarity]
src/gen.c [moved from gen.c with 100% similarity]
src/gettext.h [moved from gettext.h with 100% similarity]
src/libmain.c [moved from libmain.c with 100% similarity]
src/libyywrap.c [moved from libyywrap.c with 100% similarity]
src/main.c [moved from main.c with 100% similarity]
src/misc.c [moved from misc.c with 100% similarity]
src/mkskel.sh [moved from mkskel.sh with 100% similarity]
src/nfa.c [moved from nfa.c with 100% similarity]
src/options.c [moved from options.c with 100% similarity]
src/options.h [moved from options.h with 100% similarity]
src/parse.y [moved from parse.y with 100% similarity]
src/regex.c [moved from regex.c with 100% similarity]
src/scan.l [moved from scan.l with 100% similarity]
src/scanflags.c [moved from scanflags.c with 100% similarity]
src/scanopt.c [moved from scanopt.c with 100% similarity]
src/scanopt.h [moved from scanopt.h with 100% similarity]
src/sym.c [moved from sym.c with 100% similarity]
src/tables.c [moved from tables.c with 100% similarity]
src/tables.h [moved from tables.h with 100% similarity]
src/tables_shared.c [moved from tables_shared.c with 100% similarity]
src/tables_shared.h [moved from tables_shared.h with 100% similarity]
src/tblcmp.c [moved from tblcmp.c with 100% similarity]
src/version.h [moved from version.h with 100% similarity]
src/yylex.c [moved from yylex.c with 100% similarity]

index 1120ef6def2b7f6f74adfcb21d9d1768c66b92c0..f8d94e97c5bbf10beb867062f44f5548d8a60b02 100644 (file)
@@ -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
index fc519212b8b76c822cfd2cc2402539403fdd2dde..23396acf2d30502e2e804c99204aec995e5ae5ea 100644 (file)
 # 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)
index deade143f3429047a752e9ec8f00f3cc6d5df898..b83f166f846bec93bb8ab66d6043fb9c8e0123bc 100644 (file)
 
 # 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
index c74bc7b39349a42d1ca16305c0922e681646af6f..1568b38b2219cd37f00a3ff44cac687e25755bf0 100644 (file)
@@ -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
index 0e23dca1abf4fa72b63b1bd069b829f170bf9df9..961e41bb00be3826023ef86cc42f6241fb74ca40 100644 (file)
@@ -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 (file)
index 0000000..9e23bdd
--- /dev/null
@@ -0,0 +1,3 @@
+*.la
+*.lo
+*.o
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644 (file)
index 0000000..f3a9234
--- /dev/null
@@ -0,0 +1,10 @@
+*.la
+*.lo
+*.o
+config.h
+config.h.in
+flex
+parse.c
+parse.h
+scan.c
+skel.c
similarity index 100%
rename from FlexLexer.h
rename to src/FlexLexer.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..9cd7960
--- /dev/null
@@ -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
similarity index 100%
rename from buf.c
rename to src/buf.c
diff --git a/ccl.c b/src/ccl.c
similarity index 100%
rename from ccl.c
rename to src/ccl.c
diff --git a/dfa.c b/src/dfa.c
similarity index 100%
rename from dfa.c
rename to src/dfa.c
diff --git a/ecs.c b/src/ecs.c
similarity index 100%
rename from ecs.c
rename to src/ecs.c
similarity index 100%
rename from filter.c
rename to src/filter.c
similarity index 100%
rename from flex.skl
rename to src/flex.skl
similarity index 100%
rename from flexdef.h
rename to src/flexdef.h
similarity index 100%
rename from flexint.h
rename to src/flexint.h
diff --git a/gen.c b/src/gen.c
similarity index 100%
rename from gen.c
rename to src/gen.c
similarity index 100%
rename from gettext.h
rename to src/gettext.h
similarity index 100%
rename from libmain.c
rename to src/libmain.c
similarity index 100%
rename from libyywrap.c
rename to src/libyywrap.c
similarity index 100%
rename from main.c
rename to src/main.c
similarity index 100%
rename from misc.c
rename to src/misc.c
similarity index 100%
rename from mkskel.sh
rename to src/mkskel.sh
diff --git a/nfa.c b/src/nfa.c
similarity index 100%
rename from nfa.c
rename to src/nfa.c
similarity index 100%
rename from options.c
rename to src/options.c
similarity index 100%
rename from options.h
rename to src/options.h
similarity index 100%
rename from parse.y
rename to src/parse.y
similarity index 100%
rename from regex.c
rename to src/regex.c
similarity index 100%
rename from scan.l
rename to src/scan.l
similarity index 100%
rename from scanflags.c
rename to src/scanflags.c
similarity index 100%
rename from scanopt.c
rename to src/scanopt.c
similarity index 100%
rename from scanopt.h
rename to src/scanopt.h
diff --git a/sym.c b/src/sym.c
similarity index 100%
rename from sym.c
rename to src/sym.c
similarity index 100%
rename from tables.c
rename to src/tables.c
similarity index 100%
rename from tables.h
rename to src/tables.h
similarity index 100%
rename from tables_shared.c
rename to src/tables_shared.c
similarity index 100%
rename from tables_shared.h
rename to src/tables_shared.h
similarity index 100%
rename from tblcmp.c
rename to src/tblcmp.c
similarity index 100%
rename from version.h
rename to src/version.h
similarity index 100%
rename from yylex.c
rename to src/yylex.c