diff options
-rw-r--r-- | Makefile.cvs | 7 | ||||
-rw-r--r-- | conf/am_edit | 94 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | kde2/Makefile.am | 2 |
4 files changed, 79 insertions, 30 deletions
diff --git a/Makefile.cvs b/Makefile.cvs index ff0b86a..fe1e959 100644 --- a/Makefile.cvs +++ b/Makefile.cvs @@ -3,9 +3,14 @@ AUTOMAKEFILES = conf/mkinstalldirs conf/missing conf/install-sh CONFIGHIN = include/config.h.in ACLOCAL = conf/aclocal.m4 GETTEXT = intl/Makefile.in +KDEVER=$(shell kde-config -v | grep -q "KDE: 3" && echo 3 || echo 2) +ifeq ($(KDEVER),3) +AM_EDIT_ARGS=--kde3 +endif all: @echo "Use make devel for development, make dist for distribution" + @echo $(KDEVER) build: devel ./configure --prefix=/usr --mandir=/usr/share/man --enable-debug --enable-kde @@ -46,4 +51,4 @@ $(GETTEXT): $(ACLOCAL) $(AUTOMAKEFILES): $(ACLOCAL) $(CONFIGHIN) automake --add-missing - make -C kde2 -f Makefile.am am_edit + make AM_EDIT_ARGS=$(AM_EDIT_ARGS) -C kde2 -f Makefile.am am_edit diff --git a/conf/am_edit b/conf/am_edit index d27d454..6c36a7a 100644 --- a/conf/am_edit +++ b/conf/am_edit @@ -98,6 +98,7 @@ $use_final = 1; # create code for --enable-final $cleantarget = "clean"; $dryrun = 0; $pathoption = 0; +$iskde3 = 0; while (defined ($ARGV[0])) { @@ -133,6 +134,10 @@ while (defined ($ARGV[0])) $KDEtopdir = $1 if($1); $KDEtopdir = $2 if($2); } + elsif (/^--kde3$/) + { + $iskde3 = 1; + } elsif (/^--help$|^-h$/) { print STDOUT "Usage $thisProg [OPTION] ... [dir/Makefile.in]...\n", @@ -1402,34 +1407,73 @@ sub tag_DOCFILES () if ($files =~ /(^| )index\.docbook($| )/) { my $lines = ""; - my $lookup = 'KDB2HTML\s*='; + if ($iskde3) { + my $lookup = 'MEINPROC\s*='; + if ($MakefileData !~ /\n($lookup)/) { + $lines = "MEINPROC=/\$(kde_bindir)/meinproc\n"; + } + $lookup = 'KDE_XSL_STYLESHEET\s*='; + if ($MakefileData !~ /\n($lookup)/) { + $lines .= "KDE_XSL_STYLESHEET=/\$(kde_datadir)/ksgmltools2/customization/kde-chunk.xsl\n"; + } + $lookup = '\nindex.cache.bz2:'; + if ($MakefileData !~ /\n($lookup)/) { + $lines .= "index.cache.bz2: \$(srcdir)/index.docbook \$(KDE_XSL_STYLESHEET) $files\n"; + $lines .= "\t-\@if test -n \"\$(MEINPROC)\"; then echo \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; fi\n"; + $lines .= "\n"; + } + + $lines .= "docs-am: index.cache.bz2\n"; + $lines .= "\n"; + $lines .= "install-docs: docs-am install-nls\n"; + $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n"; + $lines .= "\t\@if test -f index.cache.bz2; then \\\n"; + $lines .= "\techo \$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n"; + $lines .= "\t\$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n"; + $lines .= "\tfi\n"; + $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; + $lines .= "\t\$(LN_S) \$(kde_libs_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; + + $lines .= "\n"; + $lines .= "uninstall-docs:\n"; + $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n"; + $lines .= "\n"; + $lines .= "clean-docs:\n"; + $lines .= "\t-rm -f index.cache.bz2\n"; + $lines .= "\n"; + $target_adds{"install-data-am"} .= "install-docs "; + $target_adds{"uninstall"} .= "uninstall-docs "; + $target_adds{"clean-am"} .= "clean-docs "; + } else { + my $lookup = 'KDB2HTML\s*='; #if ($MakefileData !~ /\n($lookup)/) { # $lines = "KDB2HTML = \$(SHELL) /\$(kde_bindir)/kdb2html\n"; # } - $lines .= "docs-am: HTML HTML/index.html\n"; - $lines .= "\n"; - $lines .= "HTML:\n"; - $lines .= "\ttest -d HTML || mkdir HTML\n"; - $lines .= "\n"; - $lines .= "HTML/index.html: HTML index.docbook\n"; - $lines .= "\t\@test -d HTML && rm -r HTML\n"; - $lines .= "\t\$(KDB2HTML) \$(srcdir)/index.docbook\n"; - $lines .= "\n"; - $lines .= "install-docs:\n"; - $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n"; - $lines .= "\t-\@if test -d HTML; then \\\n"; - $lines .= "\tfilelist=`(cd HTML && ls -1 * .anchors 2> /dev/null)`; for file in \$\$filelist; do if test -f HTML/\$\$file; then \\\n"; - $lines .= "\techo \$(INSTALL_DATA) HTML/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file ;\\\n"; - $lines .= "\t\$(INSTALL_DATA) HTML/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file; \\\n"; - $lines .= "\tfi; done; fi\n"; - $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; - $lines .= "\t\$(LN_S) /\$(kde_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; - $lines .= "\n"; - $lines .= "uninstall-docs:\n"; - $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n"; - $lines .= "\n"; - $target_adds{"install-data-am"} .= "install-docs "; - $target_adds{"uninstall"} .= "uninstall-docs "; + $lines .= "docs-am: HTML HTML/index.html\n"; + $lines .= "\n"; + $lines .= "HTML:\n"; + $lines .= "\ttest -d HTML || mkdir HTML\n"; + $lines .= "\n"; + $lines .= "HTML/index.html: HTML index.docbook\n"; + $lines .= "\t\@test -d HTML && rm -r HTML\n"; + $lines .= "\t\$(KDB2HTML) \$(srcdir)/index.docbook\n"; + $lines .= "\n"; + $lines .= "install-docs:\n"; + $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n"; + $lines .= "\t-\@if test -d HTML; then \\\n"; + $lines .= "\tfilelist=`(cd HTML && ls -1 * .anchors 2> /dev/null)`; for file in \$\$filelist; do if test -f HTML/\$\$file; then \\\n"; + $lines .= "\techo \$(INSTALL_DATA) HTML/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file ;\\\n"; + $lines .= "\t\$(INSTALL_DATA) HTML/\$\$file \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$file; \\\n"; + $lines .= "\tfi; done; fi\n"; + $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; + $lines .= "\t\$(LN_S) /\$(kde_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n"; + $lines .= "\n"; + $lines .= "uninstall-docs:\n"; + $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n"; + $lines .= "\n"; + $target_adds{"install-data-am"} .= "install-docs "; + $target_adds{"uninstall"} .= "uninstall-docs "; + } appendLines ($lines); $docsadded = 1; diff --git a/configure.in b/configure.in index 7ac1775..9503006 100644 --- a/configure.in +++ b/configure.in @@ -272,13 +272,13 @@ PLP_HELP_MSG([Options for activating sub packages:]) ac_enable_kde=no AM_CONDITIONAL(BUILD_KDE, false) AC_ARG_ENABLE(kde, - [ --enable-kde build KDE2 stuff [no]], + [ --enable-kde build KDE stuff [no]], if test "$enableval" = "yes" ; then - AC_MSG_RESULT([Will build KDE2 stuff]) + AC_MSG_RESULT([Will build KDE stuff]) ac_enable_kde=yes fi ) -PLP_HELP_MSG([Options, only needed when building KDE2 stuff:]) +PLP_HELP_MSG([Options, only needed when building KDE stuff:]) if test "x$ac_enable_kde" = "xyes" ; then AC_PATH_KDE if test -n "${kde_cv_path_kde_config}" ; then diff --git a/kde2/Makefile.am b/kde2/Makefile.am index fa6f47e..4c157de 100644 --- a/kde2/Makefile.am +++ b/kde2/Makefile.am @@ -12,4 +12,4 @@ maintainer-clean-local: rm -f Makefile.in am_edit: - perl ../conf/am_edit --topdir=kde2 + perl ../conf/am_edit --topdir=kde2 $(AM_EDIT_ARGS) |