|
|
|
@ -47,22 +47,22 @@ run() { |
|
|
|
|
esac |
|
|
|
|
shift; |
|
|
|
|
done |
|
|
|
|
echo -n "-> running: $* ..." |
|
|
|
|
echo -en "\e[1m-> running:\e[0m $* ..." |
|
|
|
|
result=$($* 2>&1) |
|
|
|
|
res=$? |
|
|
|
|
if test $res -ne 0; then |
|
|
|
|
if test $check -eq 1; then |
|
|
|
|
echo " error" |
|
|
|
|
echo "*** Failed with return code: $res" |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m*** Failed with return code: $res\e[0m" |
|
|
|
|
if test -n "$result"; then |
|
|
|
|
echo "$result" |
|
|
|
|
fi |
|
|
|
|
exit 1 |
|
|
|
|
else |
|
|
|
|
echo " ignored" |
|
|
|
|
echo -e " \e[33mignored\e[0m" |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
echo " success" |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -92,18 +92,18 @@ to() { |
|
|
|
|
return |
|
|
|
|
fi |
|
|
|
|
checkdir "$(dirname ${1})" |
|
|
|
|
echo -n "-> generating $1 ..." |
|
|
|
|
echo -en "\e[1m-> generating:\e[0m $1 ..." |
|
|
|
|
result=$(cat > "$1" 2>&1) |
|
|
|
|
res=$? |
|
|
|
|
if test $res -ne 0; then |
|
|
|
|
echo " error" |
|
|
|
|
echo "*** Failed with return code: $res" |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m*** Failed with return code: $res\e[0m" |
|
|
|
|
if test -n "$result"; then |
|
|
|
|
echo "$result" |
|
|
|
|
fi |
|
|
|
|
exit 1 |
|
|
|
|
else |
|
|
|
|
echo " success" |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
fi |
|
|
|
|
run svn add "$1" |
|
|
|
|
run svn propset svn:keywords "Id" "$1" |
|
|
|
@ -118,12 +118,12 @@ copy() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doxyreplace() { |
|
|
|
|
echo -n "-> doxyfile: configure $1 ..." |
|
|
|
|
echo -en "\e[1m-> doxyfile:\e[0m configure $1 ..." |
|
|
|
|
if sed -i 's|\(^'"$1"' *=\) *|\1'" $2"'|g' doc/doxyfile.in; then |
|
|
|
|
echo " success" |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
else |
|
|
|
|
echo " error" |
|
|
|
|
echo "**** command: sed -i 's|\(^'"$1"' *=\) *|\1'" $2"'|g' doc/doxyfile.in;" |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m**** command: sed -i 's|\(^'"$1"' *=\) *|\1'" $2"'|g' doc/doxyfile.in;\e[0m" |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
@ -133,6 +133,7 @@ copy ${MY_NAME} |
|
|
|
|
copy ax_init_standard_project.m4 |
|
|
|
|
copy ax_cxx_compile_stdcxx_11.m4 |
|
|
|
|
copy ax_check_qt.m4 |
|
|
|
|
copy AUTHORS |
|
|
|
|
if ! test -f configure.ac; then |
|
|
|
|
to configure.ac <<EOF |
|
|
|
|
${HEADER}m4_define(x_package_name, ${DEFAULT_PROJECT_NAME}) # project's name |
|
|
|
@ -160,11 +161,21 @@ EOF |
|
|
|
|
fi |
|
|
|
|
PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac) |
|
|
|
|
echo "${HEADER}" | to --condition AX_USE_CXX src/makefile.am |
|
|
|
|
echo "${HEADER}" | to --condition AX_USE_CPPUNIT test/makefile.am |
|
|
|
|
echo "${HEADER}" | to --condition AX_USE_DOXYGEN doc/makefile.am |
|
|
|
|
echo "${HEADER}" | to --condition AX_BUILD_EXAMPLES examples/makefile.am |
|
|
|
|
to --condition AX_USE_CPPUNIT test/makefile.am <<EOF |
|
|
|
|
${HEADER}AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src |
|
|
|
|
AM_LDFLAGS = -L${top_builddir}/src/.libs |
|
|
|
|
LDADD = -l${PACKAGE_NAME} |
|
|
|
|
EOF |
|
|
|
|
to --condition AX_BUILD_EXAMPLES examples/makefile.am <<EOF |
|
|
|
|
${HEADER}AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src |
|
|
|
|
AM_LDFLAGS = -L${top_builddir}/src/.libs |
|
|
|
|
LDADD = -l${PACKAGE_NAME} |
|
|
|
|
EOF |
|
|
|
|
if testtag AX_USE_DOXYGEN && ! test -f doc/doxyfile.in; then |
|
|
|
|
run doxygen -g doc/doxyfile.in |
|
|
|
|
run svn add doc/doxyfile.in |
|
|
|
|
run svn propset svn:keywords "Id" doc/doxyfile.in |
|
|
|
|
doxyreplace PROJECT_NAME "@PACKAGE_NAME@" |
|
|
|
|
doxyreplace PROJECT_NUMBER "@PACKAGE_VERSION@" |
|
|
|
|
doxyreplace PROJECT_BRIEF "@DESCRIPTION@" |
|
|
|
@ -237,7 +248,7 @@ $( if testtag AX_USE_LIBTOOL; then |
|
|
|
|
Package: @PACKAGE_NAME@-dev |
|
|
|
|
Section: libdevel |
|
|
|
|
Architecture: any |
|
|
|
|
Depends: @PACKAGE_NAME@ (= ${binary:Version}) |
|
|
|
|
Depends: @PACKAGE_NAME@ (= \${binary:Version}) |
|
|
|
|
Description: @DESCRIPTION@ - Development Package |
|
|
|
|
@README_DEB@ |
|
|
|
|
EOF2 |
|
|
|
@ -250,6 +261,7 @@ EOF |
|
|
|
|
to debian/${PACKAGE_NAME}.install <<EOF |
|
|
|
|
usr/bin/* |
|
|
|
|
usr/lib/lib*.so.* |
|
|
|
|
$(if ! testtag AX_USE_LIBTOOL; then echo "usr/share/doc/${PACKAGE_NAME}/html"; fi) |
|
|
|
|
EOF |
|
|
|
|
to debian/${PACKAGE_NAME}.dirs <<EOF |
|
|
|
|
usr/lib |
|
|
|
@ -261,7 +273,7 @@ usr/lib/lib*.a |
|
|
|
|
usr/lib/lib*.so |
|
|
|
|
usr/lib/pkgconfig/* |
|
|
|
|
usr/lib/*.la |
|
|
|
|
usr/share/pkgconfig/* |
|
|
|
|
$(if testtag AX_USE_LIBTOOL; then echo "usr/share/doc/${PACKAGE_NAME}/html"; fi) |
|
|
|
|
EOF |
|
|
|
|
to debian/${PACKAGE_NAME}-dev.dirs <<EOF |
|
|
|
|
usr/lib |
|
|
|
@ -270,7 +282,7 @@ EOF |
|
|
|
|
fi |
|
|
|
|
to debian/rules <<EOF |
|
|
|
|
${HEADER}%: |
|
|
|
|
dh $@ |
|
|
|
|
dh \$@ |
|
|
|
|
EOF |
|
|
|
|
echo 7 | to debian/compat |
|
|
|
|
fi |
|
|
|
@ -284,14 +296,14 @@ fi |
|
|
|
|
to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF |
|
|
|
|
${HEADER}prefix=@prefix@ |
|
|
|
|
exec_prefix=@exec_prefix@ |
|
|
|
|
libdir=${exec_prefix}/lib |
|
|
|
|
includedir=${prefix}/include |
|
|
|
|
libdir=\${exec_prefix}/lib |
|
|
|
|
includedir=\${prefix}/include |
|
|
|
|
|
|
|
|
|
Name: @PACKAGE_NAME@ |
|
|
|
|
Description: @DESCRIPTION@ |
|
|
|
|
Version: @VERSION@ |
|
|
|
|
Libs: -L${libdir} -l@PACKAGE_NAME@ @LDFLAGS@ |
|
|
|
|
Cflags: -I${includedir} @CPPFLAGS@ |
|
|
|
|
Libs: -L\${libdir} -l@PACKAGE_NAME@ @LDFLAGS@ |
|
|
|
|
Cflags: -I\${includedir} @CPPFLAGS@ |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
#### Cleanup If Makefile Exists #### |
|
|
|
|