Commit 5b920fc6 authored by James Henstridge's avatar James Henstridge Committed by James Henstridge

fix up handling of built sources for srcdir!=builddir builds.

2004-10-28  James Henstridge  <james@jamesh.id.au>

	* src/Makefile.am: fix up handling of built sources for
	srcdir!=builddir builds.

	* po/POTFILES.in: remove some files that have been removed.

	* data/Makefile.am: add some files to the clean list.

	* Makefile.am: add intltool files to the distclean list.

	* configure.in: clean up a bit, removing obsolete macro usage.

	* autogen.sh: use the gnome-common autogen.sh script.  Request a
	Automake 1.7.
parent fe910c54
2004-10-28 James Henstridge <james@jamesh.id.au>
* src/Makefile.am: fix up handling of built sources for
srcdir!=builddir builds.
* po/POTFILES.in: remove some files that have been removed.
* data/Makefile.am: add some files to the clean list.
* Makefile.am: add intltool files to the distclean list.
* configure.in: clean up a bit, removing obsolete macro usage.
* autogen.sh: use the gnome-common autogen.sh script. Request a
Automake 1.7.
2004-10-26 Shaun McCance <shaunm@gnome.org>
* data/ui/yelp-ui.xml:
......
......@@ -16,9 +16,14 @@ EXTRA_DIST = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
intltool-modules/XML/Parser/Style/OrigTree.pm \
idl/GNOME_Yelp.idl \
important_docs.xml \
$(DESKTOP_IN_FILES) \
$(DESKTOP_FILES)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
CLEANFILES = yelp.desktop
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef GETTEXT_PACKAGE
#undef GNOMELOCALEDIR
#undef HAVE_LIBBZ2
......@@ -4,147 +4,19 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=Yelp
TEST_TYPE=-f
FILE=src/yelp-main.c
PKG_NAME=Yelp
DIE=0
REQUIRED_AUTOMAKE_VERSION=1.7
export REQUIRED_AUTOMAKE_VERSION
AUTOMAKE=automake-1.4
ACLOCAL=aclocal-1.4
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
ACLOCAL=aclocal
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p6.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.4.2.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed to compile $PROJECT."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME."
echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.15.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
if test "$DIE" -eq 1; then
exit 1
if ! test -f $srcdir/src/yelp-main.c; then
echo "**Error**: Directory '$srcdir' does not look like the yelp source directory"
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
which gnome-autogen.sh || {
echo "You need to install gnome-common from Gnome CVS"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
for coin in .
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
if grep "sed.*POTFILES" configure.in >/dev/null; then
: do nothing -- we still have an old unmodified configure.in
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
echo "Running aclocal $aclocalinclude ..."
$ACLOCAL $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
$AUTOMAKE --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
cd "$ORIGDIR"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PROJECT || exit 1
else
echo Skipping configure process.
fi
. gnome-autogen.sh
AC_INIT(src/yelp-main.c)
AM_INIT_AUTOMAKE(yelp, 2.6.0)
AM_CONFIG_HEADER(config.h)
AC_INIT([yelp], [2.6.0],
[http://bugzilla.gnome.org/enter_bug.cgi?product=yelp])
AC_CONFIG_SRCDIR(src/yelp-main.c)
AC_CONFIG_HEADERS(config.h)
AM_SANITY_CHECK
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
AC_PROG_INTLTOOL
AC_PATH_PROG(GCONFTOOL, gconftool-2)
......@@ -26,23 +29,13 @@ fi
GETTEXT_PACKAGE=yelp
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
[The gettext translation domain])
ALL_LINGUAS="af am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kn ko li lt lv mk ml mn mr ms nb ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta tg th tr uk vi wa zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
yelplocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(yelplocaledir)
if test "x$prefix" = "xNONE"; then
GNOMELOCALEDIR=$ac_default_prefix/share/locale
else
GNOMELOCALEDIR=$prefix/share/locale
fi
AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNOMELOCALEDIR")
AM_GLIB_DEFINE_LOCALEDIR([GNOMELOCALEDIR])
PKG_CHECK_MODULES(YELP,
[
......@@ -59,10 +52,6 @@ PKG_CHECK_MODULES(YELP,
libexslt >= 0.8.1
])
AC_SUBST([YELP_CFLAGS])
CFLAGS="$YELP_CFLAGS $CFLAGS"
YELP_MODULES="gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0"
idl_dirs="`$PKG_CONFIG --variable=idldir gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0 bonobo-activation-2.0`"
......@@ -74,8 +63,6 @@ DB2HTML="`$PKG_CONFIG --variable=db2html gnome-doc-utils`"
AC_SUBST(DB2HTML)
PKG_CHECK_MODULES(MOZILLA_COMPONENT, mozilla-gtkmozembed)
AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
AC_SUBST(MOZILLA_COMPONENT_LIBS)
MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir mozilla-gtkmozembed`"
AC_SUBST(MOZILLA_INCLUDE_ROOT)
......@@ -84,11 +71,10 @@ MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
AC_SUBST(MOZILLA_HOME)
dnl Check for whereis
AC_CANONICAL_HOST
case $host in
case $host in
*-linux-gnu | *-irix6*) AC_DEFINE(HAVE_MAN_WHEREIS, 1, [man(1) understands -w option]);;
*-solaris*) AC_DEFINE(HAVE_MAN_DEBUG, 1, [man(1) has a -d debug option]);;
esac
esac
dnl ===================================================
dnl = Check for popt, reported to be needed on AIX
......@@ -130,7 +116,7 @@ dnl <= Check for bzip2 > 1.0.0
dnl =>
AC_SUBST(BZ_LIBS)
AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
src/Makefile
stylesheets/Makefile
......@@ -140,3 +126,5 @@ data/icons/Makefile
data/ui/Makefile
po/Makefile.in
])
AC_OUTPUT
......@@ -25,3 +25,5 @@ install-data-local:
else
install-data-local:
endif
CLEANFILES = yelp.schemas toc.xml
......@@ -7,12 +7,10 @@ src/yelp-base.c
src/yelp-db-pager.c
src/yelp-db2html.c
src/yelp-error.c
src/yelp-history.c
src/yelp-info.c
src/yelp-main.c
src/yelp-man.c
src/yelp-pager.c
src/yelp-theme.c
src/yelp-toc-pager.c
src/yelp-window.c
stylesheets/l10n.xml.in
......
......@@ -21,7 +21,6 @@ INCLUDES = \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DIMAGEDIR=\""$(datadir)/images/yelp"\" \
-DGNOMELOCALEDIR=\""$(yelplocaledir)"\" \
-DLIBGNOME_MAN2HTML=\"$(LIBGNOME_MAN2HTML)\" \
-DLIBGNOME_INFO2HTML=\"$(LIBGNOME_INFO2HTML)\" \
-DSERVERDIR=\"$(libexecdir)\" \
......@@ -36,20 +35,6 @@ install-exec-local:
rm -f $(DESTDIR)$(bindir)/gnome-help
ln -s yelp $(DESTDIR)$(bindir)/gnome-help
yelp-marshal.h: yelp-marshal.list
cd $(srcdir) && \
( @GLIB_GENMARSHAL@ --prefix=yelp_marshal yelp-marshal.list --header > yelp-marshal1.tmp \
&& mv yelp-marshal1.tmp yelp-marshal.h ) \
|| ( rm -f yelp-marshal1.tmp && exit 1 )
yelp-marshal.c: yelp-marshal.h
cd $(srcdir) && \
( @GLIB_GENMARSHAL@ --prefix=yelp_marshal yelp-marshal.list --body > yelp-marshal2.tmp \
&& mv yelp-marshal2.tmp yelp-marshal.c ) \
|| ( rm -f yelp-marshal2.tmp && exit 1 )
yelp-marshal-main.c: yelp-marshal.c
test_man_parser_SOURCES = \
yelp-error.c yelp-error.h \
yelp-io-channel.c yelp-io-channel.h \
......@@ -99,30 +84,50 @@ yelp_SOURCES = \
yelp_LDADD = @YELP_LIBS@ $(POPT_LIBS) $(Z_LIBS) $(BZ_LIBS) $(MOZILLA_COMPONENT_LIBS)
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_Yelp.server.in
server_DATA = $(server_in_files:.server.in=.server)
@INTLTOOL_SERVER_RULE@
BUILT_SOURCES = yelp-marshal.h yelp-marshal.c $(gnome_yelp_idl_sources)
yelp-marshal.h: stamp-yelp-marshal.h
@true
stamp-yelp-marshal.h: yelp-marshal.list
@GLIB_GENMARSHAL@ --prefix=yelp_marshal $(srcdir)/yelp-marshal.list --header > xgen-ymh \
&& (cmp -s xgen-ymh yelp-marshal.h || cp xgen-ymh yelp-marshal.h) \
&& rm -f xgen-ymh xgen-ymh~ \
&& echo timestamp > $(@F)
yelp-marshal.c: yelp-marshal.list
@GLIB_GENMARSHAL@ --prefix=yelp_marshal $(srcdir)/yelp-marshal.list --body > xgen-ymc \
&& cp xgen-ymc yelp-marshal.c \
&& rm -f xgen-ymc xgen-ymc~
yelp-marshal-main.c: yelp-marshal.c
gnome_yelp_idl_sources = \
GNOME_Yelp-stubs.c \
GNOME_Yelp-skels.c \
GNOME_Yelp-common.c \
GNOME_Yelp.h
$(gnome_yelp_idl_sources): gnome_yelp_idl_stamp
gnome_yelp_idl_stamp: $(top_srcdir)/idl/GNOME_Yelp.idl $(ORBIT_IDL)
$(gnome_yelp_idl_sources): $(top_srcdir)/idl/GNOME_Yelp.idl $(ORBIT_IDL)
$(ORBIT_IDL) $(YELP_IDL_INCLUDES) -I$(top_srcdir) $<
touch $@
$(yelp_OBJECTS): yelp-marshal.h gnome_yelp_idl_stamp
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_Yelp.server.in
server_DATA = $(server_in_files:.server.in=.server)
@INTLTOOL_SERVER_RULE@
CLEANFILES = \
$(gnome_yelp_idl_sources) \
gnome_yelp_idl_stamp \
GNOME_Yelp.server
GNOME_Yelp.server \
xgen-ymh xgen-ymc
MAINTAINERCLEANFILES = stamp-yelp-marshal.h $(BUILT_SOURCES)
distclean-local:
if test $(srcdir) != .; then \
rm -f $(MAINTAINERCLEANFILES); \
fi
EXTRA_DIST = \
yelp-marshal.list \
......
# copyright (c) 2000-2002 Sun Microsystems, Inc. and Dan Mueth
dnl Process this file with autoconf to produce a configure script.
AC_INIT(testdoc1/testdoc1.xml)
AC_INIT([yelp-tests], [2.5])
AC_CONFIG_SRCDIR(testdoc1/testdoc1.xml)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE
dnl ==========================================================================
dnl
......@@ -59,12 +63,12 @@ dnl ====================================
dnl = End tests for scrollkeeper
dnl ====================================
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(yelp-tests,2.5)
AM_PROG_LIBTOOL
AC_OUTPUT(
AC_CONFIG_FILES(
Makefile
testdoc1/Makefile
xhelp/Makefile
)
\ No newline at end of file
)
AC_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment