BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/admin@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
@ -0,0 +1,102 @@ | |||
## generate API documentation with doxygen | |||
apidox-am-yes: | |||
@if test \! -d "$(top_srcdir)/doc/common/" && test -z "$$DOXDATA" ; then \ | |||
export DOXDATA=$(kde_libs_htmldir)/en/common ; \ | |||
fi ; \ | |||
abs_top_srcdir=`cd $(top_srcdir) && pwd` ;\ | |||
test -d $(top_builddir)/apidocs || \ | |||
( cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \ | |||
--no-modulename --installdir=$(kde_libs_htmldir)/en \ | |||
--no-recurse $(abs_top_srcdir) . ) ; \ | |||
cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \ | |||
--recurse --no-modulename --installdir=$(kde_libs_htmldir)/en \ | |||
$$abs_top_srcdir $(subdir) | |||
apidox-am-toplevel-yes: | |||
@if test \! -d "$(top_srcdir)/doc/common/" && test -z "$$ADMIN" ; then \ | |||
export DOXDATA=$(kde_libs_htmldir)/en/common ; \ | |||
fi ; \ | |||
abs_top_srcdir=`cd $(top_srcdir) && pwd` ;\ | |||
cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \ | |||
--no-modulename --installdir=$(kde_libs_htmldir)/en \ | |||
$$abs_top_srcdir | |||
## Don't generate API documentation without doxygen | |||
apidox-am-no: | |||
apidox-am-toplevel-no: | |||
apidox: | |||
@if test "$(subdir)" != "."; then \ | |||
$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\ | |||
else \ | |||
$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\ | |||
fi | |||
install-data-local: install-apidox | |||
## install API documentation | |||
install-apidox: | |||
@if test "$(subdir)" != "."; then \ | |||
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \ | |||
if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \ | |||
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \ | |||
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \ | |||
fi; \ | |||
if test -d $(top_builddir)/apidocs/$(subdir)/html; then \ | |||
list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \ | |||
echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\ | |||
for file in $$list; do \ | |||
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \ | |||
done; \ | |||
fi; \ | |||
else\ | |||
if test -d $(top_builddir)/apidocs; then \ | |||
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\ | |||
list=`cd $(top_builddir)/apidocs && ls -1`; \ | |||
echo "installing $(top_builddir)/apidocs/$$file" ;\ | |||
echo "target directory $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs" ; \ | |||
for file in $$list; do \ | |||
if test -f $(top_builddir)/apidocs/$$file; then \ | |||
$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \ | |||
fi; \ | |||
done ; fi; \ | |||
fi | |||
uninstall-local: uninstall-apidox | |||
## uninstall API documentation | |||
uninstall-apidox: | |||
@if test "$(subdir)" != "."; then \ | |||
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \ | |||
rm -rf $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \ | |||
fi \ | |||
else \ | |||
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \ | |||
rm -rf $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \ | |||
fi \ | |||
fi | |||
install-apidox-recurse: install-apidox | |||
@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \ | |||
list='$(SUBDIRS)'; \ | |||
for subdir in $$list; do \ | |||
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am > /dev/null ; then \ | |||
echo "Installing apidox from $$subdir"; \ | |||
if test "$$subdir" != "."; then \ | |||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no install-apidox-recurse) || exit 1; \ | |||
fi ; fi ;\ | |||
done; \ | |||
fi | |||
.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes | |||
# Local Variables: | |||
# mode: makefile | |||
# End: |
@ -0,0 +1,192 @@ | |||
OUTPUT_LANGUAGE = English | |||
USE_WINDOWS_ENCODING = NO | |||
BRIEF_MEMBER_DESC = NO | |||
REPEAT_BRIEF = YES | |||
ABBREVIATE_BRIEF = | |||
ALWAYS_DETAILED_SEC = YES | |||
INLINE_INHERITED_MEMB = NO | |||
FULL_PATH_NAMES = NO | |||
STRIP_FROM_PATH = | |||
SHORT_NAMES = NO | |||
JAVADOC_AUTOBRIEF = YES | |||
MULTILINE_CPP_IS_BRIEF = NO | |||
INHERIT_DOCS = YES | |||
DISTRIBUTE_GROUP_DOC = NO | |||
TAB_SIZE = 4 | |||
OPTIMIZE_OUTPUT_FOR_C = NO | |||
OPTIMIZE_OUTPUT_JAVA = NO | |||
SUBGROUPING = YES | |||
EXTRACT_ALL = NO | |||
EXTRACT_PRIVATE = NO | |||
EXTRACT_STATIC = YES | |||
EXTRACT_LOCAL_CLASSES = NO | |||
HIDE_UNDOC_MEMBERS = NO | |||
HIDE_UNDOC_CLASSES = YES | |||
HIDE_FRIEND_COMPOUNDS = NO | |||
HIDE_IN_BODY_DOCS = NO | |||
INTERNAL_DOCS = NO | |||
CASE_SENSE_NAMES = YES | |||
HIDE_SCOPE_NAMES = NO | |||
SHOW_INCLUDE_FILES = YES | |||
INLINE_INFO = YES | |||
SORT_BRIEF_DOCS = NO | |||
SORT_BY_SCOPE_NAME = NO | |||
GENERATE_TESTLIST = NO | |||
GENERATE_BUGLIST = YES | |||
GENERATE_DEPRECATEDLIST= YES | |||
ENABLED_SECTIONS = | |||
MAX_INITIALIZER_LINES = 30 | |||
SHOW_USED_FILES = YES | |||
QUIET = YES | |||
WARNINGS = NO | |||
WARN_IF_UNDOCUMENTED = NO | |||
WARN_IF_DOC_ERROR = YES | |||
WARN_FORMAT = | |||
WARN_LOGFILE = | |||
INPUT = | |||
FILE_PATTERNS = *.h \ | |||
*.cpp \ | |||
*.cc \ | |||
*.hpp \ | |||
*.dox \ | |||
*.c++ \ | |||
*.cxx \ | |||
*.h++ \ | |||
*.hh | |||
RECURSIVE = YES | |||
EXCLUDE = | |||
EXCLUDE_SYMLINKS = NO | |||
EXCLUDE_PATTERNS = *.moc.* \ | |||
moc* \ | |||
*.all_cpp.* \ | |||
*unload.* \ | |||
*/test/* \ | |||
*/tests/* \ | |||
*_p.h | |||
EXAMPLE_PATH = | |||
EXAMPLE_PATTERNS = | |||
EXAMPLE_RECURSIVE = NO | |||
IMAGE_PATH = | |||
INPUT_FILTER = | |||
FILTER_SOURCE_FILES = NO | |||
SOURCE_BROWSER = YES | |||
INLINE_SOURCES = NO | |||
STRIP_CODE_COMMENTS = YES | |||
REFERENCED_BY_RELATION = YES | |||
REFERENCES_RELATION = YES | |||
VERBATIM_HEADERS = YES | |||
ALPHABETICAL_INDEX = YES | |||
COLS_IN_ALPHA_INDEX = 3 | |||
HTML_OUTPUT = | |||
HTML_FILE_EXTENSION = .html | |||
HTML_HEADER = ../apidocs/common/header.html | |||
HTML_FOOTER = ../apidocs/common/footer.html | |||
HTML_STYLESHEET = ../apidocs/common/doxygen.css | |||
HTML_ALIGN_MEMBERS = YES | |||
GENERATE_HTMLHELP = NO | |||
CHM_FILE = | |||
HHC_LOCATION = | |||
GENERATE_CHI = NO | |||
BINARY_TOC = NO | |||
TOC_EXPAND = NO | |||
DISABLE_INDEX = YES | |||
ENUM_VALUES_PER_LINE = 4 | |||
GENERATE_TREEVIEW = NO | |||
TREEVIEW_WIDTH = 250 | |||
GENERATE_LATEX = NO | |||
LATEX_OUTPUT = | |||
LATEX_CMD_NAME = latex | |||
MAKEINDEX_CMD_NAME = makeindex | |||
COMPACT_LATEX = NO | |||
PAPER_TYPE = a4wide | |||
EXTRA_PACKAGES = | |||
LATEX_HEADER = | |||
PDF_HYPERLINKS = NO | |||
USE_PDFLATEX = NO | |||
LATEX_BATCHMODE = NO | |||
LATEX_HIDE_INDICES = NO | |||
GENERATE_RTF = NO | |||
RTF_OUTPUT = | |||
COMPACT_RTF = NO | |||
RTF_HYPERLINKS = NO | |||
RTF_STYLESHEET_FILE = | |||
RTF_EXTENSIONS_FILE = | |||
GENERATE_MAN = NO | |||
MAN_OUTPUT = | |||
MAN_EXTENSION = .kde3 | |||
MAN_LINKS = YES | |||
GENERATE_XML = NO | |||
XML_OUTPUT = xml | |||
XML_SCHEMA = | |||
XML_DTD = | |||
XML_PROGRAMLISTING = NO | |||
GENERATE_AUTOGEN_DEF = NO | |||
GENERATE_PERLMOD = NO | |||
PERLMOD_LATEX = NO | |||
PERLMOD_PRETTY = YES | |||
PERLMOD_MAKEVAR_PREFIX = | |||
ENABLE_PREPROCESSING = YES | |||
SEARCH_INCLUDES = YES | |||
INCLUDE_PATH = | |||
INCLUDE_FILE_PATTERNS = | |||
PREDEFINED = QT_VERSION=320 \ | |||
__cplusplus \ | |||
Q_WS_X11 | |||
EXPAND_AS_DEFINED = | |||
SKIP_FUNCTION_MACROS = YES | |||
TAGFILES = | |||
GENERATE_TAGFILE = | |||
ALLEXTERNALS = NO | |||
EXTERNAL_GROUPS = NO | |||
PERL_PATH = | |||
CLASS_DIAGRAMS = YES | |||
HIDE_UNDOC_RELATIONS = NO | |||
HAVE_DOT = NO | |||
UML_LOOK = NO | |||
TEMPLATE_RELATIONS = YES | |||
INCLUDE_GRAPH = YES | |||
INCLUDED_BY_GRAPH = YES | |||
CALL_GRAPH = NO | |||
GRAPHICAL_HIERARCHY = YES | |||
DOT_IMAGE_FORMAT = png | |||
DOT_PATH = | |||
DOTFILE_DIRS = | |||
MAX_DOT_GRAPH_WIDTH = 800 | |||
MAX_DOT_GRAPH_HEIGHT = 1024 | |||
MAX_DOT_GRAPH_DEPTH = 0 | |||
GENERATE_LEGEND = YES | |||
DOT_CLEANUP = YES | |||
SEARCHENGINE = NO | |||
### KDE Settings | |||
ALIASES = \ | |||
"intern=\par<b>Internal use only.</b>" \ | |||
"reimp=\par<b>Reimplemented from superclass.</b>" \ | |||
"obsolete=@deprecated" \ | |||
"feature=\xrefitem features \"Feature(s)\" \"Features\"" \ | |||
"maintainer=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \ | |||
"unmaintained=\xrefitem unmaintained \"Unmaintained\" \"Unmaintained\"" \ | |||
"requirement=\xrefitem requirements \"Requirement(s)\" \"Requirements\"" \ | |||
"faq=\xrefitem FAQ \"F.A.Q.\" \"F.A.Q.\"" \ | |||
"authors=\xrefitem authors \"Author(s)\" \"Authors\"" \ | |||
"FIXME=\xrefitem fixme \"Fixme\" \"Fixme\"" | |||
HTML_ALIGN_MEMBERS = YES | |||
REFERENCED_BY_RELATION = NO | |||
REFERENCES_RELATION = NO | |||
VERBATIM_HEADERS = NO | |||
GENERATE_HTML = YES | |||
SOURCE_BROWSER = YES | |||
GENERATE_AUTOGEN_DEF = NO | |||
DETAILS_AT_TOP = YES | |||
SORT_MEMBER_DOCS = YES | |||
GENERATE_TODOLIST = YES | |||
IGNORE_PREFIX = K | |||
GENERATE_HTML = YES | |||
CLASS_GRAPH = YES | |||
COLLABORATION_GRAPH = NO | |||
MACRO_EXPANSION = YES | |||
EXPAND_ONLY_PREDEF = YES | |||
@ -0,0 +1,37 @@ | |||
### Makefile.common | |||
### | |||
### Copyright (C) 2002 by the KDE developers | |||
### All the real work is done by the shellscript cvs.sh | |||
SHELL=/bin/sh | |||
cvs dist configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4 extract-messages: | |||
@admindir=$(admindir); \ | |||
if test "x$$admindir" = x; then \ | |||
admindir=.; until test -f $$admindir/admin/cvs.sh; do \ | |||
admindir=$$admindir/..; \ | |||
if test `cd $$admindir && pwd` = / ; then break; fi; \ | |||
done; \ | |||
admindir=$$admindir/admin; \ | |||
if test -f $$admindir/cvs.sh; then :; else \ | |||
echo "Can't find the admin/ directory in any parent of the"; \ | |||
echo "current directory. Please set it with admindir=..."; \ | |||
exit 1; \ | |||
fi; \ | |||
fi; \ | |||
if test "$@" = "package-merge"; then \ | |||
MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \ | |||
$(SHELL) $$admindir/cvs.sh package-merge ;\ | |||
else \ | |||
MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\ | |||
fi | |||
configure.in: configure.files subdirs | |||
configure.files: subdirs | |||
svn: cvs | |||
.SILENT: | |||
.PHONY: svn cvs dist package-merge package-messages |
@ -0,0 +1,157 @@ | |||
#!/usr/bin/perl -w | |||
use DB_File; | |||
use Fcntl ':flock'; | |||
if (!defined($ARGV[0])) { | |||
print "usage: requires .class dump as parameter!\n"; | |||
exit; | |||
} | |||
sub bailout | |||
{ | |||
untie %bcheckdb if(defined(%bcheckdb)); | |||
if(defined(MYLOCK)) { | |||
flock MYLOCK, LOCK_UN; | |||
close(MYLOCK); | |||
} | |||
print @_; | |||
exit 5; | |||
} | |||
sub ask_user | |||
{ | |||
my ($dbkey, $dbchunk) = @_; | |||
if (defined($ENV{"BCHECK_UPDATE"})) { | |||
$bcheckdb{$dbkey} = $dbchunk; | |||
return; | |||
} | |||
&bailout("BC problem detected") if (! -t STDIN); | |||
print "(I)gnore / (Q)uit / (U)pdate: "; | |||
my $key; | |||
while(defined(read STDIN, $key, 1)) { | |||
$key = lc($key); | |||
print "got: >$key<\n"; | |||
return if ($key eq 'i'); | |||
&bailout("BC problem. aborted") if ($key eq 'q'); | |||
if ($key eq 'u') { | |||
$bcheckdb{$dbkey} = $dbchunk; | |||
return; | |||
} | |||
print "\n(I)gnore / (Q)uit / (U)pdate: "; | |||
} | |||
} | |||
sub diff_chunk($$) | |||
{ | |||
my ($oldl, $newl) = @_; | |||
my @old = split /^/m, $oldl; | |||
my @new = split /^/m, $newl; | |||
my $haschanges = 0; | |||
my $max = $#old > $#new ? $#old : $#new; | |||
die "whoops. key different" if ($old[0] ne $new[0]); | |||
if ($#old != $#new) { | |||
warn ("Structural difference.\n"); | |||
print @old; | |||
print "-----------------------------------------------\n"; | |||
print @new; | |||
$haschanges = 1; | |||
return $haschanges; | |||
} | |||
print $old[0]; | |||
my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/); | |||
my $c = 1; | |||
while ($c < $max) { | |||
my ($o, $n) = ($old[$c], $new[$c]); | |||
chomp $o; | |||
chomp $n; | |||
$c++; | |||
next if ($o eq $n); | |||
if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) { | |||
next if ($n eq "$1$class$2"); | |||
} | |||
$haschanges = 1; | |||
print "-$o\n+$n\n\n"; | |||
} | |||
return $haschanges; | |||
} | |||
local $dblock = $ENV{"HOME"} . "/bcheck.lock"; | |||
my $dbfile = $ENV{"HOME"} . "/bcheck.db"; | |||
my $cdump = $ARGV[0]; | |||
die "file $cdump is not readable: $!" if (! -f $cdump); | |||
# make sure the advisory lock exists | |||
open(MYLOCK, ">$dblock"); | |||
print MYLOCK ""; | |||
flock MYLOCK, LOCK_EX; | |||
tie %bcheckdb, 'DB_File', $dbfile; | |||
my $chunk = ""; | |||
open (IN, "<$cdump") or die "cannot open $cdump: $!"; | |||
while (<IN>) { | |||
chop; | |||
s/0x[0-9a-fA-F]+/0x......../g; | |||
s/base size=/size=/g; | |||
s/\(\)\s*$//g; | |||
s/base align=/align=/g; | |||
$chunk .= $_ . "\n"; | |||
if(/^\s*$/) { | |||
my @lines = split /^/m, $chunk; | |||
my $key = $lines[0]; | |||
chomp $key; | |||
if($key !~ /<anonymous struct>/ && | |||
$key !~ /<anonymous union>/) { | |||
if(defined($bcheckdb{$key})) { | |||
my $dbversion = $bcheckdb{$key}; | |||
if($dbversion ne $chunk) { | |||
&ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk)); | |||
} | |||
} | |||
else { | |||
$bcheckdb{$key} = $chunk; | |||
print "NEW: $key\n"; | |||
} | |||
} | |||
$chunk = ""; | |||
next; | |||
} | |||
} | |||
close(IN); | |||
untie %bcheckdb; | |||
flock MYLOCK, LOCK_UN; | |||
close(MYLOCK); | |||
exit 0; |
@ -0,0 +1,142 @@ | |||
#! /bin/sh | |||
# Wrapper for compilers which do not understand `-c -o'. | |||
scriptversion=2005-05-14.22 | |||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. | |||
# Written by Tom Tromey <tromey@cygnus.com>. | |||
# | |||
# This program is free software; you can redistribute it and/or modify | |||
# it under the terms of the GNU General Public License as published by | |||
# the Free Software Foundation; either version 2, or (at your option) | |||
# any later version. | |||
# | |||
# This program is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU General Public License for more details. | |||
# | |||
# You should have received a copy of the GNU General Public License | |||
# along with this program; if not, write to the Free Software | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
# As a special exception to the GNU General Public License, if you | |||
# distribute this file as part of a program that contains a | |||
# configuration script generated by Autoconf, you may include it under | |||
# the same distribution terms that you use for the rest of that program. | |||
# This file is maintained in Automake, please report | |||
# bugs to <bug-automake@gnu.org> or send patches to | |||
# <automake-patches@gnu.org>. | |||
case $1 in | |||
'') | |||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2 | |||
exit 1; | |||
;; | |||
-h | --h*) | |||
cat <<\EOF | |||
Usage: compile [--help] [--version] PROGRAM [ARGS] | |||
Wrapper for compilers which do not understand `-c -o'. | |||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining | |||
arguments, and rename the output as expected. | |||
If you are trying to build a whole package this is not the | |||
right script to run: please start by reading the file `INSTALL'. | |||
Report bugs to <bug-automake@gnu.org>. | |||
EOF | |||
exit $? | |||
;; | |||
-v | --v*) | |||
echo "compile $scriptversion" | |||
exit $? | |||
;; | |||
esac | |||
ofile= | |||
cfile= | |||
eat= | |||
for arg | |||
do | |||
if test -n "$eat"; then | |||
eat= | |||
else | |||
case $1 in | |||
-o) | |||
# configure might choose to run compile as `compile cc -o foo foo.c'. | |||
# So we strip `-o arg' only if arg is an object. | |||
eat=1 | |||
case $2 in | |||
*.o | *.obj) | |||
ofile=$2 | |||
;; | |||
*) | |||
set x "$@" -o "$2" | |||
shift | |||
;; | |||
esac | |||
;; | |||
*.c) | |||
cfile=$1 | |||
set x "$@" "$1" | |||
shift | |||
;; | |||
*) | |||
set x "$@" "$1" | |||
shift | |||
;; | |||
esac | |||
fi | |||
shift | |||
done | |||
if test -z "$ofile" || test -z "$cfile"; then | |||
# If no `-o' option was seen then we might have been invoked from a | |||
# pattern rule where we don't need one. That is ok -- this is a | |||
# normal compilation that the losing compiler can handle. If no | |||
# `.c' file was seen then we are probably linking. That is also | |||
# ok. | |||
exec "$@" | |||
fi | |||
# Name of file we expect compiler to create. | |||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` | |||
# Create the lock directory. | |||
# Note: use `[/.-]' here to ensure that we don't use the same name | |||
# that we are using for the .o file. Also, base the name on the expected | |||
# object file name, since that is what matters with a parallel build. | |||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d | |||
while true; do | |||
if mkdir "$lockdir" >/dev/null 2>&1; then | |||
break | |||
fi | |||
sleep 1 | |||
done | |||
# FIXME: race condition here if user kills between mkdir and trap. | |||
trap "rmdir '$lockdir'; exit 1" 1 2 15 | |||
# Run the compile. | |||
"$@" | |||
ret=$? | |||
if test -f "$cofile"; then | |||
mv "$cofile" "$ofile" | |||
elif test -f "${cofile}bj"; then | |||
mv "${cofile}bj" "$ofile" | |||
fi | |||
rmdir "$lockdir" | |||
exit $ret | |||
# Local Variables: | |||
# mode: shell-script | |||
# sh-indentation: 2 | |||
# eval: (add-hook 'write-file-hooks 'time-stamp) | |||
# time-stamp-start: "scriptversion=" | |||
# time-stamp-format: "%:y-%02m-%02d.%02H" | |||
# time-stamp-end: "$" | |||
# End: |
@ -0,0 +1,191 @@ | |||
#!/usr/bin/env perl | |||
# this script patches a config.status file, to use our own perl script | |||
# in the main loop | |||
# we do it this way to circumvent hacking (and thereby including) | |||
# autoconf function (which are GPL) into our LGPL acinclude.m4.in | |||
# written by Michael Matz <matz@kde.org> | |||
# adapted by Dirk Mueller <mueller@kde.org> | |||
# | |||
# This file is free software; you can redistribute it and/or | |||
# modify it under the terms of the GNU Library General Public | |||
# License as published by the Free Software Foundation; either | |||
# version 2 of the License, or (at your option) any later version. | |||
# This library is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
# Library General Public License for more details. | |||
# You should have received a copy of the GNU Library General Public License | |||
# along with this library; see the file COPYING.LIB. If not, write to | |||
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
# Boston, MA 02110-1301, USA. | |||
# we have to change two places | |||
# 1. the splitting of the substitutions into chunks of 90 (or even 48 in | |||
# later autoconf's | |||
# 2. the big main loop which patches all Makefile.in's | |||
use strict; | |||
use File::Basename; | |||
my $ac_aux_dir = dirname($0); | |||
my ($flag); | |||
my $ac_version = 0; | |||
my $vpath_seen = 0; | |||
$flag = 0; | |||
while (<>) { | |||
# usage of $flag: 0 -- we have seen nothing yet | |||
# 1 -- we are in (1) | |||
# 2 -- we have ended (1) | |||
# 3 -- we are in (2) | |||
# 4 -- we ended (2) | |||
if ($flag == 4) { | |||
print; | |||
} elsif ($flag == 0) { | |||
# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..." | |||
# ends with (excluding) "CONFIG_FILE=..." | |||
# in later autoconf (2.14.1) there is no CONFIG_FILES= line, | |||
# but instead the (2) directly follow (1) | |||
if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) { | |||
$flag = 1; | |||
if ($1 eq 'lines') { | |||
# lets hope its different with 2141, | |||
# wasn't able to verify that | |||
if ($2 eq '48') { | |||
$ac_version = 250; | |||
} | |||
else { | |||
$ac_version = 2141; | |||
} | |||
} elsif ($1 eq 'cmds') { | |||
$ac_version = 213; | |||
} | |||
# hmm, we don't know the autoconf version, but we try anyway | |||
} else { | |||
print; | |||
} | |||
} elsif ($flag == 1) { | |||
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) { | |||
print; | |||
$flag = 2; | |||
} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) { | |||
$flag = 3; | |||
} | |||
} elsif ($flag == 2) { | |||
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1)) | |||
# end with: "rm -f conftest.s\*" | |||
# on autoconf 250, it ends with '# CONFIG_HEADER section' | |||
# | |||
# gg: if a post-processing commands section is found first, | |||
# stop there and insert a new loop to honor the case/esac. | |||
# (pattern: /^\s+#\sRun the commands associated with the file./) | |||
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) { | |||
$flag = 3; | |||
} else { | |||
print; | |||
} | |||
} elsif ($flag == 3) { | |||
if (/^\s*rm\s+-f\s+conftest/ ) { | |||
$flag = 4; | |||
&insert_main_loop(); | |||
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) { | |||
$flag = 4; | |||
&insert_main_loop(); | |||
#die "hhhhhhh"; | |||
if ($ac_version != 2141) { | |||
print STDERR "hmm, don't know autoconf version\n"; | |||
} | |||
} elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) { | |||
$flag = 4; | |||
my $commands = defined $2; | |||
&insert_main_loop(); | |||
$commands && insert_command_loop(); | |||
if($ac_version != 250) { | |||
print STDERR "hmm, something went wrong :-(\n"; | |||
} | |||
} elsif (/VPATH/ ) { | |||
$vpath_seen = 1; | |||
} | |||
} | |||
} | |||
die "wrong input (flag != 4)" unless $flag == 4; | |||
print STDERR "hmm, don't know autoconf version\n" unless $ac_version; | |||
sub insert_main_loop { | |||
if ($ac_version == 250) { | |||
&insert_main_loop_250(); | |||
} | |||
else { | |||
&insert_main_loop_213(); | |||
} | |||
} | |||
sub insert_main_loop_250 { | |||
print <<EOF; | |||
#echo Doing the fast build of Makefiles -- autoconf $ac_version | |||
EOF | |||
if ($vpath_seen) { | |||
print <<EOF; | |||
# VPATH subst was seen in original config.status main loop | |||
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >>\$tmp/subs.sed | |||
EOF | |||
} | |||
print <<EOF; | |||
rm -f \$tmp/subs.files | |||
for ac_file in .. \$CONFIG_FILES ; do | |||
if test "x\$ac_file" != x..; then | |||
echo \$ac_file >> \$tmp/subs.files | |||
fi | |||
done | |||
if test -f \$tmp/subs.files ; then | |||
perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL" | |||
fi | |||
rm -f \$tmp/subs.files | |||
fi | |||
EOF | |||
return; | |||
} | |||
sub insert_main_loop_213 { | |||
print <<EOF; | |||
#echo Doing the fast build of Makefiles -- autoconf $ac_version | |||
if test "x\$ac_cs_root" = "x" ; then | |||
ac_cs_root=conftest | |||
fi | |||
EOF | |||
if ($vpath_seen) { | |||
print <<EOF; | |||
# VPATH subst was seen in original config.status main loop | |||
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >> \$ac_cs_root.subs | |||
EOF | |||
} | |||
print <<EOF; | |||
rm -f \$ac_cs_root.sacfiles | |||
for ac_file in .. \$CONFIG_FILES ; do | |||
if test "x\$ac_file" != x..; then | |||
echo \$ac_file >> \$ac_cs_root.sacfiles | |||
fi | |||
done | |||
if test -f \$ac_cs_root.sacfiles ; then | |||
perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL" | |||
fi | |||
rm -f \$ac_cs_root.s* | |||
EOF | |||
return; | |||
} | |||
sub insert_command_loop { | |||
print <<EOF; | |||
for ac_file in .. \$CONFIG_FILES ; do | |||
EOF | |||
} |
@ -0,0 +1,238 @@ | |||
#!/usr/bin/env perl | |||
# a script for use by autoconf to make the Makefiles | |||
# from the Makefile.in's | |||
# | |||
# the original autoconf mechanism first splits all substitutions into groups | |||
# of ca. 90, and than invokes sed for _every_ Makefile.in and every group | |||
# (so around 2-3 times per Makefile.in). So this takes forever, as sed | |||
# has to recompile the regexps every time. | |||
# | |||
# this script does better. It changes all Makefile.ins in one process. | |||
# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec! | |||
# | |||
# written by Michael Matz <matz@kde.org> | |||
# adapted by Dirk Mueller <mueller@kde.org> | |||
# This file is free software; you can redistribute it and/or | |||
# modify it under the terms of the GNU Library General Public | |||
# License as published by the Free Software Foundation; either | |||
# version 2 of the License, or (at your option) any later version. | |||
# This library is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
# Library General Public License for more details. | |||
# You should have received a copy of the GNU Library General Public License | |||
# along with this library; see the file COPYING.LIB. If not, write to | |||
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
# Boston, MA 02110-1301, USA. | |||
use strict; | |||
use File::Path; | |||
my $ac_subs=$ARGV[0]; | |||
my $ac_sacfiles = $ARGV[1]; | |||
my $ac_given_srcdir=$ARGV[2]; | |||
my $ac_given_INSTALL=$ARGV[3]; | |||
my @comp_match; | |||
my @comp_subs; | |||
#print "ac_subs=$ac_subs\n"; | |||
#print "ac_sacfiles=$ac_sacfiles\n"; | |||
#print "ac_given_srcdir=$ac_given_srcdir\n"; | |||
#print "ac_given_INSTALL=$ac_given_INSTALL\n"; | |||
my $configure_input; | |||
my ($srcdir, $top_srcdir); | |||
my $INSTALL; | |||
my $bad_perl = ($] < 5.005); | |||
my $created_file_count = 0; | |||
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!"; | |||
my @subs = <CF>; | |||
my $pat; | |||
close(CF); | |||
chomp @subs; | |||
@comp_match=(); | |||
@comp_subs=(); | |||
if ($bad_perl) { | |||
print "Using perl older than version 5.005\n"; | |||
foreach $pat (@subs) { | |||
if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ ) | |||
|| ($pat =~ m/s%([^%]*)%([^%]*)%;t/ ) | |||
|| ($pat =~ m/s,([^,]*),(.*),;t/) | |||
|| ($pat =~ m%s/([^/]*)/([^/]*)/g% ) | |||
|| ($pat =~ m%s/([^/]*)/([^/]*)/;t% ) | |||
) { | |||
# form : s%bla%blubb%g | |||
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?) | |||
# or s,bla,blubb,;t t (autoconf 2.52) | |||
my $srch = $1; | |||
my $repl = $2; | |||
$repl =~ s/\\(.)/$1/g; | |||
push @comp_subs, make_closure($srch, $repl); | |||
} elsif ( ($pat =~ /%([^%]*)%d/ ) | |||
|| ($pat =~ m%/([^/]*)/d% ) | |||
) { | |||
push @comp_subs, make_closure($1, ""); | |||
} else { | |||
die "Uhh. Malformed pattern in $ac_subs ($pat)" | |||
unless ( $pat =~ /^\s*$/ ); # ignore white lines | |||
} | |||
} | |||
} else { | |||
foreach $pat (@subs) { | |||
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) || | |||
($pat =~ /s%([^%]*)%([^%]*)%;t/ ) || | |||
($pat =~ /s,([^,]*),(.*),;t/) ) { | |||
# form : s%bla%blubb%g | |||
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?) | |||
# or s,bla,blubb,;t t (autoconf 2.52) | |||
my $srch = $1; | |||
my $repl = $2; | |||
push @comp_match, eval "qr/\Q$srch\E/"; # compile match pattern | |||
$repl =~ s/\\(.)/$1/g; | |||
push @comp_subs, $repl; | |||
} elsif ( ($pat =~ /%([^%]*)%d/ ) | |||
|| ($pat =~ m%/([^/]*)/d% ) | |||
) { | |||
push @comp_match, eval "qr/\Q$1\E/"; | |||
push @comp_subs, ""; | |||
} else { | |||
die "Uhh. Malformed pattern in $ac_subs ($pat)" | |||
unless ( $pat =~ /^\s*$/ ); # ignore white lines | |||
} | |||
} | |||
} | |||
undef @subs; | |||
# read the list of files to be patched, form: | |||
# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile | |||
open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!"; | |||
my @ac_files = <CF>; | |||
close(CF); | |||
chomp @ac_files; | |||
my $ac_file; | |||
foreach $ac_file (@ac_files) { | |||
next if $ac_file =~ /\.\./; | |||
next if $ac_file =~ /^\s*$/; | |||
my $ac_file_in; | |||
my ($ac_dir, $ac_dots, $ac_dir_suffix); | |||
if ($ac_file =~ /.*:.*/ ) { | |||
($ac_file_in = $ac_file) =~ s%[^:]*:%%; | |||
$ac_file =~ s%:.*%%; | |||
} else { | |||
$ac_file_in = $ac_file.".in"; | |||
} | |||
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |||
# Remove last slash and all that follows it. Not all systems have dirname. | |||
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%; | |||
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) { | |||
# The file is in a subdirectory. | |||
if (! -d "$ac_dir") { mkpath "$ac_dir", 0, 0777; } | |||
($ac_dir_suffix = $ac_dir) =~ s%^./%%; | |||
$ac_dir_suffix="/".$ac_dir_suffix; | |||
# A "../" for each directory in $ac_dir_suffix. | |||
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g; | |||
} else { | |||
$ac_dir_suffix=""; | |||
$ac_dots=""; | |||
} | |||
if ($ac_given_srcdir eq ".") { | |||
$srcdir="."; | |||
if ($ac_dots) { | |||
( $top_srcdir = $ac_dots) =~ s%/$%%; | |||
} else { $top_srcdir="."; } | |||
} elsif ($ac_given_srcdir =~ m%^/%) { | |||
$srcdir=$ac_given_srcdir.$ac_dir_suffix; | |||
$top_srcdir = $ac_given_srcdir; | |||
} else { | |||
$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix; | |||
$top_srcdir = $ac_dots.$ac_given_srcdir; | |||
} | |||
if ($ac_given_INSTALL) { | |||
if ($ac_given_INSTALL =~ m%^/% ) { | |||
$INSTALL = $ac_given_INSTALL; | |||
} else { | |||
$INSTALL = $ac_dots.$ac_given_INSTALL; | |||
} | |||
} | |||
print "fast creating $ac_file\n"; | |||
unlink $ac_file; | |||
my $ac_comsub=""; | |||
my $fname=$ac_file_in; | |||
$fname =~ s%.*/%%; | |||
$configure_input="$ac_file. Generated from $fname by config.pl."; | |||
my $ac_file_inputs; | |||
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%; | |||
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g; | |||
patch_file($ac_file, $ac_file_inputs); | |||
++$created_file_count; | |||
} | |||
print "config.pl: fast created $created_file_count file(s).\n"; | |||
sub patch_file { | |||
my ($outf, $infiles) = @_; | |||
my $filedata; | |||
my @infiles=split(' ', $infiles); | |||
my $i=0; | |||
my $name; | |||
foreach $name (@infiles) { | |||
if (open(CF, "< $name")) { | |||
while (<CF>) { | |||
$filedata .= $_; | |||
} | |||
close(CF); | |||
} else { | |||
print STDERR "can't open $name: $!"."\n"; | |||
} | |||
} | |||
$filedata =~ s%\@configure_input\@%$configure_input%g; | |||
$filedata =~ s%\@srcdir\@%$srcdir%g; | |||
$filedata =~ s%\@top_srcdir\@%$top_srcdir%g; | |||
$filedata =~ s%\@INSTALL\@%$INSTALL%g; | |||
if ($bad_perl) { | |||
while ($i <= $#comp_subs) { | |||
my $ref = $comp_subs[$i]; | |||
&$ref(\$filedata); | |||
$i++; | |||
} | |||
} else { | |||
while ($i <= $#comp_match) { | |||
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g; | |||
$i++; | |||
} | |||
} | |||
open(CF, "> $outf") || die "can't create $outf: $!"; | |||
print CF $filedata; | |||
close(CF); | |||
} | |||
sub make_closure { | |||
my ($pat, $sub) = @_; | |||
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }"; | |||
if ($@) { | |||
print "can't create CODE: $@\n"; | |||
} | |||
return $ret; | |||
} |
@ -0,0 +1,45 @@ | |||
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure | |||
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then | |||
# And if so, warn when they don't match | |||
if test "$kde_libs_prefix" != "$given_prefix"; then | |||
# And if kde doesn't know about the prefix yet | |||
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null | |||
if test $? -ne 0; then | |||
echo "" | |||
echo "Warning: you chose to install this package in $given_prefix," | |||
echo "but KDE was found in $kde_libs_prefix." | |||
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring" | |||
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix" | |||
echo "Then restart KDE." | |||
echo "" | |||
fi | |||
fi | |||
fi | |||
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then | |||
echo "" | |||
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility" | |||
echo "was not included. Therefore, GCC symbol visibility support remains disabled." | |||
echo "" | |||
echo "For better performance, consider including the Qt visibility supporting patch" | |||
echo "located at:" | |||
echo "" | |||
echo "http://bugs.kde.org/show_bug.cgi?id=109386" | |||
echo "" | |||
echo "and recompile all of Qt and KDE. Note, this is entirely optional and" | |||
echo "everything will continue to work just fine without it." | |||
echo "" | |||
fi | |||
if test "$all_tests" = "bad"; then | |||
if test ! "$cache_file" = "/dev/null"; then | |||
echo "" | |||
echo "Please remove the file $cache_file after changing your setup" | |||
echo "so that configure will find the changes next time." | |||
echo "" | |||
fi | |||
else | |||
echo "" | |||
echo "Good - your configure finished. Start make now" | |||
echo "" | |||
fi |
@ -0,0 +1,57 @@ | |||
dnl This file is part of the KDE libraries/packages | |||
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org) | |||
dnl This file is free software; you can redistribute it and/or | |||
dnl modify it under the terms of the GNU Library General Public | |||
dnl License as published by the Free Software Foundation; either | |||
dnl version 2 of the License, or (at your option) any later version. | |||
dnl This library is distributed in the hope that it will be useful, | |||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
dnl Library General Public License for more details. | |||
dnl You should have received a copy of the GNU Library General Public License | |||
dnl along with this library; see the file COPYING.LIB. If not, write to | |||
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
dnl Boston, MA 02110-1301, USA. | |||
# Original Author was Kalle@kde.org | |||
# I lifted it in some mater. (Stephan Kulow) | |||
# I used much code from Janos Farkas | |||
dnl Process this file with autoconf to produce a configure script. | |||
AC_INIT(acinclude.m4) dnl a source file from your sub dir | |||
dnl This is so we can use kde-common | |||
AC_CONFIG_AUX_DIR(admin) | |||
dnl This ksh/zsh feature conflicts with `cd blah ; pwd` | |||
unset CDPATH | |||
dnl Checking host/target/build systems, for make, install etc. | |||
AC_CANONICAL_SYSTEM | |||
dnl Perform program name transformation | |||
AC_ARG_PROGRAM | |||
dnl Automake doc recommends to do this only here. (Janos) | |||
AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs | |||
KDE_SET_PREFIX | |||
dnl generate the config header | |||
AM_CONFIG_HEADER(config.h) dnl at the distribution this done | |||
dnl Checks for programs. | |||
AC_CHECK_COMPILERS | |||
AC_ENABLE_SHARED(yes) | |||
AC_ENABLE_STATIC(no) | |||
KDE_PROG_LIBTOOL | |||
dnl for NLS support. Call them in this order! | |||
dnl WITH_NLS is for the po files | |||
AM_KDE_WITH_NLS | |||
dnl KDE_USE_QT | |||
AC_PATH_KDE |
@ -0,0 +1,661 @@ | |||
#! /bin/sh | |||
# | |||
# cvs.sh | |||
# | |||
# This file contains support code from Makefile.common | |||
# It defines a shell function for each known target | |||
# and then does a case to call the correct function. | |||
unset MAKEFLAGS | |||
call_and_fix_autoconf() | |||
{ | |||
$AUTOCONF || exit 1 | |||
if test -r configure.in.in ; then | |||
perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\ | |||
\\n perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\ | |||
\\\\\\n || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\ | |||
\\n rm -f \\\$CONFIG_STATUS.bak\\nfi\ | |||
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure | |||
fi | |||
} | |||
strip_makefile() | |||
{ | |||
if test ! -f $makefile_wo; then | |||
perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo | |||
fi | |||
} | |||
check_autotool_versions() | |||
{ | |||
required_autoconf_version="2.53 or newer" | |||
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1` | |||
case $AUTOCONF_VERSION in | |||
Autoconf*2.5* | autoconf*2.5* | autoconf*2.6* ) : ;; | |||
"" ) | |||
echo "*** AUTOCONF NOT FOUND!." | |||
echo "*** KDE requires autoconf $required_autoconf_version" | |||
exit 1 | |||
;; | |||
* ) | |||
echo "*** YOU'RE USING $AUTOCONF_VERSION." | |||
echo "*** KDE requires autoconf $required_autoconf_version" | |||
exit 1 | |||
;; | |||
esac | |||
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1` | |||
case $AUTOHEADER_VERSION in | |||
Autoconf*2.5* | autoheader*2.5* | autoheader*2.6* ) : ;; | |||
"" ) | |||
echo "*** AUTOHEADER NOT FOUND!." | |||
echo "*** KDE requires autoheader $required_autoconf_version" | |||
exit 1 | |||
;; | |||
* ) | |||
echo "*** YOU'RE USING $AUTOHEADER_VERSION." | |||
echo "*** KDE requires autoheader $required_autoconf_version" | |||
exit 1 | |||
;; | |||
esac | |||
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1` | |||
required_automake_version="1.6.1 or newer" | |||
case $AUTOMAKE_STRING in | |||
automake*1.5d* | automake*1.5* | automake*1.5-* ) | |||
echo "*** YOU'RE USING $AUTOMAKE_STRING." | |||
echo "*** KDE requires automake $required_automake_version" | |||
exit 1 | |||
;; | |||
automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10*) | |||
echo "*** $AUTOMAKE_STRING found." | |||
UNSERMAKE=no | |||
;; | |||
"" ) | |||
echo "*** AUTOMAKE NOT FOUND!." | |||
echo "*** KDE requires automake $required_automake_version" | |||
exit 1 | |||
;; | |||
*unsermake* ) : | |||
echo "*** YOU'RE USING UNSERMAKE." | |||
echo "*** GOOD LUCK!! :)" | |||
UNSERMAKE=unsermake | |||
;; | |||
* ) | |||
echo "*** YOU'RE USING $AUTOMAKE_STRING." | |||
echo "*** KDE requires automake $required_automake_version" | |||
exit 1 | |||
;; | |||
esac | |||
unset required_automake_version | |||
} | |||
cvs() | |||
{ | |||
check_autotool_versions | |||
acinclude_m4 | |||
### Make new subdirs and configure.in. | |||
### The make calls could be optimized away here, | |||
### with a little thought. | |||
if test -r configure.in.in; then | |||
rm -f configure.in | |||
echo "*** Creating list of subdirectories" | |||
create_subdirs | |||
if test -r Makefile.am.in; then | |||
echo "*** Creating Makefile.am" | |||
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1 | |||
else | |||
Makefile_am | |||
fi | |||
fi | |||
configure_files | |||
echo "*** Creating configure.in" | |||
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1 | |||
else | |||
configure_in | |||
fi | |||
fi | |||
echo "*** Creating aclocal.m4" | |||
$ACLOCAL $ACLOCALFLAGS || exit 1 | |||
echo "*** Creating configure" | |||
call_and_fix_autoconf | |||
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then | |||
echo "*** Creating config.h template" | |||
$AUTOHEADER || exit 1 | |||
touch config.h.in | |||
fi | |||
echo "*** Creating Makefile templates" | |||
$AUTOMAKE || exit 1 | |||
if test "$UNSERMAKE" = no; then | |||
echo "*** Postprocessing Makefile templates" | |||
perl -w admin/am_edit || exit 1 | |||
fi | |||
if egrep "^cvs-local:" $makefile_am >/dev/null; then \ | |||
strip_makefile | |||
$MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1 | |||
fi | |||
echo "*** Creating date/time stamp" | |||
touch stamp-h.in | |||
echo "*** Finished" | |||
echo " Don't forget to run ./configure" | |||
echo " If you haven't done so in a while, run ./configure --help" | |||
} | |||
dist() | |||
{ | |||
check_autotool_versions | |||
### | |||
### First build all of the files necessary to do just "make" | |||
### | |||
acinclude_m4 | |||
if test -r configure.in.in; then | |||
rm -f configure.in | |||
create_subdirs | |||
if test -r Makefile.am.in; then | |||
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1 | |||
else | |||
Makefile_am | |||
fi | |||
fi | |||
configure_files | |||
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1 | |||
else | |||
configure_in | |||
fi | |||
fi | |||
$ACLOCAL $ACLOCALFLAGS | |||
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then | |||
echo "*** Creating config.h template" | |||
$AUTOHEADER || exit 1 | |||
touch config.h.in | |||
fi | |||
$AUTOMAKE --foreign || exit 1 | |||
if test "$UNSERMAKE" = no; then | |||
echo "*** Postprocessing Makefile templates" | |||
perl -w admin/am_edit || exit 1 | |||
fi | |||
call_and_fix_autoconf | |||
touch stamp-h.in | |||
if grep "^cvs-local:" $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo cvs-local top_srcdir=. | |||
fi | |||
### | |||
### Then make messages | |||
### | |||
if test -d po; then | |||
LIST=`find ./po -name "*.po"` | |||
for i in $LIST; do | |||
file2=`echo $i | sed -e "s#\.po#\.gmo#"` | |||
msgfmt -o $file2 $i || touch $file2 | |||
done | |||
fi | |||
if grep "^cvs-dist-local:" $makefile_am >/dev/null; then | |||
strip_makefile | |||
$MAKE -f $makefile_wo cvs-dist-local top_srcdir=. | |||
fi | |||
} | |||
subdir_dist() | |||
{ | |||
$ACLOCAL $ACLOCALFLAGS | |||
$AUTOHEADER | |||
touch config.h.in | |||
$AUTOMAKE | |||
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1` | |||
case $AUTOMAKE_STRING in | |||
*unsermake* ) : | |||
;; | |||
*) | |||
perl -w ../admin/am_edit --path=../admin | |||
esac | |||
call_and_fix_autoconf | |||
touch stamp-h.in | |||
} | |||
configure_in() | |||
{ | |||
rm -f configure.in configure.in.new | |||
kde_use_qt_param= | |||
test -f configure.files || { echo "need configure.files for configure.in"; exit 1; } | |||
list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"` | |||
: > configure.in.new | |||
for file in $list; do | |||
echo "dnl =======================================================" >> configure.in.new | |||
echo "dnl FILE: $file" >> configure.in.new | |||
echo "dnl =======================================================" >> configure.in.new | |||
echo "" >> configure.in.new | |||
cat $file >> configure.in.new | |||
done | |||
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new | |||
if test -f Makefile.am.in; then | |||
subdirs=`cat subdirs` | |||
for dir in $subdirs; do | |||
vdir=`echo $dir | sed -e 's,[-+.@],_,g'` | |||
echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new | |||
if test -f "$dir/configure.in"; then | |||
echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new | |||
echo " AC_CONFIG_SUBDIRS($dir)" >> configure.in.new | |||
echo "fi" >> configure.in.new | |||
fi | |||
done | |||
fi | |||
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new | |||
if test -f inst-apps; then | |||
topleveldirs=`cat inst-apps` | |||
else | |||
topleveldirs= | |||
for dir in `ls -1d * | sort`; do | |||
if test "$dir" != "debian" && test -d $dir; then | |||
topleveldirs="$topleveldirs $dir" | |||
fi | |||
done | |||
fi | |||
for topleveldir in $topleveldirs; do | |||
if test -f $topleveldir/configure.in; then | |||
continue | |||
fi | |||
if test -f $topleveldir/Makefile.am; then :; else | |||
continue | |||
fi | |||
mfs=`find $topleveldir -follow -name Makefile.am -print | fgrep -v "/." | \ | |||
sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'` | |||
for i in $mfs; do | |||
echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new | |||
done | |||
done | |||
files=`cat configure.files` | |||
list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"` | |||
for file in $list; do | |||
echo "AC_CONFIG_FILES([ $file ])" >> configure.in.new | |||
done | |||
midfiles=`cat configure.files | fgrep "configure.in.mid"` | |||
test -n "$midfiles" && cat $midfiles >> configure.in.new | |||
echo "AC_OUTPUT" >> configure.in.new | |||
modulename= | |||
if test -f configure.in.in; then | |||
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then | |||
kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"` | |||
fi | |||
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then | |||
line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in` | |||
if test -n "$line"; then | |||
modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"` | |||
VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"` | |||
fi | |||
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \ | |||
configure.in.new > configure.in && mv configure.in configure.in.new | |||
fi | |||
fi | |||
if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then | |||
VERSION="\"3.5.10\"" | |||
fi | |||
if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then | |||
modulename=`pwd`; | |||
modulename=`basename $modulename` | |||
esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"` | |||
modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"` | |||
fi | |||
if test -n "$kde_use_qt_param"; then | |||
sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \ | |||
configure.in.new > configure.in && mv configure.in configure.in.new | |||
fi | |||
sed -e "s#@MODULENAME@#$modulename#" configure.in.new | | |||
sed -e "s#@VERSION@#$VERSION#" > configure.in | |||
botfiles=`cat configure.files | egrep "configure.in.bot"` | |||
test -n "$botfiles" && cat $botfiles >> configure.in | |||
cat $admindir/configure.in.bot.end >> configure.in | |||
rm -f configure.in.new | |||
} | |||
configure_files() | |||
{ | |||
echo "*** Creating configure.files" | |||
admindir=NO | |||
for i in . .. ../.. ../../..; do | |||
if test -x $i/admin; then admindir=$i/admin; break; fi | |||
done | |||
rm -f configure.files | |||
touch configure.files | |||
if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then | |||
echo $admindir/configure.in.min >> configure.files | |||
fi | |||
test -f configure.in.in && echo configure.in.in >> configure.files | |||
# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs | |||
if test -f inst-apps; then | |||
inst=`cat inst-apps` | |||
list="" | |||
for i in $inst; do | |||
list="$list `find $i/ -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \ | |||
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`" | |||
done | |||
else | |||
list=`find . -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \ | |||
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"` | |||
fi | |||
for i in $list; do if test -f $i && test `dirname $i` != "." ; then | |||
echo $i >> configure.files | |||
fi; done | |||
test -f configure.in.mid && echo configure.in.mid >> configure.files | |||
test -f configure.in.bot && echo configure.in.bot >> configure.files | |||
if test ! -s configure.files; then | |||
echo "There are no files to build a configure. Please check your checkout." | |||
exit 1 | |||
fi | |||
} | |||
create_subdirs() | |||
{ | |||
if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then | |||
# as many modules contain rules to create subdirs without any | |||
# dependencies make won't create it unless there is no file. | |||
# so we check if that's a dummy rule or one that works | |||
rm -f subdirs.cvs.sh.$$ | |||
if test -f subdirs; then | |||
mv subdirs subdirs.cvs.sh.$$ | |||
fi | |||
strip_makefile | |||
$MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1 | |||
if test -f subdirs.cvs.sh.$$; then | |||
if test -s subdirs; then | |||
rm subdirs.cvs.sh.$$ | |||
else | |||
mv subdirs.cvs.sh.$$ subdirs | |||
fi | |||
fi | |||
else | |||
subdirs | |||
fi | |||
} | |||
subdirs() | |||
{ | |||
dirs= | |||
idirs= | |||
if test -f inst-apps; then | |||
idirs=`cat inst-apps` | |||
else | |||
idirs=`ls -1 | sort` | |||
fi | |||
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1` | |||
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1` | |||
for i in $idirs; do | |||
if test -f $i/Makefile.am; then | |||
case " $compilefirst $compilelast " in | |||
*" $i "*) ;; | |||
*) dirs="$dirs $i" | |||
esac | |||
fi | |||
done | |||
: > ./_SUBDIRS | |||
for d in $compilefirst; do | |||
echo $d >> ./_SUBDIRS | |||
done | |||
(for d in $dirs; do | |||
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1` | |||
for s in $list; do | |||
echo $s $d | |||
done | |||
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1` | |||
for s in $list; do | |||
echo $d $s | |||
done | |||
echo $d $d | |||
done ) | tsort >> ./_SUBDIRS | |||
for d in $compilelast; do | |||
echo $d >> ./_SUBDIRS | |||
done | |||
if test -r subdirs && cmp -s subdirs _SUBDIRS; then | |||
rm -f _SUBDIRS | |||
fi | |||
test -r _SUBDIRS && mv _SUBDIRS subdirs || true | |||
} | |||
Makefile_am() | |||
{ | |||
if test -f Makefile.am.in; then | |||
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1` | |||
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1` | |||
idirs= | |||
dirs= | |||
if test -f inst-apps; then | |||
idirs=`cat inst-apps` | |||
else | |||
idirs=`cat subdirs` | |||
fi | |||
for i in $idirs; do | |||
case " $compilefirst $compilelast " in | |||
*" $i "*) ;; | |||
*) dirs="$dirs $i" | |||
esac | |||
done | |||
adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'` | |||
if echo "$adds" | fgrep "*" >/dev/null ; then | |||
adds=`ls -d -1 $adds 2>/dev/null` | |||
fgrep -v '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds | |||
str='$(top_srcdir)/acinclude.m4:' | |||
for add in $adds; do | |||
str="$str \$(top_srcdir)/$add" | |||
done | |||
echo $str >> Makefile.am.in.adds | |||
else | |||
cat Makefile.am.in > Makefile.am.in.adds | |||
fi | |||
cat Makefile.am.in.adds | \ | |||
sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \ | |||
sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am | |||
echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am | |||
rm Makefile.am.in.adds | |||
fi | |||
} | |||
acinclude_m4() | |||
{ | |||
echo "*** Creating acinclude.m4" | |||
adds= | |||
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then | |||
strip_makefile | |||
rm -f acinclude.m4 | |||
adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'` | |||
if echo $adds | fgrep "*" >/dev/null ; then | |||
adds=`ls -d -1 $adds 2>/dev/null` | |||
else | |||
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1 | |||
fi | |||
else | |||
rm -f acinclude.m4 | |||
fi | |||
# if it wasn't created up to now, then we do it better | |||
if test ! -f acinclude.m4; then | |||
cat admin/acinclude.m4.in admin/libtool.m4.in admin/pkg.m4.in $adds > acinclude.m4 | |||
fi | |||
} | |||
package_merge() | |||
{ | |||
catalogs=$POFILES | |||
for cat in $catalogs; do | |||
msgmerge -o $cat.new $cat $PACKAGE.pot | |||
if test -s $cat.new; then | |||
grep -v "\"POT-Creation" $cat.new > $cat.new.2 | |||
grep -v "\"POT-Creation" $cat >> $cat.new.1 | |||
if diff $cat.new.1 $cat.new.2; then | |||
rm $cat.new | |||
else | |||
mv $cat.new $cat | |||
fi | |||
rm -f $cat.new.1 $cat.new.2 | |||
fi | |||
done | |||
} | |||
extract_messages() | |||
{ | |||
podir=${podir:-$PWD/po} | |||
files=`find . -name Makefile.am | xargs egrep -l '^messages:' ` | |||
dirs=`for i in $files; do echo \`dirname $i\`; done` | |||
tmpname="$PWD/messages.log" | |||
if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi | |||
if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi | |||
export EXTRACTRC PREPARETIPS | |||
for subdir in $dirs; do | |||
test -z "$VERBOSE" || echo "Making messages in $subdir" | |||
(cd $subdir | |||
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then | |||
$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp | |||
else | |||
candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null` | |||
if test -n "$candidates"; then | |||
echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line" | |||
fi | |||
fi | |||
if find . -name \*.c\* -o -name \*.h\* | fgrep -v ".svn" | xargs fgrep -s -q KAboutData ; then | |||
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp | |||
else echo " " > _translatorinfo.cpp | |||
fi | |||
perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile | |||
kdepotpath=${includedir:-`kde-config --expandvars --install include`}/kde.pot | |||
if ! test -f $kdepotpath; then | |||
kdepotpath=`kde-config --expandvars --prefix`/include/kde.pot | |||
fi | |||
$MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" srcdir=. \ | |||
XGETTEXT="${XGETTEXT:-xgettext} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x $kdepotpath" messages | |||
exit_code=$? | |||
if test "$exit_code" != 0; then | |||
echo "make exit code: $exit_code" | |||
fi | |||
) 2>&1 | grep -v '^make\[1\]' > $tmpname | |||
test -s $tmpname && { echo $subdir ; cat "$tmpname"; } | |||
test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp | |||
rm -f $subdir/_translatorinfo.cpp | |||
rm -f $subdir/_transMakefile | |||
done | |||
rm -f $tmpname | |||
} | |||
package_messages() | |||
{ | |||
rm -rf po.backup | |||
mkdir po.backup | |||
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do | |||
egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i | |||
cat po/$i > po.backup/backup_$i | |||
touch -r po/$i po.backup/backup_$i | |||
rm po/$i | |||
done | |||
extract_messages | |||
for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do | |||
test -f po/$i || echo "disappeared: $i" | |||
done | |||
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do | |||
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i | |||
#msgmerge -q -o po/$i po/$i po/$i | |||
egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot | |||
if test -f po.backup/$i && ! cmp -s temp.pot po.backup/$i; then | |||
echo "will update $i" | |||
else | |||
if test -f po.backup/backup_$i; then | |||
test -z "$VERBOSE" || echo "I'm restoring $i" | |||
mv po.backup/backup_$i po/$i | |||
rm po.backup/$i | |||
else | |||
echo "will add $i" | |||
fi | |||
fi | |||
done | |||
rm -f temp.pot | |||
rm -rf po.backup | |||
} | |||
# Make sure that sorting is always done the same way | |||
LC_ALL=C | |||
export LC_ALL | |||
unset LANG || : | |||
unset LC_CTYPE || : | |||
unset LANGUAGE || : | |||
unset CDPATH || : | |||
admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'` | |||
test "x$admindir" = "x$0" && admindir=. | |||
test "x$MAKE" = x && MAKE=make | |||
makefile_am=Makefile.am | |||
makefile_wo=Makefile.am.wo | |||
if test -f Makefile.am.in; then | |||
makefile_am=Makefile.am.in | |||
makefile_wo=Makefile.am.in.wo | |||
rm -f $makefile_wo | |||
fi | |||
# Call script to find autoconf and friends. Uses eval since the script outputs | |||
# sh-compatible code. | |||
eval `$admindir/detect-autoconf.pl` | |||
### | |||
### Main | |||
### | |||
arg=`echo $1 | tr .- __` | |||
case $arg in | |||
cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \ | |||
cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 | extract_messages ) $arg ;; | |||
configure ) call_and_fix_autoconf ;; | |||
* ) echo "Usage: cvs.sh <target>" | |||
echo "Target can be one of:" | |||
echo " cvs svn dist" | |||
echo " configure.in configure.files" | |||
echo " package-merge package-messages" | |||
echo "" | |||
echo "Usage: anything but $1" | |||
exit 1 ;; | |||