Upgrade to new build system
This commit is contained in:
parent
8c470e4039
commit
076e58ccd7
12 changed files with 165 additions and 67 deletions
|
|
@ -1 +1 @@
|
|||
doxygen docs docs
|
||||
docs doxygen docs
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
c lib libCStreamedXML StreamedXML.h
|
||||
lib c libCStreamedXML StreamedXML.h
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ build_target libCStreamedXML
|
|||
|
||||
# make paths (this is for Gentoo in particular)
|
||||
build_dir_tree "${LIBDIR}" || return 1
|
||||
build_dir_tree "${PKGCONFDIR}" || return 1
|
||||
build_dir_tree "${BINDIR}" || return 1
|
||||
build_dir_tree "${INCLUDEDIR}" || return 1
|
||||
|
||||
# install library
|
||||
|
|
@ -20,16 +20,20 @@ install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
|
|||
echo "Installing header file '${libCStreamedXML_HEADER}' into ${INCLUDEDIR}"
|
||||
install_header ${libCStreamedXML_HEADER} ${INCLUDEDIR} 0644 || return 1
|
||||
|
||||
# install pkgconfig file
|
||||
echo "Installing package config file into ${PKGCONFDIR}"
|
||||
PKGCONFFILE=${PKGCONFDIR}/libCStreamedXML.pc
|
||||
do_cmd rm -f ${PKGCONFFILE}
|
||||
do_cmd_redir ${PKGCONFFILE} sed \
|
||||
# install config script
|
||||
echo "Installing config script into ${BINDIR}"
|
||||
CONFFILE="${BINDIR}/libCStreamedXML-config"
|
||||
|
||||
do_cmd rm -f "${CONFFILE}"
|
||||
do_cmd_redir "${CONFFILE}" sed \
|
||||
-e "s,@VERSION@,${VERSION}," \
|
||||
-e "s,@LIBDIR@,${FINALLIBDIR}," \
|
||||
-e "s,@INCLUDEDIR@,${FINALINCLUDEDIR}," \
|
||||
src/libCStreamedXML/pkgconf.in
|
||||
do_cmd chmod 0644 ${PKGCONFFILE}
|
||||
-e "s,@DEP_CFLAGS@,${libCStreamedXML_DEP_CFLAGS}," \
|
||||
-e "s,@DEP_LIBS@,${libCStreamedXML_DEP_LIBS}," \
|
||||
-e "s,@LIB_DIR@,${FINALLIBDIR}," \
|
||||
-e "s,@INCLUDE_DIR@,${FINALINCLUDEDIR}," \
|
||||
src/libCStreamedXML/config-script
|
||||
|
||||
do_cmd chmod 0755 "${CONFFILE}"
|
||||
print_success "Done"
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
# libCStreamedXML_BUILT
|
||||
# libCStreamedXML_HEADER
|
||||
# libCStreamedXML_BASE
|
||||
# libCStreamedXML_DEP_CFLAGS
|
||||
# libCStreamedXML_DEP_LIBS
|
||||
|
||||
if [ -z ${libCStreamedXML_BUILT} ]
|
||||
then
|
||||
|
|
@ -10,7 +12,9 @@ then
|
|||
source src/libCStreamedXML/soversion
|
||||
|
||||
libCStreamedXML="obj/${libCStreamedXML_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}"
|
||||
SO_EXTRA="-lc"
|
||||
libCStreamedXML_DEP_CFLAGS=""
|
||||
libCStreamedXML_DEP_LIBS=""
|
||||
SO_EXTRA="${libCStreamedXML_DEP_CFLAGS} ${libCStreamedXML_DEP_LIBS} -lc"
|
||||
|
||||
echo "Building library ${libCStreamedXML}..."
|
||||
|
||||
|
|
|
|||
98
src/libCStreamedXML/config-script
Normal file
98
src/libCStreamedXML/config-script
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# libCStreamedXML/src/libCStreamedXML/config-script
|
||||
#
|
||||
# libCStreamedXML-config template. Variables are finalised at install time.
|
||||
#
|
||||
dep_cflags="@DEP_CFLAGS@"
|
||||
dep_libs="@DEP_LIBS@"
|
||||
include_dir="@INCLUDE_DIR@"
|
||||
include_dir_set="no"
|
||||
lib_dir="@LIB_DIR@"
|
||||
lib_dir_set="no"
|
||||
|
||||
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: libCStreamedXML-config [options]
|
||||
Options:
|
||||
[--version]
|
||||
[--libs]
|
||||
[--libdir[=DIR]]
|
||||
[--cflags]
|
||||
[--includedir[=DIR]]
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
||||
|
||||
[ $# -eq 0 ] && usage 1 1>&2
|
||||
|
||||
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-*=*)
|
||||
optarg="$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//')"
|
||||
;;
|
||||
|
||||
*)
|
||||
optarg=""
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
--libdir=*)
|
||||
lib_dir="${optarg}"
|
||||
lib_dir_set="yes"
|
||||
;;
|
||||
|
||||
--libdir)
|
||||
echo_lib_dir="yes"
|
||||
;;
|
||||
|
||||
--includedir=*)
|
||||
include_dir="${optarg}"
|
||||
include_dir_set="yes"
|
||||
;;
|
||||
|
||||
--includedir)
|
||||
echo_include_dir="yes"
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo "@VERSION@"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
[ "${include_dir}" != "/usr/include" ] && includes="-I${include_dir}"
|
||||
echo_cflags="yes"
|
||||
;;
|
||||
|
||||
--libs)
|
||||
echo_libs="yes"
|
||||
;;
|
||||
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
[ "${echo_prefix}" == "yes" ] && echo "${prefix}"
|
||||
[ "${echo_exec_prefix}" == "yes" ] && echo "${exec_prefix}"
|
||||
[ "${echo_cflags}" == "yes" ] && echo "${dep_cflags} ${includes}"
|
||||
[ "${echo_libs}" == "yes" ] && echo "${dep_libs} -L${lib_dir} -lCStreamedXML"
|
||||
true
|
||||
|
||||
|
||||
|
||||
# vim: expandtab:ts=4:sw=4
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# libCStreamedXML/src/lib/libCStreamedXML/pkgconf.in
|
||||
#
|
||||
# Metadata file for pkg-config
|
||||
# ( http://www.freedesktop.org/software/pkgconfig/ )
|
||||
#
|
||||
# (c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
||||
# Released under the GNU GPLv2. See file COPYING or
|
||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||
#
|
||||
|
||||
# Name, description
|
||||
Name: libCStreamedXML
|
||||
Description: C library for parsing Streamed XML
|
||||
Version: @VERSION@
|
||||
|
||||
# Requirements
|
||||
Requires:
|
||||
|
||||
# Compilation information
|
||||
Libs: -L@LIBDIR@ -lCStreamedXML
|
||||
Cflags: -I@INCLUDEDIR@
|
||||
|
|
@ -1 +1 @@
|
|||
c tests tests libCStreamedXML
|
||||
tests c tests libCStreamedXML
|
||||
|
|
|
|||
|
|
@ -8,11 +8,14 @@
|
|||
#include "StreamedXML.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if(argc == 2 && !strcmp(argv[1], "--print-summary")) {
|
||||
printf("One line summary.\n");
|
||||
return 0;
|
||||
|
|
@ -22,8 +25,6 @@ int main(int argc, char* argv[])
|
|||
// empty argument list
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
|
||||
// TODO
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue