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