mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-09-01 12:56:32 +00:00
[lib] include json-glib in source tree
This commit is contained in:
11
json-glib/build/Makefile.am
Normal file
11
json-glib/build/Makefile.am
Normal file
@@ -0,0 +1,11 @@
|
||||
SUBDIRS = autotools
|
||||
|
||||
test-report:
|
||||
@true
|
||||
|
||||
test:
|
||||
@true
|
||||
|
||||
check-local: test
|
||||
|
||||
.PHONY: test-report test check-local
|
21
json-glib/build/autotools/Makefile.am
Normal file
21
json-glib/build/autotools/Makefile.am
Normal file
@@ -0,0 +1,21 @@
|
||||
EXTRA_DIST = \
|
||||
as-compiler-flag.m4 \
|
||||
as-linguas.m4 \
|
||||
introspection.m4 \
|
||||
Makefile.am.silent \
|
||||
Makefile.am.enums \
|
||||
Makefile.am.marshal \
|
||||
Makefile.am.gtest \
|
||||
Makefile.am.gcov \
|
||||
Makefile.am.gitignore
|
||||
|
||||
# needed to avoid including Makefile.am.gtest
|
||||
test-report:
|
||||
@true
|
||||
|
||||
test:
|
||||
@true
|
||||
|
||||
check-local: test
|
||||
|
||||
.PHONY: test test-report check-local
|
43
json-glib/build/autotools/Makefile.am.enums
Normal file
43
json-glib/build/autotools/Makefile.am.enums
Normal file
@@ -0,0 +1,43 @@
|
||||
# Rules for generating enumeration types using glib-mkenums
|
||||
#
|
||||
# Define:
|
||||
# glib_enum_h = header template file
|
||||
# glib_enum_c = source template file
|
||||
# glib_enum_headers = list of headers to parse
|
||||
#
|
||||
# before including Makefile.am.enums. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
enum_tmpl_h=$(glib_enum_h:.h=.h.in)
|
||||
enum_tmpl_c=$(glib_enum_c:.c=.c.in)
|
||||
|
||||
CLEANFILES += stamp-enum-types
|
||||
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
|
||||
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
|
||||
EXTRA_DIST += $(srcdir)/$(enum_tmpl_h) $(srcdir)/$(enum_tmpl_c)
|
||||
|
||||
stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h)
|
||||
$(QUIET_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/$(enum_tmpl_h) \
|
||||
$(glib_enum_headers) > xgen-eh \
|
||||
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
|
||||
&& rm -f xgen-eh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(glib_enum_h): stamp-enum-types
|
||||
@true
|
||||
|
||||
$(glib_enum_c): $(glib_enum_h) $(srcdir)/$(enum_tmpl_c)
|
||||
$(QUIET_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/$(enum_tmpl_c) \
|
||||
$(glib_enum_headers) > xgen-ec \
|
||||
&& cp -f xgen-ec $(glib_enum_c) \
|
||||
&& rm -f xgen-ec
|
||||
|
24
json-glib/build/autotools/Makefile.am.gitignore
Normal file
24
json-glib/build/autotools/Makefile.am.gitignore
Normal file
@@ -0,0 +1,24 @@
|
||||
# this file should only be used in directories that generate test
|
||||
# or example binaries through noinst_PROGRAMS; it is *not* a full
|
||||
# generator of Git ignore files, and it's not meant to be used as
|
||||
# the top-level Git ignore file generator.
|
||||
|
||||
$(srcdir)/.gitignore: Makefile.am
|
||||
$(QUIET_GEN)( \
|
||||
echo "*.o" ; \
|
||||
echo ".gitignore" ; \
|
||||
) > $(srcdir)/.gitignore ; \
|
||||
for p in $(noinst_PROGRAMS); do \
|
||||
echo "/$$p" >> $(srcdir)/.gitignore ; \
|
||||
done
|
||||
|
||||
gitignore: $(srcdir)/.gitignore
|
||||
|
||||
gitignore-clean:
|
||||
$(QUIET_RM)rm -f $(srcdir)/.gitignore
|
||||
|
||||
.PHONY: gitignore gitignore-clean
|
||||
|
||||
all: gitignore
|
||||
|
||||
maintainer-clean: gitignore-clean
|
66
json-glib/build/autotools/Makefile.am.gtest
Normal file
66
json-glib/build/autotools/Makefile.am.gtest
Normal file
@@ -0,0 +1,66 @@
|
||||
# JSON-GLib - JSON reader and writer library
|
||||
|
||||
GTESTER = gtester
|
||||
GTESTER_REPORT = gtester-report
|
||||
|
||||
# initialize variables for unconditional += appending
|
||||
EXTRA_DIST =
|
||||
TEST_PROGS =
|
||||
|
||||
### testing rules
|
||||
|
||||
# test: run all tests in cwd and subdirs
|
||||
test: test-nonrecursive
|
||||
@for subdir in $(SUBDIRS) . ; do \
|
||||
test "$$subdir" = "." -o "$$subdir" = "po" || \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||
done
|
||||
|
||||
# test-nonrecursive: run tests only in cwd
|
||||
test-nonrecursive: ${TEST_PROGS}
|
||||
@test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
|
||||
|
||||
# test-report: run tests in subdirs and generate report
|
||||
# perf-report: run tests in subdirs with -m perf and generate report
|
||||
# full-report: like test-report: with -m perf and -m slow
|
||||
test-report perf-report full-report: ${TEST_PROGS}
|
||||
@test -z "${TEST_PROGS}" || { \
|
||||
case $@ in \
|
||||
test-report) test_options="-k";; \
|
||||
perf-report) test_options="-k -m=perf";; \
|
||||
full-report) test_options="-k -m=perf -m=slow";; \
|
||||
esac ; \
|
||||
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||
${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
|
||||
elif test -n "${TEST_PROGS}" ; then \
|
||||
${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
|
||||
fi ; \
|
||||
}
|
||||
@ ignore_logdir=true ; \
|
||||
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
|
||||
ignore_logdir=false ; \
|
||||
fi ; \
|
||||
for subdir in $(SUBDIRS) . ; do \
|
||||
test "$$subdir" = "." -o "$$subdir" = "po" || \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||
done ; \
|
||||
$$ignore_logdir || { \
|
||||
echo '<?xml version="1.0"?>' > $@.xml ; \
|
||||
echo '<report-collection>' >> $@.xml ; \
|
||||
echo '<info>' >> $@.xml ; \
|
||||
echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
|
||||
echo ' <version>$(VERSION)</version>' >> $@.xml ; \
|
||||
echo '</info>' >> $@.xml ; \
|
||||
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
|
||||
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
|
||||
done ; \
|
||||
echo >> $@.xml ; \
|
||||
echo '</report-collection>' >> $@.xml ; \
|
||||
rm -rf "$$GTESTER_LOGDIR"/ ; \
|
||||
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||
}
|
||||
.PHONY: test test-report perf-report full-report test-nonrecursive
|
||||
|
||||
# run tests in cwd as part of make check
|
||||
check-local: test-nonrecursive
|
45
json-glib/build/autotools/Makefile.am.marshal
Normal file
45
json-glib/build/autotools/Makefile.am.marshal
Normal file
@@ -0,0 +1,45 @@
|
||||
# Rules for generating marshal files using glib-genmarshal
|
||||
#
|
||||
# Define:
|
||||
# glib_marshal_list = marshal list file
|
||||
# glib_marshal_prefix = prefix for marshal functions
|
||||
#
|
||||
# before including Makefile.am.marshal. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
marshal_h = $(glib_marshal_list:.list=.h)
|
||||
marshal_c = $(glib_marshal_list:.list=.c)
|
||||
|
||||
CLEANFILES += stamp-marshal
|
||||
DISTCLEANFILES += $(marshal_h) $(marshal_c)
|
||||
BUILT_SOURCES += $(marshal_h) $(marshal_c)
|
||||
EXTRA_DIST += $(srcdir)/$(glib_marshal_list)
|
||||
|
||||
stamp-marshal: $(glib_marshal_list)
|
||||
$(QUIET_GEN)$(GLIB_GENMARSHAL) \
|
||||
--prefix=$(glib_marshal_prefix) \
|
||||
--header \
|
||||
$(srcdir)/$(glib_marshal_list) > xgen-mh \
|
||||
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
|
||||
&& rm -f xgen-mh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(marshal_h): stamp-marshal
|
||||
@true
|
||||
|
||||
$(marshal_c): $(marshal_h)
|
||||
$(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=$(glib_marshal_prefix) \
|
||||
--body \
|
||||
$(srcdir)/$(glib_marshal_list)) > xgen-mc \
|
||||
&& cp xgen-mc $(marshal_c) \
|
||||
&& rm -f xgen-mc
|
||||
|
11
json-glib/build/autotools/Makefile.am.silent
Normal file
11
json-glib/build/autotools/Makefile.am.silent
Normal file
@@ -0,0 +1,11 @@
|
||||
# custom rules for quiet builds
|
||||
|
||||
QUIET_GEN = $(AM_V_GEN)
|
||||
|
||||
QUIET_LN = $(QUIET_LN_$(V))
|
||||
QUIET_LN_ = $(QUIET_LN_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_LN_0 = @echo ' LN '$@;
|
||||
|
||||
QUIET_RM = $(QUIET_RM_$(V))
|
||||
QUIET_RM_ = $(QUIET_RM_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_RM_0 = @echo ' RM '$@;
|
62
json-glib/build/autotools/as-compiler-flag.m4
Normal file
62
json-glib/build/autotools/as-compiler-flag.m4
Normal file
@@ -0,0 +1,62 @@
|
||||
dnl as-compiler-flag.m4 0.1.0
|
||||
|
||||
dnl autostars m4 macro for detection of compiler flags
|
||||
|
||||
dnl David Schleef <ds@schleef.org>
|
||||
|
||||
dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $
|
||||
|
||||
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
|
||||
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([to see if compiler understands $1])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
m4_ifvaln([$2],[$2])
|
||||
true
|
||||
else
|
||||
m4_ifvaln([$3],[$3])
|
||||
true
|
||||
fi
|
||||
AC_MSG_RESULT([$flag_ok])
|
||||
])
|
||||
|
||||
dnl AS_COMPILER_FLAGS(VAR, FLAGS)
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAGS],
|
||||
[
|
||||
list=$2
|
||||
flags_supported=""
|
||||
flags_unsupported=""
|
||||
AC_MSG_CHECKING([for supported compiler flags])
|
||||
for each in $list
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $each"
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
flags_supported="$flags_supported $each"
|
||||
else
|
||||
flags_unsupported="$flags_unsupported $each"
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$flags_supported])
|
||||
if test "X$flags_unsupported" != X ; then
|
||||
AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
|
||||
fi
|
||||
$1="$$1 $flags_supported"
|
||||
])
|
||||
|
24
json-glib/build/autotools/as-linguas.m4
Normal file
24
json-glib/build/autotools/as-linguas.m4
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
|
||||
# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
|
||||
# subset of the po files.
|
||||
|
||||
AC_DEFUN([AS_ALL_LINGUAS],
|
||||
[
|
||||
AC_MSG_CHECKING([for linguas])
|
||||
podir="m4_default([$1],[$srcdir/po])"
|
||||
linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
|
||||
if test -f "$podir/LINGUAS.ignore"; then
|
||||
ALL_LINGUAS="";
|
||||
ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
|
||||
-e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
|
||||
for lang in $linguas; do
|
||||
if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
|
||||
ALL_LINGUAS="$ALL_LINGUAS $lang";
|
||||
fi;
|
||||
done;
|
||||
else
|
||||
ALL_LINGUAS="$linguas";
|
||||
fi;
|
||||
AC_SUBST([ALL_LINGUAS])
|
||||
AC_MSG_RESULT($ALL_LINGUAS)
|
||||
])
|
Reference in New Issue
Block a user