|
|
|
@ -17,7 +17,6 @@ |
|
|
|
|
MY_NAME=${0##*/} |
|
|
|
|
PROJECT_PATH=$(pwd) |
|
|
|
|
DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/} |
|
|
|
|
|
|
|
|
|
configure=0 |
|
|
|
|
build=0 |
|
|
|
|
overwrite=0 |
|
|
|
@ -107,6 +106,7 @@ GENERATED FILES |
|
|
|
|
* src/makefile.am - if you enabled AX_USE_CXX |
|
|
|
|
* src/version.hxx - if you enabled AX_USE_CXX |
|
|
|
|
* src/version.cxx - if you enabled AX_USE_CXX |
|
|
|
|
* html/makefile.am - if you enabled AX_BUILD_HTML |
|
|
|
|
* 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 |
|
|
|
@ -147,6 +147,7 @@ FILES TO EDIT |
|
|
|
|
* README |
|
|
|
|
* configure.ac |
|
|
|
|
* src/makefile.am |
|
|
|
|
* html/makefile.am |
|
|
|
|
* test/makefile.am |
|
|
|
|
* examples/makefile.am |
|
|
|
|
|
|
|
|
@ -156,6 +157,7 @@ FILE DEPENDENCIES |
|
|
|
|
configuration a dependent, i.e.: |
|
|
|
|
|
|
|
|
|
* 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_USE_CPPUNIT, |
|
|
|
|
AX_CXX_QT, AX_CXX_CHECK_QT, AX_USE_LIBTOOL |
|
|
|
@ -233,6 +235,10 @@ HEADER='## @id '"\$Id\$"' |
|
|
|
|
|
|
|
|
|
' |
|
|
|
|
|
|
|
|
|
notice() { |
|
|
|
|
echo -e "\e[1;33m$*\e[0m" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
run() { |
|
|
|
|
check=1 |
|
|
|
|
while test $# -gt 0; do |
|
|
|
@ -300,7 +306,7 @@ to() { |
|
|
|
|
esac |
|
|
|
|
shift; |
|
|
|
|
done |
|
|
|
|
if checkfile "$1" && test $rebuild -eq 0 \ |
|
|
|
|
if checkfile "$1" && test $rebuild -eq 0 -o "$1" = "configure.ac" \ |
|
|
|
|
&& ! contains "$1" "${rebuildfiles[@]}"; then |
|
|
|
|
# file already exists and must not be rebuilt |
|
|
|
|
return 1 |
|
|
|
@ -367,9 +373,15 @@ copy ${MY_NAME} |
|
|
|
|
copy ax_init_standard_project.m4 |
|
|
|
|
copy ax_cxx_compile_stdcxx_11.m4 |
|
|
|
|
copy ax_check_qt.m4 |
|
|
|
|
copy AUTHORS |
|
|
|
|
AUTHOR=$(gpg -K | sed -n 's,uid *,,p' | sort | head -1) |
|
|
|
|
if test -z "${AUTHOR}"; then |
|
|
|
|
AUTHOR="FIRSTNAME LASTNAME (URL) <EMAIL>" |
|
|
|
|
fi |
|
|
|
|
to AUTHORS <<EOF && notice "please edit AUTHORS" |
|
|
|
|
$AUTHOR |
|
|
|
|
EOF |
|
|
|
|
to configure.ac <<EOF && \ |
|
|
|
|
( echo "please edit configure.ac, then rerun $0"; exit 0 ) |
|
|
|
|
( notice "please edit configure.ac, then rerun $0"; exit 0 ) |
|
|
|
|
${HEADER}m4_define(x_package_name, ${DEFAULT_PROJECT_NAME}) # project's name |
|
|
|
|
m4_define(x_major, 0) # project's major version |
|
|
|
|
m4_define(x_minor, 0) # project's minor version |
|
|
|
@ -387,10 +399,11 @@ AX_INIT_STANDARD_PROJECT |
|
|
|
|
#AX_USE_RPM_PACKAGING |
|
|
|
|
#AX_USE_CPPUNIT |
|
|
|
|
#AX_BUILD_EXAMPLES |
|
|
|
|
#AX_BUILD_HTML |
|
|
|
|
|
|
|
|
|
# qt features, uncomment, what you need: |
|
|
|
|
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) |
|
|
|
|
#AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_KEYWORDS" |
|
|
|
|
#AX_QT_NO_KEYWORDS |
|
|
|
|
|
|
|
|
|
# create output |
|
|
|
|
AC_OUTPUT |
|
|
|
@ -490,9 +503,17 @@ LDADD = -l${PACKAGE_NAME} |
|
|
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = makefile.in |
|
|
|
|
EOF |
|
|
|
|
if testtag AX_USE_DOXYGEN && \ |
|
|
|
|
( ! checkfile doc/doxyfile.in || \ |
|
|
|
|
contains doc/doxyfile.in "${rebuildfiles[@]}" ); then |
|
|
|
|
to --condition AX_BUILD_HTML html/makefile.am <<EOF |
|
|
|
|
${HEADER}EXTRA_DIST = \${www_DATA} |
|
|
|
|
|
|
|
|
|
wwwdir = \${pkgdatadir}/html |
|
|
|
|
www_DATA = |
|
|
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = makefile.in |
|
|
|
|
EOF |
|
|
|
|
if testtag AX_USE_DOXYGEN; then |
|
|
|
|
if ! checkfile doc/doxyfile.in || \ |
|
|
|
|
contains doc/doxyfile.in "${rebuildfiles[@]}"; then |
|
|
|
|
run doxygen -g doc/doxyfile.in |
|
|
|
|
if test $exists -eq 0; then |
|
|
|
|
run svn add doc/doxyfile.in |
|
|
|
@ -562,6 +583,7 @@ if testtag AX_USE_DOXYGEN && \ |
|
|
|
|
doxyreplace DOT_IMAGE_FORMAT svg |
|
|
|
|
doxyreplace INTERACTIVE_SVG YES |
|
|
|
|
doxyreplace DOT_TRANSPARENT YES |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
if testtag AX_USE_DEBIAN_PACKAGING; then |
|
|
|
|
checkdir debian |
|
|
|
@ -579,7 +601,8 @@ Maintainer: @AUTHOR@ |
|
|
|
|
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi) |
|
|
|
|
|
|
|
|
|
Package: @PACKAGE_NAME@ |
|
|
|
|
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)Architecture: any |
|
|
|
|
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi) |
|
|
|
|
Architecture: any |
|
|
|
|
Depends: \${shlibs:Depends}, \${misc:Depends} |
|
|
|
|
Description: @DESCRIPTION@ |
|
|
|
|
@README_DEB@ |
|
|
|
@ -617,7 +640,7 @@ EOF |
|
|
|
|
echo 7 | to debian/compat |
|
|
|
|
fi |
|
|
|
|
SUBDIRS="" |
|
|
|
|
for d in src test scripts doc examples; do |
|
|
|
|
for d in src test scripts doc examples html; do |
|
|
|
|
test -d $d && SUBDIRS="${SUBDIRS} $d" |
|
|
|
|
done |
|
|
|
|
to makefile.am<<EOF |
|
|
|
|