|
|
|
@ -19,6 +19,7 @@ PROJECT_PATH=$(pwd) |
|
|
|
|
DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/} |
|
|
|
|
configure=0 |
|
|
|
|
build=0 |
|
|
|
|
docker=0 |
|
|
|
|
buildtarget="distcheck" |
|
|
|
|
overwrite=0 |
|
|
|
|
rebuild=0 |
|
|
|
@ -26,6 +27,7 @@ rebuildfiles=() |
|
|
|
|
while test $# -gt 0; do |
|
|
|
|
case "$1" in |
|
|
|
|
(--configure|-c) configure=1;; |
|
|
|
|
(--docker|-d) docker=1;; |
|
|
|
|
(--build|-b) configure=1; build=1;; |
|
|
|
|
(--target|-t) shift; configure=1; build=1; buildtarget="$1";; |
|
|
|
|
(--overwrite|-o) overwrite=1;; |
|
|
|
@ -42,6 +44,7 @@ SYNOPSIS |
|
|
|
|
OPTIONS |
|
|
|
|
|
|
|
|
|
--configure, -c call ./configure after initialization |
|
|
|
|
--docker, -d build and run tests in a docker instance |
|
|
|
|
--build, -b build, also call ./configure && make distcheck |
|
|
|
|
--target, -t <target> same as -b, but specify target instead of distcheck |
|
|
|
|
--overwrite, -o overwrite all basic files (bootstrap.sh, m4-macros) |
|
|
|
@ -105,6 +108,7 @@ GENERATED FILES |
|
|
|
|
* ax_check_qt.m4 - auxiliary macro definition file |
|
|
|
|
* resolve-debbuilddeps.sh - script to install debian package dependencies |
|
|
|
|
* resolve-rpmbuilddeps.sh - script to install RPM package dependencies |
|
|
|
|
* build-in-docker.sh - script to build the project encapsulated in a docker container |
|
|
|
|
* build-resource-file.sh - build resource.qrc file from a resource directory |
|
|
|
|
* mac-create-app-bundle.sh - script to create apple mac os-x app-bundle |
|
|
|
|
* AUTHORS - replace your name in AUTHORS before first run |
|
|
|
@ -119,7 +123,7 @@ GENERATED FILES |
|
|
|
|
* scripts/makefile.in - if you enabled AX_USE_SCRIPTS |
|
|
|
|
* doc/makefile.am - if you enabled AX_USE_DOXYGEN |
|
|
|
|
* doc/doxyfile.in - if you enabled AX_USE_DOXYGEN |
|
|
|
|
* test/makefile.am - if you enabled AX_BUILD_TEST |
|
|
|
|
* test/makefile.am - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT |
|
|
|
|
* examples/makefile.am - if you enabled AX_BUILD_EXAMPLES |
|
|
|
|
* debian/changelog.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
|
|
* debian/control.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
|
@ -170,14 +174,14 @@ FILE DEPENDENCIES |
|
|
|
|
* test/makefile.am depends on AX_USE_LIBTOOL |
|
|
|
|
* html/makefile.am depends on AX_BUILD_HTML |
|
|
|
|
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES |
|
|
|
|
* debian/control.in depends on AX_USE_DOXYGEN, AX_BUILD_TEST, |
|
|
|
|
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT |
|
|
|
|
AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL |
|
|
|
|
* debian/${DEFAULT_PROJECT_NAME}.install depends on AX_USE_LIBTOOL |
|
|
|
|
* debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL |
|
|
|
|
* debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL |
|
|
|
|
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs depends on AX_USE_LIBTOOL |
|
|
|
|
* ${DEFAULT_PROJECT_NAME}.spec.in depends on AX_USE_RPM_PACKAGING, |
|
|
|
|
AX_USE_LIBTOOL, AX_CHECK_QT, AX_REQUIRE_QT, AX_CXX_QT, AX_BUILD_TEST |
|
|
|
|
AX_USE_LIBTOOL, AX_CHECK_QT, AX_REQUIRE_QT, AX_CXX_QT, AX_USE_CPPUNIT |
|
|
|
|
|
|
|
|
|
FILES |
|
|
|
|
|
|
|
|
@ -206,7 +210,7 @@ FILES |
|
|
|
|
* Enable Doxygen documentation generation: AX_USE_DOXYGEN |
|
|
|
|
* Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING |
|
|
|
|
* Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING |
|
|
|
|
* Enable C++ testing using CppUnit: AX_BUILD_TEST plus AX_USE_CXX |
|
|
|
|
* Enable C++ testing using CppUnit: AX_USE_CPPUNIT |
|
|
|
|
* Enable other tests: AX_BUILD_TEST |
|
|
|
|
* Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES |
|
|
|
|
* Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4) |
|
|
|
@ -405,6 +409,7 @@ copy ax_cxx_compile_stdcxx_11.m4 |
|
|
|
|
copy ax_check_qt.m4 |
|
|
|
|
copy resolve-debbuilddeps.sh |
|
|
|
|
copy resolve-rpmbuilddeps.sh |
|
|
|
|
copy build-in-docker.sh |
|
|
|
|
copy build-resource-file.sh |
|
|
|
|
copy mac-create-app-bundle.sh |
|
|
|
|
AUTHOR=$(gpg -K | sed -n 's,uid *,,p' | sort | head -1) |
|
|
|
@ -439,6 +444,7 @@ AX_INIT_STANDARD_PROJECT |
|
|
|
|
#AX_USE_DOXYGEN |
|
|
|
|
#AX_USE_DEBIAN_PACKAGING |
|
|
|
|
#AX_USE_RPM_PACKAGING |
|
|
|
|
#AX_USE_CPPUNIT |
|
|
|
|
#AX_BUILD_TEST |
|
|
|
|
#AX_BUILD_EXAMPLES |
|
|
|
|
#AX_BUILD_HTML |
|
|
|
@ -696,7 +702,7 @@ namespace NAMESPACE { |
|
|
|
|
EOF |
|
|
|
|
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_SCRIPTS scripts/makefile.am |
|
|
|
|
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am |
|
|
|
|
to --condition AX_BUILD_TEST test/makefile.am <<EOF |
|
|
|
|
to --condition 'AX_BUILD_TEST|AX_USE_CPPUNIT' test/makefile.am <<EOF |
|
|
|
|
${HEADER}$(if testtag AX_USE_CXX; then |
|
|
|
|
cat <<EOF2 |
|
|
|
|
AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src |
|
|
|
@ -772,7 +778,7 @@ if testtag AX_USE_DOXYGEN; then |
|
|
|
|
if testtag AX_BUILD_HTML; then |
|
|
|
|
doxyadd INPUT "@top_srcdir@/html" |
|
|
|
|
fi |
|
|
|
|
if testtag AX_BUILD_TEST; then |
|
|
|
|
if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then |
|
|
|
|
doxyadd INPUT "@top_srcdir@/test" |
|
|
|
|
fi |
|
|
|
|
doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt' |
|
|
|
@ -813,7 +819,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then |
|
|
|
|
|
|
|
|
|
-- @AUTHOR@ @BUILD_DATE@ |
|
|
|
|
EOF |
|
|
|
|
BUILD_DEPENDS="debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_BUILD_TEST && testtag AX_USE_CXX; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" |
|
|
|
|
BUILD_DEPENDS="debhelper, subversion, svn2cl, pkg-config, automake, libtool, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" |
|
|
|
|
to debian/control.in <<EOF |
|
|
|
|
Source: @PACKAGE_NAME@ |
|
|
|
|
Priority: extra |
|
|
|
@ -882,7 +888,7 @@ $(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: graphviz"; fi) |
|
|
|
|
%endif |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} |
|
|
|
|
BuildRequires: pkgconfig, redhat-lsb$( |
|
|
|
|
if testtag AX_BUILD_TEST && testtag AX_USE_CXX; then |
|
|
|
|
if testtag AX_USE_CPPUNIT; then |
|
|
|
|
echo -n ", cppunit-devel"; |
|
|
|
|
fi) |
|
|
|
|
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} ) |
|
|
|
@ -893,7 +899,7 @@ $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n "B |
|
|
|
|
%endif |
|
|
|
|
%else%if 0%{?suse_version} || 0%{?sles_version} |
|
|
|
|
BuildRequires: pkg-config, lsb-release$( |
|
|
|
|
if testtag AX_BUILD_TEST && testtag AX_USE_CXX; then |
|
|
|
|
if testtag AX_USE_CPPUNIT; then |
|
|
|
|
echo -n ", libcppunit-devel"; |
|
|
|
|
fi) |
|
|
|
|
%if 0%{?suse_version} < 1200 || 0%{?sles_version} < 1200 |
|
|
|
@ -1023,3 +1029,8 @@ fi |
|
|
|
|
if test "$build" -eq 1; then |
|
|
|
|
make $buildtarget |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
#### Build In Docker If User Requires #### |
|
|
|
|
if test "$docker" -eq 1; then |
|
|
|
|
./build-in-docker.sh |
|
|
|
|
fi |
|
|
|
|