autogen.sh: little readification

This commit is contained in:
Mirek Kratochvil 2013-07-26 09:59:09 +02:00
parent 60749aa4cf
commit 66e1245440

View file

@ -2,6 +2,7 @@
# simple autogen script that generates basic layout for autotools.
NAME="ccr"
COMMON_CPPFLAGS="-I/usr/local/include"
COMMON_CFLAGS="-Wall"
COMMON_CXXFLAGS="${COMMON_CFLAGS}"
@ -15,18 +16,18 @@ echo > $OUT
DISTDIRS=""
echo "AUTOMAKE_OPTIONS = subdir-objects" >>$OUT
echo "dist_man_MANS = man/ccr.1" >>$OUT
echo "dist_man_MANS = man/${NAME}.1" >>$OUT
echo "dist_noinst_SCRIPTS = autogen.sh" `for i in $DISTDIRS ; do find \$i -type f ; done | tr "\n" " " ` >>$OUT
echo "bin_PROGRAMS = ccr" >>$OUT
echo "ccrdir = src/" >>$OUT
echo "ccr_SOURCES = `( find src/ -type f -name \*.c ; find src/ -type f -name \*.cpp ) |tr \"\n\" \" \" ` " >>$OUT
echo "bin_PROGRAMS = ${NAME}" >>$OUT
echo "${NAME}dir = src/" >>$OUT
echo "${NAME}_SOURCES = `( find src/ -type f -name \*.c ; find src/ -type f -name \*.cpp ) |tr \"\n\" \" \" ` " >>$OUT
echo "noinst_HEADERS = `find src/ -type f -name \*.h |tr \"\n\" \" \" `" >>$OUT
echo "ccr_CPPFLAGS = -I\$(srcdir)/$i/ ${COMMON_CPPFLAGS}" >>$OUT
echo "ccr_CFLAGS = ${COMMON_CFLAGS}" >>$OUT
echo "ccr_CXXFLAGS = ${COMMON_CXXFLAGS}" >>$OUT
echo "ccr_LDFLAGS = ${COMMON_LDFLAGS}" >>$OUT
echo "ccr_LDADD = -lgmp ${COMMON_LDADD} " >>$OUT
echo "${NAME}_CPPFLAGS = -I\$(srcdir)/$i/ ${COMMON_CPPFLAGS}" >>$OUT
echo "${NAME}_CFLAGS = ${COMMON_CFLAGS}" >>$OUT
echo "${NAME}_CXXFLAGS = ${COMMON_CXXFLAGS}" >>$OUT
echo "${NAME}_LDFLAGS = ${COMMON_LDFLAGS}" >>$OUT
echo "${NAME}_LDADD = -lgmp ${COMMON_LDADD} " >>$OUT
libtoolize --force && aclocal && autoconf && automake --add-missing