Skip to content

Commit 090b417

Browse files
committed
Initial commit.
0 parents  commit 090b417

25 files changed

+6614
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Makefile
2+
Makefile.in
3+
aclocal.m4
4+
ar-lib
5+
autom4te.cache
6+
compile
7+
config.guess
8+
config.log
9+
config.status
10+
config.sub
11+
configure
12+
doxyfile.stamp
13+
doxygen.cfg
14+
install-sh
15+
libtool
16+
ltmain.sh
17+
m4
18+
missing
19+
.libs
20+
/doc/html
21+
/doc/man
22+
*.pc
23+
*.la
24+
depcomp
25+
.deps
26+
.dirstamp
27+
*.lo
28+
*.o
29+
/ylwrap
30+
/src/ujson/Analyzer.hpp
31+
/src/ujson/Analyzer.cpp
32+
/src/ujson/Lexer.cpp
33+
/src/Lexer.hh
34+
/src/location.hh
35+
/src/position.hh
36+
/src/stack.hh
37+
/utils/ujson-verify

COPYING

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# Copyright (C) 2017,2021 Dan Arrhenius <dan@ultramarin.se>
3+
#
4+
# This file is part of ujson.
5+
#
6+
# ujson is free software; you can redistribute it and/or modify it
7+
# under the terms of the GNU General Public License as published
8+
# by the Free Software Foundation, either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
ACLOCAL_AMFLAGS=-I m4
20+
21+
SUBDIRS = src
22+
if ENABLE_UTILS_SET
23+
SUBDIRS += utils
24+
endif
25+
26+
SUBDIRS += doc

README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
libujson - A Json library for C++ developers.
3+
4+
Includes a Json parser and classes for handling Json objects.

autogen.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
#
4+
# Boot autotools
5+
#
6+
echo "Boot autotools..."
7+
mkdir -p m4
8+
autoreconf --install

configure.ac

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
#
2+
# Copyright (C) 2017,2020,2021 Dan Arrhenius <dan@ultramarin.se>
3+
#
4+
# This file is part of ujson.
5+
#
6+
# ujson is free software; you can redistribute it and/or modify it
7+
# under the terms of the GNU General Public License as published
8+
# by the Free Software Foundation, either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
AC_INIT([libujson], [0.9.0], [dan@ultramarin.se])
20+
AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 subdir-objects])
21+
22+
AC_PROG_CC
23+
AC_PROG_CXX
24+
AC_PROG_MKDIR_P
25+
AC_PROG_INSTALL
26+
AC_PROG_YACC
27+
AM_PROG_AR
28+
AM_PROG_LEX
29+
30+
LT_INIT()
31+
LT_LANG([C++])
32+
33+
AC_CONFIG_MACRO_DIR([m4])
34+
#AC_CONFIG_HEADERS(src/include/ujson/config.h src/include/ujson/ujson_config.hpp)
35+
AM_SILENT_RULES([yes])
36+
37+
#
38+
# Release 0.9.0
39+
#
40+
# Library interface version x:y:z
41+
# | | |
42+
# | | +- AGE - how many previous versions of CURRENT this interface is compatible with.
43+
# | |
44+
# | +--- REVISION - Update this number when no interface change has been made.
45+
# |
46+
# +----- CURRENT - Update this number when an interface change has been made.
47+
#
48+
# Library version (CURRENT:REVISION:AGE)
49+
#
50+
LIBRARY_VERSION=0:0:0
51+
AC_SUBST([LIBRARY_VERSION])
52+
53+
#
54+
# Libraries to be listed in ujson.pc
55+
#
56+
LIBS_IN_PC_FILE=
57+
58+
#
59+
# Required packages to be listed in ujson.pc
60+
#
61+
REQUIRE_IN_PC_FILE=
62+
63+
#
64+
# Defines in the doxygen config file
65+
#
66+
PREDEFINED_IN_DOXYGEN=
67+
68+
69+
#
70+
# Give the user an option to not build utility applications
71+
#
72+
AC_ARG_ENABLE([utils],
73+
[AS_HELP_STRING([--disable-utils],
74+
[don't build utility applications])])
75+
AM_CONDITIONAL([ENABLE_UTILS_SET], [test "x$enable_utils" != "xno"])
76+
77+
78+
#
79+
# All libraries are added
80+
#
81+
AC_SUBST([LIBS_IN_PC_FILE])
82+
AC_SUBST([REQUIRE_IN_PC_FILE])
83+
AC_SUBST([PREDEFINED_IN_DOXYGEN])
84+
85+
86+
#
87+
# Give the user an option to build doxygen documentation
88+
#
89+
AC_ARG_ENABLE([doxygen],
90+
[AS_HELP_STRING([--enable-doxygen],
91+
[Build doxygen documentation, if possible])],,
92+
enable_doxygen=no)
93+
AM_CONDITIONAL([ENABLE_DOXYGEN_SET], [test "x$enable_doxygen" != "xno"])
94+
95+
96+
AM_COND_IF([ENABLE_DOXYGEN_SET],
97+
[
98+
#
99+
# Check for doxygen support
100+
#
101+
AC_CHECK_PROGS([DOXYGEN], [doxygen])
102+
if test -z "$DOXYGEN";
103+
then AC_MSG_WARN([doxygen not found - continuing without doxygen support])
104+
fi
105+
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
106+
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/doxygen.cfg])])
107+
108+
#
109+
# Check if doxygen can use dot
110+
#
111+
AC_CHECK_PROGS([DOT], [dot])
112+
if test -z "$DOT";
113+
then AC_MSG_WARN([dot not found - continuing without doxygen dot support])
114+
fi
115+
AM_CONDITIONAL([HAVE_DOT], [test -n "$DOT"])
116+
AM_COND_IF([HAVE_DOT], [DOXYGEN_HAVE_DOT=YES], [DOXYGEN_HAVE_DOT=NO])
117+
AM_COND_IF([HAVE_DOT], [DOXYGEN_HAVE_CLASS_GRAPH=NO], [DOXYGEN_HAVE_CLASS_GRAPH=YES])
118+
AC_SUBST([DOXYGEN_HAVE_DOT])
119+
AC_SUBST([DOXYGEN_HAVE_CLASS_GRAPH])
120+
],
121+
[
122+
AM_CONDITIONAL([HAVE_DOXYGEN], false)
123+
AM_CONDITIONAL([HAVE_DOT], false)
124+
]
125+
)
126+
127+
128+
AC_OUTPUT([
129+
Makefile
130+
src/Makefile
131+
src/ujson.pc
132+
utils/Makefile
133+
doc/Makefile
134+
])
135+
136+
AC_MSG_NOTICE([])
137+
AC_MSG_NOTICE([************************************************************])
138+
AC_MSG_NOTICE([* Installation prefix : ${prefix}])
139+
AM_COND_IF([ENABLE_UTILS_SET],
140+
[AC_MSG_NOTICE([* Utilities : enabled])],
141+
[AC_MSG_NOTICE([* Utilities : disabled])]
142+
)
143+
AM_COND_IF([HAVE_DOXYGEN],
144+
[AC_MSG_NOTICE([* Doxygen documentation: enabled])],
145+
[AC_MSG_NOTICE([* Doxygen documentation: disabled])]
146+
)
147+
AC_MSG_NOTICE([************************************************************])
148+
AC_MSG_NOTICE([])

