aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-04 20:10:36 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-04 21:41:39 +0300
commita60eb4b18345626a84e23784d77ca231812e1dff (patch)
tree80192afeadd44b073958c2762491cc7dfea778a1
parentb65bfa7564f564f85d3c595c6c1030af2acf5056 (diff)
downloadgrecs-a60eb4b18345626a84e23784d77ca231812e1dff.tar.gz
grecs-a60eb4b18345626a84e23784d77ca231812e1dff.tar.bz2
Improve docs. Add an option to create installable distribution.
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am2
-rw-r--r--am/grecs.m421
-rw-r--r--doc/GRECS_SETUP.3131
-rw-r--r--doc/Makefile.am33
-rw-r--r--doc/grecs-syntax.texi10
-rw-r--r--doc/grecs_asprintf.390
-rw-r--r--doc/grecs_config.5343
-rw-r--r--doc/grecs_error.3132
-rw-r--r--doc/grecs_format_locus.368
-rw-r--r--doc/grecs_format_node.3102
-rw-r--r--doc/grecs_format_node_path.371
-rw-r--r--doc/grecs_format_value.366
-rw-r--r--doc/grecs_include_path_setup.368
-rw-r--r--doc/grecs_malloc.3129
-rw-r--r--doc/grecs_node_free.363
-rw-r--r--doc/grecs_parse.3185
-rw-r--r--doc/grecs_stmt_path.5123
-rw-r--r--doc/grecs_strdup.370
-rw-r--r--doc/grecs_tree_free.361
-rw-r--r--doc/tmpl.354
-rw-r--r--src/.gitignore2
-rw-r--r--src/Make-inst.am19
-rw-r--r--src/Make-noinst.am18
-rw-r--r--src/Make.am42
-rw-r--r--tests/Makefile.am2
26 files changed, 1900 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 4e0f5dd..b4b4597 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
1*.a 1*.a
2*.la
3*.lo
2*.o 4*.o
3*.tar.* 5*.tar.*
4*~ 6*~
@@ -6,6 +8,7 @@
6.emacs.desktop 8.emacs.desktop
7.emacs.desktop.lock 9.emacs.desktop.lock
8.emacsrc 10.emacsrc
11.libs
9ABOUT-NLS 12ABOUT-NLS
10ChangeLog 13ChangeLog
11INSTALL 14INSTALL
diff --git a/Makefile.am b/Makefile.am
index 96bfab7..643d06a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,2 @@
1SUBDIRS=src @GRECS_TESTDIR@ 1SUBDIRS=src @GRECS_TESTDIR@ @GRECS_DOCDIR@
2EXTRA_DIST=@GRECS_BUILD_AUX@ 2EXTRA_DIST=@GRECS_BUILD_AUX@
diff --git a/am/grecs.m4 b/am/grecs.m4
index 8de0d08..764ce46 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -72,6 +72,8 @@ AC_DEFUN([GRECS_SETUP],[
72 AC_PROG_YACC 72 AC_PROG_YACC
73 AM_PROG_LEX 73 AM_PROG_LEX
74 74
75 AC_HEADER_SYS_WAIT
76
75 AC_SUBST([GRECS_SUBDIR],m4_if([$1],,grecs,$1)) 77 AC_SUBST([GRECS_SUBDIR],m4_if([$1],,grecs,$1))
76 _GRECS_SET_OPTIONS([$2]) 78 _GRECS_SET_OPTIONS([$2])
77 # ********************** 79 # **********************
@@ -139,9 +141,26 @@ AC_DEFUN([GRECS_SETUP],[
139 AM_MISSING_PROG([AUTOM4TE], [autom4te]) 141 AM_MISSING_PROG([AUTOM4TE], [autom4te])
140 GRECS_TESTDIR=tests 142 GRECS_TESTDIR=tests
141 ]) 143 ])
142 _GRECS_IF_OPTION_SET([getopt],[GRECS_BUILD_AUX="build-aux/getopt.m4"]) 144 _GRECS_IF_OPTION_SET([getopt],[
145 AC_CHECK_HEADERS([getopt.h])
146 AC_CHECK_FUNCS([sysconf getdtablesize getopt_long])
147 GRECS_BUILD_AUX="build-aux/getopt.m4"
148 ])
143 _GRECS_IF_OPTION_SET([git2chg],[GRECS_BUILD_AUX="$GRECS_BUILD_AUX build-aux/git2chg.awk"]) 149 _GRECS_IF_OPTION_SET([git2chg],[GRECS_BUILD_AUX="$GRECS_BUILD_AUX build-aux/git2chg.awk"])
144 AC_SUBST([GRECS_BUILD_AUX]) 150 AC_SUBST([GRECS_BUILD_AUX])
145 AC_SUBST([GRECS_INCLUDES]) 151 AC_SUBST([GRECS_INCLUDES])
146 AC_SUBST([GRECS_TESTDIR]) 152 AC_SUBST([GRECS_TESTDIR])
153 AC_SUBST([GRECS_LDADD])
154 AC_SUBST([GRECS_DOCDIR])
155 _GRECS_IF_OPTION_SET([install],[
156 LT_INIT
157 GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
158 GRECS_DOCDIR='doc'
159 AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-inst.in
160 m4_if([$1],,grecs,$1)/doc/Makefile)
161 ],[
162 GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.a'
163 AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-noinst.in)
164 ])
165 AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/Makefile)
147]) 166])
diff --git a/doc/GRECS_SETUP.3 b/doc/GRECS_SETUP.3
new file mode 100644
index 0000000..23c0ad5
--- /dev/null
+++ b/doc/GRECS_SETUP.3
@@ -0,0 +1,131 @@
1.\" This file is part of grecs -*- nroff -*-
2.\" Copyright (C) 2007, 2009-2011 Sergey Poznyakoff
3.\"
4.\" Grecs is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by
6.\" the Free Software Foundation; either version 3, or (at your option)
7.\" 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
15.\" along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16.\" This file is part of SLB.
17.\" Copyright (C) 2011 Sergey Poznyakoff
18.\"
19.TH GRECS_SETUP 3 "May 4, 2011" "GRECS" "Grecs User Reference"
20.SH NAME
21GRECS_SETUP \- Initialize \fBgrecs\fR submodule.
22.SH SYNOPSIS
23.BI "GRECS_SETUP(" "dir" ", " "options" ", " "pp-setup-file" )
24.SH DESCRIPTION
25The \fBGRECS_SETUP\fR macro is invoked from the host project's
26\fBconfigure.ac\fR. It initializes the \fBgrecs\fR submodule
27variables for compilation within that project.
28.PP
29All arguments are optional.
30.PP
31The
32.I dir
33argument specifies the directory, relative to the source tree top,
34where \fBgrecs\fR has been cloned. If omitted, \fBgrecs\fR is assumed.
35.sp
36For example, if \fBgrecs\fR was cloned using the following command:
37.sp
38.nf
39 git clone ssh://git.gnu.org.ua/gitroot/grecs.git lib/grecs
40.fi
41.sp
42then the \fIdir\fR argument must be \fBlib/grecs\fR.
43.PP
44The
45.I options
46argument is a space-separated list of options. The following options
47are understood:
48.TP
49.B no-preproc
50Disable the use of preprocessor.
51.TP
52.B install
53Create and install shared library \fBlibgrecs.so\fR. Install the
54documentation as well.
55.TP
56.B std-pp-setup
57Install the standard \fBpp-setup\fR file.
58.TP
59.B pp-setup-option
60Add the
61.B --with-pp-setup-file
62option to the produced configuration file. This option allows user to
63control whether to install the \fBpp-setup\fR file.
64.TP
65.B tests
66Build tests.
67.TP
68.B getopt
69Add \fBgetopt.m4\fR to the distributed tarball. The file is located
70in \fIdir\fR/build-aux.
71.TP
72.B git2chg
73Add \fBgit2chg.awk\fR to the distributed tarball. The file is located
74in \fIdir\fR/build-aux.
75.PP
76The
77.I pp-setup-file
78argument supplies the pathname of the alternative preprocessor
79setup file. It is ignored if
80.B std-pp-setup option
81is given.
82.PP
83If neither
84.B std-pp-setup
85option, nor
86.I pp-setup-file
87parameter are supplied, no preprocessor setup file is installed.
88.SH EXAMPLE
89.SS "Default setup"
90.RS 4
91.nf
92GRECS_SETUP
93.fi
94.RE
95.SS "Complex setup"
96The library sources are in \fBlib/grecs\fR. Configure the testsuite
97and add the \fBgetopt.m4\fR file to the distribution. Install
98preprocessor setup file from \fBsrc/pp-setup\fR:
99.sp
100.RS 4
101.nf
102GRECS_SETUP(lib/grecs, [tests getopt], [$(top_srcdir)/src/pp-setup])
103.RE
104.SH "SEE ALSO"
105.BR getopt.m4 (5),
106.BR pp-setup (5).
107.SH AUTHORS
108Sergey Poznyakoff
109.SH "BUG REPORTS"
110Report bugs to <gray+grecs@gnu.org.ua>.
111.SH COLOPHON
112The \fBGrecs\fR library is constantly changing, so this manual page
113may be incorrect or out-of-date. For the latest copy of \fBGrecs\fR
114documentation, visit <http://www.gnu.org.ua/software/grecs>.
115.SH COPYRIGHT
116Copyright \(co 2011 Sergey Poznyakoff
117.br
118.na
119License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
120.br
121.ad
122This is free software: you are free to change and redistribute it.
123There is NO WARRANTY, to the extent permitted by law.
124.\" Local variables:
125.\" eval: (add-hook 'write-file-hooks 'time-stamp)
126.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_]* [0-9] \""
127.\" time-stamp-format: "%:B %:d, %:y"
128.\" time-stamp-end: "\""
129.\" time-stamp-line-limit: 20
130.\" end: