summaryrefslogtreecommitdiffabout
path: root/README.submodule
blob: 9b7212fe28c368ac9e8239481716a53c85b60ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Grecs README
Copyright (C) 2011-2016 Sergey Poznyakoff
See the end of file for copying conditions.

* Introduction

This file contains brief information about using Grecs as a submodule.
You will find a complete documentation for Grecs, in form of man
pages, in the doc/ subdirectory. 

An online copy of the documentation in various formats is available
at http://grecs.man.gnu.org.ua.

If you are interested in libgrecs, a standalone library implementation
of Grecs, see the file README.standalone in this directory, or visit
http://grecs.man.gnu.org.ua.

* Overview

Grecs is a library for parsing structured configuration files from
C programs. A structured configuration file has hierarchical
structure, with block statements enclosing lower-level
statements. Such configurations files are used by many programs, such
as, e.g. Bind or Dico.

Grecs provides primitives for parsing such files into an internal
tree-like structure and for basic operations on such structures. These
operations include value lookups by keyword paths, traversing trees
recursively, joining several trees together, reductions, etc.

* Usage

1. Install grecs as a submodule:

   git submodule add git://git.gnu.org.ua/grecs.git grecs

2. Modify your configure.ac

First, indicate that grecs/am is the location of additional Autoconf
macros. To do so, add the following statement

   AC_CONFIG_MACRO_DIR([grecs/am])

Somewhere below this statement, add a call to GRECS_SETUP.  It can be as
simple as:

   GRECS_SETUP

If the subproject directory is not 'grecs', supply the actual
directory name as the first argument to both this macro, and
AC_CONFIG_MACRO_DIR, e.g.:

   AC_CONFIG_MACRO_DIR([lib/grecs/am])
   GRECS_SETUP([lib/grecs])

For a detailed description of the GRECS_SETUP macro, run
`man doc/GRECS_SETUP.3'.

3. In your Makefile.am, add @GRECS_INCLUDES@ to the AM_CPPFLAGS value,
and @GRECS_LDADD@ to LDADD, e.g.:

   AM_CPPFLAGS = @GRECS_INCLUDES@
   LDADD = @GRECS_LDADD@
   
4. Include "grecs.h"

5. Use the library to handle your configuration files.  See the
documentation for a detailed discussion.

* Bug reporting.		

Send bug reports to <gray+grecs@gnu.org.ua>. 


* Copyright information:

Copyright (C) 2011 Sergey Poznyakoff

   Permission is granted to anyone to make or distribute verbatim copies
   of this document as received, in any medium, provided that the
   copyright notice and this permission notice are preserved,
   thus giving the recipient permission to redistribute in turn.

   Permission is granted to distribute modified versions
   of this document, or of portions of it,
   under the above conditions, provided also that they
   carry prominent notices stating who last changed them.


Local Variables:
mode: outline
paragraph-separate: "[ 	]*$"
version-control: never
End:

Return to:

Send suggestions and report system problems to the System administrator.