diff options
60 files changed, 1067 insertions, 629 deletions
diff --git a/Makefile.am b/Makefile.am index e499bb4..3eaa8df 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -17,3 +17,3 @@ | |||
17 | ACLOCAL_AMFLAGS = -I am | 17 | ACLOCAL_AMFLAGS = -I am |
18 | SUBDIRS=. src @GRECS_TESTDIR@ @GRECS_DOCDIR@ | 18 | SUBDIRS=. include src @GRECS_TESTDIR@ @GRECS_DOCDIR@ |
19 | EXTRA_DIST=build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h | 19 | EXTRA_DIST=build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h |
diff --git a/am/grecs.m4 b/am/grecs.m4 index 74b7840..60244a1 100644 --- a/am/grecs.m4 +++ b/am/grecs.m4 | |||
@@ -204,3 +204,3 @@ AC_DEFUN([GRECS_SETUP],[ | |||
204 | AC_SUBST([GRECS_README]) | 204 | AC_SUBST([GRECS_README]) |
205 | AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[src] [-I$(top_builddir)/]grecsdir[src]') | 205 | AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[include] [-I$(top_builddir)/]grecsdir[include]') |
206 | AC_SUBST([GRECS_HOST_PROJECT_INCLUDES]) | 206 | AC_SUBST([GRECS_HOST_PROJECT_INCLUDES]) |
@@ -208,5 +208,6 @@ AC_DEFUN([GRECS_SETUP],[ | |||
208 | AC_SUBST([GRECS_INCLUDE_DIR],['$(pkgincludedir)']) | 208 | AC_SUBST([GRECS_INCLUDE_DIR],['$(pkgincludedir)']) |
209 | 209 | ||
210 | _GRECS_OPTION_SWITCH([install],[ | 210 | _GRECS_OPTION_SWITCH([install],[ |
211 | LT_INIT | 211 | LT_INIT |
212 | GRECS_BUILD_TYPE=install | ||
212 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] | 213 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] |
@@ -220,2 +221,3 @@ AC_DEFUN([GRECS_SETUP],[ | |||
220 | LT_INIT | 221 | LT_INIT |
222 | GRECS_BUILD_TYPE=shared | ||
221 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] | 223 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] |
@@ -226,2 +228,3 @@ AC_DEFUN([GRECS_SETUP],[ | |||
226 | ],[ | 228 | ],[ |
229 | GRECS_BUILD_TYPE=static | ||
227 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a'] | 230 | GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a'] |
@@ -232,3 +235,10 @@ AC_DEFUN([GRECS_SETUP],[ | |||
232 | ]) | 235 | ]) |
233 | AC_CONFIG_FILES(grecsdir[Makefile] grecsdir[src/grecs.h]:grecsdir[src/grecs.hin]) | 236 | AM_CONDITIONAL([GRECS_COND_BUILD_INSTALL],[test $GRECS_BUILD_TYPE = install]) |
237 | AM_CONDITIONAL([GRECS_COND_BUILD_SHARED],[test $GRECS_BUILD_TYPE = shared]) | ||
238 | AM_CONDITIONAL([GRECS_COND_BUILD_STATIC],[test $GRECS_BUILD_TYPE = static]) | ||
239 | |||
240 | AC_CONFIG_FILES(grecsdir[Makefile] | ||
241 | grecsdir[include/Makefile] | ||
242 | grecsdir[include/grecs/Makefile] | ||
243 | grecsdir[include/grecs/types.h]:grecsdir[include/grecs/types.h.in]) | ||
234 | m4_popdef([grecsdir]) | 244 | m4_popdef([grecsdir]) |
diff --git a/configure.ac b/configure.ac index b923c9b..6ffa55b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -18,3 +18,3 @@ AC_PREREQ(2.63) | |||
18 | AC_INIT([libgrecs], [1.0], [gray+grecs@gnu.org.ua]) | 18 | AC_INIT([libgrecs], [1.0], [gray+grecs@gnu.org.ua]) |
19 | AC_CONFIG_SRCDIR([src/grecs.hin]) | 19 | AC_CONFIG_SRCDIR([src/grecs-gram.y]) |
20 | AC_CONFIG_AUX_DIR([build-aux]) | 20 | AC_CONFIG_AUX_DIR([build-aux]) |
diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..21a51e7 --- /dev/null +++ b/include/Makefile.am | |||
@@ -0,0 +1,19 @@ | |||
1 | SUBDIRS = grecs | ||
2 | GRECS_HDR = grecs.h wordsplit.h | ||
3 | |||
4 | if GRECS_COND_BUILD_INSTALL | ||
5 | include_HEADERS = $(GRECS_HDR) | ||
6 | endif | ||
7 | |||
8 | if GRECS_COND_BUILD_SHARED | ||
9 | if GRECS_COND_INSTALLHEADERS | ||
10 | grecsincludedir = @GRECS_INCLUDE_DIR@ | ||
11 | grecsinclude_HEADERS = $(GRECS_HDR) | ||
12 | else | ||
13 | noinst_HEADERS = $(GRECS_HDR) | ||
14 | endif | ||
15 | endif | ||
16 | |||
17 | if GRECS_COND_BUILD_STATIC | ||
18 | noinst_HEADERS = $(GRECS_HDR) | ||
19 | endif | ||
diff --git a/include/grecs.h b/include/grecs.h new file mode 100644 index 0000000..eac11d4 --- /dev/null +++ b/include/grecs.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* grecs - Gray's Extensible Configuration System -*- c -*- | ||
2 | Copyright (C) 2007-2016 Sergey Poznyakoff | ||
3 | |||
4 | Grecs is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 3 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | Grecs is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License along | ||
15 | with Grecs. If not, see <http://www.gnu.org/licenses/>. */ | ||
16 | |||
17 | #ifndef _GRECS_H | ||
18 | #define _GRECS_H | ||
19 | |||
20 | #include <grecs/types.h> | ||
21 | #include <grecs/version.h> | ||
22 | #include <grecs/doc.h> | ||
23 | #include <grecs/error.h> | ||
24 | #include <grecs/format.h> | ||
25 | #include <grecs/lex.h> | ||
26 | #include <grecs/list.h> | ||
27 | #include <grecs/locus.h> | ||
28 | #include <grecs/mem.h> | ||
29 | #include <grecs/node.h> | ||
30 | #include <grecs/parser.h> | ||
31 | #include <grecs/preproc.h> | ||
32 | #include <grecs/sockaddr.h> | ||
33 | #include <grecs/symtab.h> | ||
34 | #include <grecs/table.h> | ||
35 | #include <grecs/tree.h> | ||
36 | #include <grecs/txtacc.h> | ||
37 | #include <grecs/util.h> | ||
38 | #include <grecs/value.h> | ||
39 | |||
40 | #endif | ||
diff --git a/include/grecs/.gitignore b/include/grecs/.gitignore new file mode 100644 index 0000000..8cb8a05 --- /dev/null +++ b/include/grecs/.gitignore | |||
@@ -0,0 +1 @@ | |||
types.h | |||
diff --git a/include/grecs/Makefile.am b/include/grecs/Makefile.am new file mode 100644 index 0000000..c239c1b --- /dev/null +++ b/include/grecs/Makefile.am | |||
@@ -0,0 +1,43 @@ | |||
1 | GRECS_PKG_HDR =\ | ||
2 | doc.h\ | ||
3 | error.h\ | ||
4 | format.h\ | ||
5 | lex.h\ | ||
6 | list.h\ | ||
7 | locus.h\ | ||
8 | mem.h\ | ||
9 | node.h\ | ||
10 | opt.h\ | ||
11 | parser.h\ | ||
12 | preproc.h\ | ||
13 | sockaddr.h\ | ||
14 | symtab.h\ | ||
15 | table.h\ | ||
16 | tree.h\ | ||
17 | txtacc.h\ | ||
18 | types.h\ | ||
19 | util.h\ | ||
20 | value.h\ | ||
21 | version.h | ||
22 | |||
23 | if GRECS_COND_JSON | ||
24 | GRECS_PKG_HDR += json.h | ||
25 | endif | ||
26 | |||
27 | if GRECS_COND_BUILD_INSTALL | ||
28 | grecsincludedir = @GRECS_INCLUDE_DIR@ | ||
29 | grecsinclude_HEADERS = $(GRECS_PKG_HDR) | ||