autotools: add a new autoconf variable: ${gajim_srcdir}.

It expanded version is GAJIM_SRCDIR.

It indicate where pyfiles will be installed (for now: PREFIX/share/gajim/src).

simplify src/Makefile.am by using nobase_ and dist_ prefix.
nobase_ allows hiearchical installation instead of flat directory
installation.
This commit is contained in:
Bruno Tarquini 2009-11-28 12:54:30 +01:00
parent 1ad6f217a8
commit 6123687dda
4 changed files with 21 additions and 33 deletions

View File

@ -56,6 +56,9 @@ AC_SUBST(ACLOCAL_AMFLAGS)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST([PYTHON_INCLUDES])
AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src])
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
AS_AC_EXPAND(DATADIR, "${datadir}")
AS_AC_EXPAND(LIBDIR, "${libdir}")
AS_AC_EXPAND(DOCDIR, "${docdir}")
@ -83,3 +86,11 @@ AC_CONFIG_FILES([
po/Makefile.in
])
AC_OUTPUT
echo "
*****************************
Installation:
Prefix ........... ${prefix}
Python modules ... ${GAJIM_SRCDIR}
Documentation .... ${DOCDIR}
*****************************"

View File

@ -5,7 +5,7 @@ desktopdir = $(datadir)/applications
desktop_in_files = gajim.desktop.in.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
installdefsdir = $(pkgdatadir)/src/common
installdefsdir = $(gajim_srcdir)/common
installdefs_DATA = defs.py
soundsdir = $(pkgdatadir)/data/sounds

View File

@ -32,5 +32,5 @@ fi
export datadir=@DATADIR@/gajim
PYTHON_EXEC=@PYTHON@
cd ${datadir}/src
cd "@GAJIM_SRCDIR@"
exec ${PYTHON_EXEC} -OO $APP.py "$@"

View File

@ -2,37 +2,14 @@ INCLUDES = \
$(PYTHON_INCLUDES)
export MACOSX_DEPLOYMENT_TARGET=10.4
gajimsrcdir = $(pkgdatadir)/src
gajimsrc_PYTHON = $(srcdir)/*.py
gajimsrc1dir = $(pkgdatadir)/src/common
gajimsrc1_PYTHON = \
$(srcdir)/common/*.py
gajimsrc2dir = $(pkgdatadir)/src/common/xmpp
gajimsrc2_PYTHON = \
$(srcdir)/common/xmpp/*.py
gajimsrc3dir = $(pkgdatadir)/src/common/zeroconf
gajimsrc3_PYTHON = \
$(srcdir)/common/zeroconf/*.py
gajimsrc4dir = $(pkgdatadir)/src/command_system
gajimsrc4_PYTHON = \
$(srcdir)/command_system/*.py
gajimsrc5dir = $(pkgdatadir)/src/command_system/implementation
gajimsrc5_PYTHON = \
$(srcdir)/command_system/implementation/*.py
DISTCLEANFILES =
EXTRA_DIST = $(gajimsrc_PYTHON) \
$(gajimsrc1_PYTHON) \
$(gajimsrc2_PYTHON) \
$(gajimsrc3_PYTHON) \
$(gajimsrc4_PYTHON) \
$(gajimsrc5_PYTHON)
gajimsrcdir = $(gajim_srcdir)
nobase_dist_gajimsrc_PYTHON = \
$(srcdir)/*.py \
$(srcdir)/common/*.py \
$(srcdir)/common/xmpp/*.py \
$(srcdir)/common/zeroconf/*.py \
$(srcdir)/command_system/*.py \
$(srcdir)/command_system/implementation/*.py
dist-hook:
rm -f $(distdir)/ipython_view.py