dist-cleanall.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
if [ -f Makefile ]; then
4+
make distclean
5+
rm -f Makefile
6+
fi
7+
8+
rm -rf \
9+
Makefile.in \
10+
aclocal.m4 \
11+
autom4te.cache \
12+
config.guess \
13+
config.sub \
14+
configure \
15+
depcomp \
16+
install-sh \
17+
ltmain.sh \
18+
m4 \
19+
missing \
20+
src/Makefile.in \
21+
src/include/ujson/config.h.in \
22+
src/include/ujson/config.h.in~ \
23+
utils/Makefile.in \
24+
doc/Makefile.in \
25+
ar-lib \
26+
compile \
27+
doc/doxygen_sqlite3.db \
28+
ylwrap

doc/Makefile.am

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#
2+
# Copyright (C) 2017,2020 Dan Arrhenius <dan@ultramarin.se>
3+
#
4+
# This file is part of ujson.
5+
#
6+
# ujson is free software; you can redistribute it and/or modify it
7+
# under the terms of the GNU General Public License as published
8+
# by the Free Software Foundation, either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
20+
if HAVE_DOXYGEN
21+
22+
directory = $(srcdir)/../doc/html
23+
24+
#dist_pkgdata_DATA = $(directory)
25+
#dist_pkgdata_DATA = $(shell find $(directory) -type f)
26+
$(directory): doxyfile.stamp
27+
28+
doxyfile.stamp:
29+
$(DOXYGEN) doxygen.cfg
30+
echo Timestamp > doxyfile.stamp
31+
32+
33+
install-data-local:
34+
# Install HTML documentation
35+
$(MKDIR_P) $(DESTDIR)/$(docdir)/html/search
36+
$(INSTALL_DATA) html/*.html $(DESTDIR)/$(docdir)/html
37+
$(INSTALL_DATA) html/*.png $(DESTDIR)/$(docdir)/html
38+
if HAVE_DOT
39+
$(INSTALL_DATA) html/*.md5 $(DESTDIR)/$(docdir)/html
40+
endif
41+
$(INSTALL_DATA) html/*.css $(DESTDIR)/$(docdir)/html
42+
$(INSTALL_DATA) html/*.js $(DESTDIR)/$(docdir)/html
43+
# Install man pages
44+
$(MKDIR_P) $(DESTDIR)/$(mandir)/man3
45+
$(INSTALL_DATA) man/man3/ujson* $(DESTDIR)/$(mandir)/man3
46+
47+
48+
CLEANFILES = doxyfile.stamp
49+
50+
all-local: doxyfile.stamp
51+
clean-local:
52+
rm -rf $(top_srcdir)/doc/html
53+
rm -rf $(top_srcdir)/doc/man
54+
rm -f $(top_srcdir)/doc/doxyfile.stamp
55+
56+
uninstall-local:
57+
rm -rf $(DESTDIR)/$(docdir)/html
58+
rm -f $(DESTDIR)/$(mandir)/man3/ujson*
59+
60+
endif

0 commit comments

Comments
 (0)