pidgin/purple-plugin-pack

A better fix for dynamic AC_OUTPUTS, this could use some cleanup, but works as is
org.guifications.plugins.buildsystem_rewrite
2008-04-26, grim
5911ed100473
Parents 52afc238dfe1
Children c7224290eea2
A better fix for dynamic AC_OUTPUTS, this could use some cleanup, but works as is
  • +1 -0
    Makefile.am
  • +23 -1
    autogen.sh
  • +3 -15
    configure.ac
  • --- a/Makefile.am Mon Apr 21 03:21:11 2008 -0400
    +++ b/Makefile.am Sat Apr 26 23:00:22 2008 -0400
    @@ -14,6 +14,7 @@
    intltool-merge.in \
    intltool-update.in \
    menuconfig \
    + plugin_pack.m4 \
    plugin_pack.py \
    plugin_pack.spec \
    po/AUTHORS \
    --- a/autogen.sh Mon Apr 21 03:21:11 2008 -0400
    +++ b/autogen.sh Sat Apr 26 23:00:22 2008 -0400
    @@ -53,9 +53,11 @@
    ###############################################################################
    check () {
    CMD=$1
    + shift
    + ARGS=$@
    echo -n "checking for ${CMD}... "
    - BIN=`which ${CMD} 2>/dev/null`
    + BIN=`which ${CMD} $@ 2>/dev/null`
    if [ x"${BIN}" = x"" ] ; then
    echo "not found."
    @@ -123,6 +125,26 @@
    check "autoheader"; AUTOHEADER=${BIN};
    check "automake"; AUTOMAKE=${BIN};
    check "autoconf"; AUTOCONF=${BIN};
    +check "python" -V; PYTHON=${BIN};
    +
    +###############################################################################
    +# Build pluginpack.m4
    +###############################################################################
    +CONFIG_FILE="plugin_pack.m4"
    +
    +if [ -f ${CONFIG_FILE} ]
    +then
    + rm -f ${CONFIG_FILE}
    +fi
    +
    +echo -n "creating ${CONFIG_FILE} ..."
    +printf "AC_CONFIG_FILES([\n" >> ${CONFIG_FILE}
    +for DIR in `${PYTHON} plugin_pack.py dist_dirs`
    +do
    + printf "\t%s\n" ${DIR}/Makefile >> ${CONFIG_FILE}
    +done
    +printf "])\n" >> ${CONFIG_FILE}
    +echo " done."
    ###############################################################################
    # Run all of our helpers
    --- a/configure.ac Mon Apr 21 03:21:11 2008 -0400
    +++ b/configure.ac Sat Apr 26 23:00:22 2008 -0400
    @@ -334,24 +334,12 @@
    PP_DIST_DIRS="`$srcdir/plugin_pack.py dist_dirs`"
    AC_SUBST(PP_DIST_DIRS)
    -PP_DIST_MAKE=""
    -for dir in $PP_DIST_DIRS
    -do
    - PP_DIST_MAKE="$PP_DIST_MAKE $dir/Makefile"
    -done
    -
    dnl #######################################################################
    dnl # Finish up
    dnl #######################################################################
    -dnl # This is a hack to have a dynamically generated list of files for
    -dnl # AC_OUTPUT. AC_OUTPUT still needs to be called, but as long as this
    -dnl # is tweaked before hand everything is fine.
    -dnl #
    -dnl # So to make this work, we call AC_OUTPUT with our static config files
    -dnl # after we've updated ac_config_files to have our dynamic list, we do
    -dnl # our normal AC_OUTPUT and all is well.
    -dnl #######################################################################
    -ac_config_files="$ac_config_files ${PP_DIST_MAKE}"
    +
    +dnl #include the list of plugins that was created by autogen
    +m4_include([plugin_pack.m4])
    AC_OUTPUT([Makefile
    common/Makefile