[KBear-cvs] kbear/admin detect-autoconf.pl,NONE,1.1.2.1 doxygen.sh,NONE,1.1.2.1 Doxyfile.am,1.2,1.2.
Brought to you by:
kbjorn
Update of /cvsroot/kbear/kbear/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1539/admin Modified Files: Tag: KBEAR_2_BRANCH Doxyfile.am Doxyfile.global Makefile.common acinclude.m4.in am_edit bcheck.pl compile conf.change.pl config.guess config.pl config.sub configure.in.bot.end configure.in.min cvs-clean.pl cvs.sh debianrules depcomp detect-autoconf.sh install-sh libtool.m4.in ltmain.sh missing mkinstalldirs oldinclude.m4.in ylwrap Added Files: Tag: KBEAR_2_BRANCH detect-autoconf.pl doxygen.sh Log Message: Fixed bug that trashed the system tray --- NEW FILE: detect-autoconf.pl --- #!/usr/bin/env perl # Try to locate best version of auto* # By Michael Pyne <mic...@kd...> # # Copyright (c) 2005. # This code is public domain. You may use it however you like (including # relicensing). # Emulate the 'which' program. sub which { my $prog = shift; my @paths = split(/:/, $ENV{'PATH'}); for $path (@paths) { return "$path/$prog" if -x "$path/$prog"; } return ""; } # Subroutine to determine the highest installed version of the given program, # searching from the given paths. sub findBest { my ($program, @paths) = @_; my $best_version_found = '0'; # Deliberately a string. my %versions; my %minimumVersions = ( 'autoconf' => '2.5', 'automake' => '1.6', ); # Allow user to use environment variable to override search. return $ENV{uc $program} if $ENV{uc $program}; for $prefix (@paths) { @files = glob "$prefix/$program*"; for $file (@files) { # Don't check non-executable scripts. next unless -x $file; ($version) = $file =~ /$prefix\/$program-?(.*)$/; $version =~ s/-|\.//g; # Special case some programs to make sure it has a minimum version. if (not $version and exists $minimumVersions{$program}) { my $min_version = $minimumVersions{$program}; my $versionOutput = `$program --version 2>/dev/null | head -n 1`; # If we can't run the script to get the version it likely won't work later. next unless $versionOutput; # Use number.number for version (we don't need the excess in general). ($versionOutput) = ($versionOutput =~ /(\d\.\d)/); # Use lt to do lexicographical comparison of strings (which should be # equivalent and doesn't involve issues with floating point conversions). if (not $versionOutput or $versionOutput lt $min_version) { next; } } # If no version suffix then use it in favor of a versioned autotool # since the ever-popular WANT_AUTOFOO should then work (in theory). return $file unless $version; # Emulate 'which', and abort if we've already seen this version. next if exists $versions{$version}; # Save filename of program. $versions{$version} = $file; # Use string comparison so that e.g. 253a will be > 253 but < 254. if ($version gt $best_version_found) { $best_version_found = $version; } } } return $versions{$best_version_found}; } # Find an appropriate "which" program for later use by the shell script calling # us. sub findWhich { for $candidate ('type -p', 'which', 'type') { $test = `$candidate sh 2>/dev/null`; chomp $test; return $candidate if -x $test; } } # Uses which() to find a program unless the user provided its path in the # environment (the upper case program name is searched). sub findProgram { $suffix = ""; # For use if @_ has only one param. my ($program, $suffix) = @_; return $ENV{uc $program} if $ENV{uc $program}; return which("$program$suffix"); } # SCRIPT STARTS. # Search in path. @paths = split(/:/, $ENV{'PATH'}); # Make sure at least /usr/bin and /usr/local/bin are in this search. unshift @paths, '/usr/local/bin' unless grep $_ eq '/usr/local/bin', @paths; unshift @paths, '/usr/bin' unless grep $_ eq '/usr/bin', @paths; $autoconf = findBest('autoconf', @paths); ($autoconf_suffix) = $autoconf =~ /.*autoconf(.*)$/; # Find matching autoconf companions. $autoheader = findProgram('autoheader', $autoconf_suffix); $autom4te = findProgram('autom4te', $autoconf_suffix); # Get best automake, and look for unsermake to possibly override it. $automake = findBest('automake', @paths); $unsermake = ""; # backward compatible: if $UNSERMAKE points to a path, use it $unsermake = findProgram('unsermake') if (defined($ENV{'UNSERMAKE'}) and $ENV{'UNSERMAKE'} =~ /\//); # new compatible: if it says 'yes', use the one from path $unsermake = which('unsermake') if ($ENV{'UNSERMAKE'} ne 'no'); ($automake_suffix) = $automake =~ /.*automake(.*)$/; # Use unsermake if we found it. $automake = "$unsermake -c" if $unsermake; # Find matching automake companions. $aclocal = findProgram('aclocal', $automake_suffix); $which = findWhich(); # Make sure we have all of the needed programs. for $i (qw'autoconf autoheader autom4te automake aclocal') { unless(${$i}) { print "# Unable to find $i!!\n"; exit 1; } } # Print results in eval-able form. print <<EOF; AUTOCONF="$autoconf" AUTOHEADER="$autoheader" AUTOM4TE="$autom4te" AUTOMAKE="$automake" ACLOCAL="$aclocal" WHICH="$which" export AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE ACLOCAL WHICH EOF exit 0; --- NEW FILE: doxygen.sh --- #! /bin/sh # # doxygen.sh Copyright (C) 2005 by Adriaan de Groot # Based on some code from Doxyfile.am, among other things. # License: GPL version 2. # See file COPYING in kdelibs for details. echo "*** doxygen.sh" # Recurse handling is a little complicated, since normally # subdir (given on the command-line) processing doesn't recurse # but you can force it to do so. recurse=1 recurse_given=NO use_modulename=1 cleanup=YES while test -n "$1" ; do case "x$1" in "x--no-cleanup" ) cleanup=NO ;; "x--no-recurse" ) recurse=0 recurse_given=YES ;; "x--recurse" ) recurse=1 recurse_given=YES ;; "x--no-modulename" ) use_modulename=0 ;; "x--modulename" ) use_modulename=1 ;; "x--help" ) echo "doxygen.sh usage:" echo "doxygen.sh [--no-recurse] [--no-modulename] <srcdir> [<subdir>]" exit 2 ;; x--doxdatadir=* ) DOXDATA=`echo $1 | sed -e 's+--doxdatadir=++'` ;; x--installdir=*) PREFIX=`echo $1 | sed -e 's+--installdir=++'` ;; x--* ) echo "Unknown option: $1" exit 1 ;; * ) top_srcdir="$1" break ;; esac shift done ### Sanity check the mandatory "top srcdir" argument. if test -z "$top_srcdir" ; then echo "Usage: doxygen.sh <top_srcdir>" exit 1 fi if ! test -d "$top_srcdir" ; then echo "top_srcdir ($top_srcdir) is not a directory." exit 1 fi ### Normalize top_srcdir so it is an absolute path. if ! expr "x$top_srcdir" : "x/" > /dev/null ; then top_srcdir=`cd "$top_srcdir" 2> /dev/null && pwd` if ! test -d "$top_srcdir" ; then echo "top_srcdir ($top_srcdir) is not a directory." exit 1 fi fi ### Sanity check and guess QTDOCDIR. if test -z "$QTDOCDIR" ; then if test -z "$QTDIR" ; then for i in /usr/X11R6/share/doc/qt/html do QTDOCDIR="$i" test -d "$QTDOCDIR" && break done else for i in share/doc/qt/html doc/html do QTDOCDIR="$QTDIR/$i" test -d "$QTDOCDIR" && break done fi fi if test -z "$QTDOCDIR" || test \! -d "$QTDOCDIR" ; then if test -z "$QTDOCDIR" ; then echo "* QTDOCDIR could not be guessed." else echo "* QTDOCDIR does not name a directory." fi if test -z "$QTDOCTAG" ; then echo "* QTDOCDIR set to \"\"" QTDOCDIR="" else echo "* But I'll use $QTDOCDIR anyway because of QTDOCTAG." fi fi ### Get the "top srcdir", also its name, and handle the case that subdir "." ### is given (which would be top_srcdir then, so it's equal to none-given ### but no recursion either). ### # top_srcdir="$1" # Already set by options processing module_name=`basename "$top_srcdir"` subdir="$2" if test "x." = "x$subdir" ; then subdir="" if test "x$recurse_given" = "xNO" ; then recurse=0 fi fi if test "x" != "x$subdir" ; then # If no recurse option given explicitly, default to # no recurse when processing subdirs given on the command-line. if test "x$recurse_given" = "xNO" ; then recurse=0 fi fi if test -z "$DOXDATA" || test ! -d "$DOXDATA" ; then if test -n "$DOXDATA" ; then echo "* \$DOXDATA is '$DOXDATA' which does not name a directory" fi DOXDATA="$top_srcdir/doc/common" fi if ! test -d "$DOXDATA" ; then echo "* \$DOXDATA does not name a directory ( or is unset ), tried \"$DOXDATA\"" exit 1 fi if test -n "$PREFIX" && test ! -d "$PREFIX" ; then echo "* \$PREFIX does not name a directory, tried \"$PREFIX\"" echo "* \$PREFIX is disabled." PREFIX="" fi ### We need some values from top-level files, which ### are not preserved between invocations of this ### script, so factor it out for easy use. create_doxyfile_in() { eval `grep 'VERSION="' "$top_srcdir/admin/cvs.sh"` echo "PROJECT_NUMBER = $VERSION" > Doxyfile.in grep ^KDE_INIT_DOXYGEN "$top_srcdir/configure.in.in" | \ sed -e 's+[^[]*\[\([^]]*\)+PROJECT_NAME = "\1"+' \ -e 's+].*++' >> Doxyfile.in } apidoxdir="$module_name"-apidocs test "x$use_modulename" = "x0" && apidoxdir="apidocs" ### If we're making the top subdir, create the structure ### for the apidox and initialize it. Otherwise, just use the ### structure assumed to be there. if test -z "$subdir" ; then if ! test -d "$apidoxdir" ; then mkdir "$apidoxdir" > /dev/null 2>&1 fi if ! cd "$apidoxdir" > /dev/null 2>&1 ; then echo "Cannot create and cd into $apidoxdir" exit 1 fi test -f "Doxyfile.in" || create_doxyfile_in # Copy in logos and the like for i in "favicon.ico" "kde_gear_64.png" do cp "$DOXDATA/$i" . > /dev/null 2> /dev/null done for i in "$top_srcdir/doc/api/Dox-"*.png do T=`basename "$i" | sed -e 's+Dox-++'` test -f "$i" && cp "$i" "./$T" > /dev/null 2> /dev/null done top_builddir="." srcdir="$1" subdir="." else if ! cd "$apidoxdir" > /dev/null 2>&1 ; then echo "Cannot cd into $apidoxdir -- maybe you need to" echo "build the top-level dox first." exit 1 fi if test "x1" = "x$recurse" ; then # OK, so --recurse was requested if ! test -f "subdirs.top" ; then echo "* No subdirs.top available in the $apidoxdir." echo "* The --recurse option will be ignored." recurse=0 fi fi fi ### Read a single line (TODO: support \ continuations) from the Makefile.am. ### Used to extract variable assignments from it. extract_line() { file="$2" ; test -z "$file" && file="$srcdir/Makefile.am" pattern=`echo "$1" | tr + .` grep "^$1" "$file" | \ sed -e "s+$pattern.*=\s*++" } ### Handle the COMPILE_{FIRST,LAST,BEFORE,AFTER} part of Makefile.am ### in the toplevel. Copied from admin/cvs.sh. Licence presumed LGPL). create_subdirs() { echo "* Sorting top-level subdirs" dirs= idirs= if test -f "$top_srcdir/inst-apps"; then idirs=`cat "$top_srcdir/"inst-apps` else idirs=`cd "$top_srcdir" && ls -1 | sort` fi compilefirst="" compilelast="" if test -f "$top_srcdir/"Makefile.am.in ; then compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' "$top_srcdir/"Makefile.am.in | head -n 1` compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' "$top_srcdir/"Makefile.am.in | head -n 1` fi for i in $idirs; do if test -f "$top_srcdir/$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="" if test -f "$top_srcdir/"Makefile.am.in ; then list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" "$top_srcdir/"Makefile.am.in | head -n 1` fi for s in $list; do echo $s $d done list="" if test -f "$top_srcdir/"Makefile.am.in ; then list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" "$top_srcdir/"Makefile.am.in | head -n 1` fi for s in $list; do echo $d $s done echo $d $d done ) | tsort >> ./_SUBDIRS for d in $compilelast; do echo $d >> ./_SUBDIRS done test -r _SUBDIRS && mv _SUBDIRS subdirs.top || true } ### Add HTML header, footer, CSS tags to Doxyfile. ### Assumes $subdir is set. Argument is a string ### to stick in front of the file if needed. apidox_htmlfiles() { dox_header="$top_srcdir/doc/api/$1header.html" dox_footer="$top_srcdir/doc/api/$1footer.html" dox_css="$top_srcdir/doc/api/doxygen.css" test -f "$dox_header" || dox_header="$DOXDATA/$1header.html" test -f "$dox_footer" || dox_footer="$DOXDATA/$1footer.html" test -f "$dox_css" || dox_css="$DOXDATA/doxygen.css" echo "HTML_HEADER = $dox_header" >> "$subdir/Doxyfile" ; \ echo "HTML_FOOTER = $dox_footer" >> "$subdir/Doxyfile" ; \ echo "HTML_STYLESHEET = $dox_css" >> "$subdir/Doxyfile" } apidox_specials() { line=`extract_line DOXYGEN_PROJECTNAME "$1"` test -n "$line" && echo "PROJECT_NAME = \"$line\"" >> "$2" } apidox_local() { for i in "$top_srcdir/doc/api/Doxyfile.local" do if test -f "$i" ; then cat "$i" >> "$subdir/Doxyfile" break fi done } ### Post-process HTML files by substituting in the menu files # # In non-top directories, both <!-- menu --> and <!-- gmenu --> # are calculated and replaced. Top directories get an empty <!-- menu --> # if any. doxyndex() { # Special case top-level to have an empty MENU. if test "x$subdir" = "x." ; then MENU="" htmldir="." htmltop="$top_builddir" # Just ., presumably echo "* Post-processing top-level files" else MENU="<ul>" htmldir="$subdir/html" htmltop="$top_builddir.." # top_builddir ends with / echo "* Post-processing files in $htmldir" # Build a little PHP file that maps class names to file # names, for the quick-class-picker functionality. # (The quick-class-picker is disabled due to styling # problems in IE & FF). ( echo "<?php \$map = array("; \ for htmlfile in `find $htmldir/ -type f -name "class[A-Z]*.html" | grep -v "\-members.html$"`; do classname=`echo $htmlfile | sed -e "s,.*/class\\(.*\\).html,\1," -e "s,_1_1,::,g" -e "s,_01, ,g" -e "s,_4,>,g" -e "s+_00+,+g" -e "s+_3+<+g" | tr "[A-Z]" "[a-z]"` echo " \"$classname\" => \"$htmlfile\"," done | sort ; \ echo ") ?>" ) > "$subdir/classmap.inc" # This is a list of pairs, with / separators so we can use # basename and dirname (a crude shell hack) to split them # into parts. For each, if the file part exists (as a html # file) tack it onto the MENU variable as a <li> with link. for i in "Main Page/index" \ "Modules/modules" \ "Namespace List/namespaces" \ "Class Hierarchy/hierarchy" \ "Alphabetical List/classes" \ "Class List/annotated" \ "File List/files" \ "Directories/dirs" \ "Namespace Members/namespacemembers" \ "Class Members/functions" \ "Related Pages/pages" do NAME=`dirname "$i"` FILE=`basename "$i"` test -f "$htmldir/$FILE.html" && MENU="$MENU<li><a href=\"$FILE.html\">$NAME</a></li>" done MENU="$MENU</ul>" fi # Get the list of global Menu entries. GMENU=`cat subdirs | tr -d '\n'` PMENU=`grep '<!-- pmenu' "$htmldir/index.html" | sed -e 's+.*pmenu *++' -e 's+ *-->++' | awk '{ c=split($0,a,"/"); for (j=1; j<=c; j++) { printf " / <a href=\""; if (j==c) { printf("."); } for (k=j; k<c; k++) { printf "../"; } if (j<c) { printf("../html/index.html"); } printf "\">%s</a>\n" , a[j]; } }' | tr -d '\n'` # Map the PHP file into HTML options so that # it can be substituted in for the quick-class-picker. CMENU="" # For now, leave the CMENU disabled CMENUBEGIN="<!--" CMENUEND="-->" if test "x$subdir" = "x." ; then # Disable CMENU on toplevel anyway CMENUBEGIN="<!--" CMENUEND="-->" else test -f "$subdir/classmap.inc" && \ CMENU=`grep '=>' "$subdir/classmap.inc" | sed -e 's+"\([^"]*\)" => "'"$subdir/html/"'\([^"]*\)"+<option value="\2">\1<\/option>+' | tr -d '\n'` if ! test -f "$subdir/classmap.inc" || ! grep "=>" "$subdir/classmap.inc" > /dev/null 2>&1 ; then CMENUBEGIN="<!--" CMENUEND="-->" fi fi # Now substitute in the MENU in every file. This depends # on HTML_HEADER (ie. header.html) containing the # <!-- menu --> comment. for i in "$htmldir"/*.html do if test -f "$i" ; then sed -e "s+<!-- menu -->+$MENU+" \ -e "s+<!-- gmenu -->+$GMENU+" \ -e "s+<!-- pmenu.*-->+$PMENU+" \ -e "s+<!-- cmenu.begin -->+$CMENUBEGIN+" \ -e "s+<!-- cmenu.end -->+$CMENUEND+" \ < "$i" | sed -e "s+@topdir@+$htmltop+g" > "$i.new" && mv "$i.new" "$i" sed -e "s+<!-- cmenu -->+$CMENU+" < "$i" > "$i.new" test -s "$i.new" && mv "$i.new" "$i" fi done } ### Handle the Doxygen processing of a toplevel directory. apidox_toplevel() { echo "" echo "*** Creating API documentation main page for $module_name" echo "*" rm -f "Doxyfile" for i in "$top_srcdir/doc/api/Doxyfile.global" \ "$top_srcdir/admin/Doxyfile.global" \ "$DOXDATA/Doxyfile.global" do if test -f "$i" ; then cp "$i" Doxyfile break fi done if test ! -f "Doxyfile" ; then echo "* Cannot create Doxyfile." exit 1 fi cat "$top_builddir/Doxyfile.in" >> Doxyfile echo "INPUT = $top_srcdir" >> Doxyfile echo "OUTPUT_DIRECTORY = $top_builddir" >> Doxyfile ; \ echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \ echo "RECURSIVE = NO" >> Doxyfile ; \ echo "ALPHABETICAL_INDEX = NO" >> Doxyfile ; \ echo "HTML_OUTPUT = ." >> Doxyfile ; \ apidox_htmlfiles "main" # KDevelop has a top-level Makefile.am with settings. for i in "$top_srcdir/Makefile.am.in" "$top_srcdir/Makefile.am" do if test -f "$i" ; then grep '^DOXYGEN_SET_' "$i" | \ sed -e 's+DOXYGEN_SET_++' -e "s+@topdir@+$top_srcdir+" >> Doxyfile apidox_specials "$srcdir/Makefile.am" "$subdir/Doxyfile" break fi done apidox_local doxygen Doxyfile ( cd "$top_srcdir" && grep -l ^include.*Doxyfile.am `find . -name Makefile.am` ) | sed -e 's+/Makefile.am$++' -e 's+^\./++' | sort > subdirs.in for i in `cat subdirs.in` do test "x." = "x$i" && continue; dir=`dirname "$i"` file=`basename "$i"` if test "x." = "x$dir" ; then dir="" else dir="$dir/" fi indent=`echo "$dir" | sed -e 's+[^/]*/+\ \ +g' | sed -e 's+&+\\\&+g'` entryname=`extract_line DOXYGEN_SET_PROJECT_NAME "$top_srcdir/$dir/$file/Makefile.am"` test -z "$entryname" && entryname="$file" if grep DOXYGEN_EMPTY "$top_srcdir/$dir/$file/Makefile.am" > /dev/null 2>&1 ; then echo "<li>$indent$file</li>" else echo "<li>$indent<a href=\"@topdir@/$dir$file/html/index.html\">$entryname</a></li>" fi done > subdirs doxyndex } ### Handle the Doxygen processing of a non-toplevel directory. apidox_subdir() { echo "" echo "*** Creating apidox in $subdir" echo "*" rm -f "$subdir/Doxyfile" if ! test -d "$top_srcdir/$subdir" ; then echo "* No source (sub)directory $subdir" return fi for i in "$top_srcdir/doc/api/Doxyfile.global" \ "$top_srcdir/admin/Doxyfile.global" \ "$DOXDATA/Doxyfile.global" do if test -f "$i" ; then cp "$i" "$subdir/Doxyfile" break fi done test -f "Doxyfile.in" || create_doxyfile_in cat "Doxyfile.in" >> "$subdir/Doxyfile" echo "PROJECT_NAME = \"$subdir\"" >> "$subdir/Doxyfile" echo "INPUT = $srcdir" >> "$subdir/Doxyfile" echo "OUTPUT_DIRECTORY = ." >> "$subdir/Doxyfile" if grep -l "$subdir/" subdirs.in > /dev/null 2>&1 ; then echo "RECURSIVE = NO" >> "$subdir/Doxyfile" fi echo "HTML_OUTPUT = $subdir/html" >> "$subdir/Doxyfile" echo "GENERATE_TAGFILE = $subdir/$subdirname.tag" >> "$subdir/Doxyfile" test -d "$top_srcdir/doc/api" && \ echo "IMAGE_PATH = $top_srcdir/doc/api" >> "$subdir/Doxyfile" apidox_htmlfiles "" # Makefile.ams may contain overrides to our settings, # so copy them in. grep '^DOXYGEN_SET_' "$srcdir/Makefile.am" | \ sed -e 's+DOXYGEN_SET_++' >> "$subdir/Doxyfile" apidox_specials "$srcdir/Makefile.am" "$subdir/Doxyfile" excludes=`extract_line DOXYGEN_EXCLUDE` if test -n "$excludes"; then patterns="" dirs="" for item in `echo "$excludes"`; do if test -d "$top_srcdir/$subdir/$item"; then dirs="$dirs $top_srcdir/$subdir/$item/" else patterns="$patterns $item" fi done echo "EXCLUDE_PATTERNS += $patterns" >> "$subdir/Doxyfile" echo "EXCLUDE += $dirs" >> "$subdir/Doxyfile" fi echo "TAGFILES = \\" >> "$subdir/Doxyfile" ## For now, don't support \ continued references lines tags=`extract_line DOXYGEN_REFERENCES` for i in $tags qt ; do tagsubdir=`dirname $i` ; tag=`basename $i` tagpath="" not_found="" if test "x$tagsubdir" = "x." ; then tagsubdir="" else tagsubdir="$tagsubdir/" fi # Find location of tag file if test -f "$tagsubdir$tag/$tag.tag" ; then file="$tagsubdir$tag/$tag.tag" loc="$tagsubdir$tag/html" else # This checks for dox built with_out_ --no-modulename # in the same build dir as this dox run was started in. file=`ls -1 ../*-apidocs/"$tagsubdir$tag/$tag.tag" 2> /dev/null` if test -n "$file" ; then loc=`echo "$file" | sed -e "s/$tag.tag\$/html/"` else # If the tag file doesn't exist yet, but should # because we have the right dirs here, queue # this directory for re-processing later. if test -d "$top_srcdir/$tagsubdir$tag" ; then echo "* Need to re-process $subdir for tag $i" echo "$subdir" >> "subdirs.later" else # Re-check in $PREFIX if needed. test -n "$PREFIX" && \ file=`cd "$PREFIX" && \ ls -1 *-apidocs/"$tagsubdir$tag/$tag.tag" 2> /dev/null` # If something is found, patch it up. The location must be # relative to the installed location of the dox and the # file must be absolute. if test -n "$file" ; then loc=`echo "../$file" | sed -e "s/$tag.tag\$/html/"` file="$PREFIX/$file" echo "* Tags for $tagsubdir$tag will only work when installed." not_found="YES" fi fi fi fi if test "$tag" = "qt" ; then if test -z "$QTDOCDIR" ; then echo " $file" >> "$subdir/Doxyfile" else if test -z "$file" ; then # Really no Qt tags echo "" >> "$subdir/Doxyfile" else echo " $file=$QTDOCDIR" >> "$subdir/Doxyfile" fi fi else if test -n "$file" ; then test -z "$not_found" && echo "* Found tag $file" echo " $file=../$top_builddir$loc \\" >> "$subdir/Doxyfile" fi fi done apidox_local if ! grep '^DOXYGEN_EMPTY' "$srcdir/Makefile.am" > /dev/null 2>&1 ; then doxygen "$subdir/Doxyfile" doxyndex fi } ### Run a given subdir by setting up global variables first. do_subdir() { subdir=`echo "$1" | sed -e 's+/$++'` srcdir="$top_srcdir/$subdir" subdirname=`basename "$subdir"` mkdir -p "$subdir" 2> /dev/null if ! test -d "$subdir" ; then echo "Can't create dox subdirectory $subdir" return fi top_builddir=`echo "/$subdir" | sed -e 's+/[^/]*+../+g'` apidox_subdir } ### Create installdox-slow in the toplevel create_installdox() { # Fix up the installdox script so it accepts empty args # # This code is copied from the installdox generated by Doxygen, # copyright by Dimitri van Heesch and released under the GPL. # This does a _slow_ update of the dox, because it loops # over the given substitutions instead of assuming all the # needed ones are given. # cat <<\EOF #! /usr/bin/env perl %subst = () ; $quiet = 0; if (open(F,"search.cfg")) { $_=<F> ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; $_=<F> ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; } while ( @ARGV ) { $_ = shift @ARGV; if ( s/^-// ) { if ( /^l(.*)/ ) { $v = ($1 eq "") ? shift @ARGV : $1; ($v =~ /\/$/) || ($v .= "/"); $_ = $v; if ( /(.+)\@(.+)/ ) { $subst{$1} = $2; } else { print STDERR "Argument $_ is invalid for option -l\n"; &usage(); } } elsif ( /^q/ ) { $quiet = 1; } elsif ( /^\?|^h/ ) { &usage(); } else { print STDERR "Illegal option -$_\n"; &usage(); } } else { push (@files, $_ ); } } if ( ! @files ) { if (opendir(D,".")) { foreach $file ( readdir(D) ) { $match = ".html"; next if ( $file =~ /^\.\.?$/ ); ($file =~ /$match/) && (push @files, $file); ($file =~ "tree.js") && (push @files, $file); } closedir(D); } } if ( ! @files ) { print STDERR "Warning: No input files given and none found!\n"; } foreach $f (@files) { if ( ! $quiet ) { print "Editing: $f...\n"; } $oldf = $f; $f .= ".bak"; unless (rename $oldf,$f) { print STDERR "Error: cannot rename file $oldf\n"; exit 1; } if (open(F,"<$f")) { unless (open(G,">$oldf")) { print STDERR "Error: opening file $oldf for writing\n"; exit 1; } if ($oldf ne "tree.js") { while (<F>) { foreach $sub (keys %subst) { s/doxygen\=\"$sub\:([^ \"\t\>\<]*)\" (href|src)=\"\1/doxygen\=\"$sub:$subst{$sub}\" \2=\"$subst{$sub}/g; print G "$_"; } } } else { while (<F>) { foreach $sub (keys %subst) { s/\"$sub\:([^ \"\t\>\<]*)\", \"\1/\"$sub:$subst{$sub}\" ,\"$subst{$sub}/g; print G "$_"; } } } } else { print STDERR "Warning file $f does not exist\n"; } unlink $f; } sub usage { print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; print STDERR "Options:\n"; print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; print STDERR " -q Quiet mode\n\n"; exit 1; } EOF } # Do only the subdirs that match the RE passed in as $1 do_subdirs_re() { RE=`echo "$1" | sed -e 's+/$++'` # Here's a queue of dirs to re-process later when # all the rest have been done already. > subdirs.later # subdirs.top lists _all_ subdirs of top in the order they # should be handled; subdirs.in lists those dirs that contain # dox. So the intersection of the two is the ordered list # of top-level subdirs that contain dox. # # subdirs.top also doesn't contain ".", so that special # case can be ignored in the loop. ( for i in `grep "^$RE" subdirs.top` do if test "x$i" = "x." ; then continue fi # Calculate intersection of this element and the # set of dox dirs. if grep "^$i\$" subdirs.in > /dev/null 2>&1 ; then echo "$i" mkdir -p "$i" 2> /dev/null # Handle the subdirs of this one for j in `grep "$i/" subdirs.in` do echo "$j" mkdir -p "$j" 2> /dev/null done fi done # Now we still need to handle whatever is left for i in `cat subdirs.in` do test -d "$i" || echo "$i" mkdir -p "$i" 2> /dev/null done ) > subdirs.sort for i in `cat subdirs.sort` do do_subdir "$i" done if test -s "subdirs.later" ; then sort subdirs.later | uniq > subdirs.sort for i in `cat subdirs.sort` do : > subdirs.later echo "*** Reprocessing $i" do_subdir "$i" test -s "subdirs.later" && echo "* Some tag files were still not found." done fi } if test "x." = "x$top_builddir" ; then apidox_toplevel create_subdirs create_installdox > installdox-slow if test "x$recurse" = "x1" ; then if test "x$module_name" = "xkdelibs" ; then if test -z "$QTDOCTAG" && test -d "$QTDOCDIR" && \ test ! -f "qt/qt.tag" ; then # Special case: create a qt tag file. echo "*** Creating a tag file for the Qt library:" mkdir qt doxytag -t qt/qt.tag "$QTDOCDIR" > /dev/null 2>&1 fi fi if test -n "$QTDOCTAG" && test -r "$QTDOCTAG" ; then echo "*** Copying tag file for the Qt library:" mkdir qt cp "$QTDOCTAG" qt/qt.tag fi do_subdirs_re "." fi else if test "x$recurse" = "x1" ; then do_subdirs_re "$subdir" else do_subdir "$subdir" fi fi # At the end of a run, clean up stuff. if test "YES" = "$cleanup" ; then rm -f subdirs.in subdirs.later subdirs.sort subdirs.top Doxyfile.in rm -f `find . -name Doxyfile` rm -f qt/qt.tag rmdir qt > /dev/null 2>&1 fi exit 0 Index: Doxyfile.am =================================================================== RCS file: /cvsroot/kbear/kbear/admin/Doxyfile.am,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Doxyfile.am 21 Nov 2002 15:58:42 -0000 1.2 --- Doxyfile.am 21 Oct 2005 19:14:15 -0000 1.2.2.1 *************** *** 1,55 **** ## generate API documentation with doxygen apidox-am-yes: @if test "$(subdir)" != "."; then \ ! $(mkinstalldirs) $(top_builddir)/apidocs/$(subdir) ;\ ! if test ! -x $(top_builddir)/apidocs/common; then \ ! if test -d $(top_srcdir)/doc/common; then \ ! common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\ ! else \ ! common_dir=$(kde_libs_htmldir)/en/common ;\ ! fi ;\ ! $(LN_S) $$common_dir $(top_builddir)/apidocs/common; \ ! fi ;\ ! cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \ ! echo "PROJECT_NAME = \"$(subdir) Library\"" >> Doxyfile; \ ! echo "INPUT = $(srcdir)" >> Doxyfile; \ ! echo "IMAGE_PATH = $(top_srcdir)/doc/api" >> Doxyfile ;\ ! echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile; \ ! echo "HTML_OUTPUT = $(subdir)/html" >> Doxyfile; \ ! echo "LATEX_OUTPUT = $(subdir)/latex" >> Doxyfile; \ ! echo "RTF_OUTPUT = $(subdir)/rtf" >> Doxyfile; \ ! echo "MAN_OUTPUT = $(subdir)/man" >> Doxyfile; \ ! echo "GENERATE_HTML = $(GENERATE_FLAG)" >> Doxyfile ;\ ! echo "GENERATE_MAN = $(GENERATE_FLAG)" >> Doxyfile ;\ ! echo "GENERATE_LATEX = $(GENERATE_FLAG)" >> Doxyfile ;\ ! if test -n "$(DOXYGEN_EXCLUDE)"; then \ ! echo "EXCLUDE_PATTERNS += $(DOXYGEN_EXCLUDE)" >> Doxyfile; \ ! fi ;\ ! echo "TAGFILES = \\" >> Doxyfile; \ ! tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \ ! tagpath= ;\ ! path="../../$$tag" ;\ ! if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \ ! tagpath="$(top_builddir)/apidocs/$$tag/$$tag.tag" ;\ ! else \ ! tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2> /dev/null` ;\ ! if test -n "$$tagpath"; then \ ! path=`echo $$tagpath | sed -e "s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,"` ;\ ! fi ;\ ! fi ;\ ! if test "$$tag" = qt; then \ ! echo $$tagpath=$(QTDOCDIR) >> Doxyfile ;\ ! else if test -n "$$tagpath"; then \ ! echo "$$tagpath=$$path/html \\" >> Doxyfile ;\ ! fi ;\ ! fi ;\ ! done ;\ ! echo "GENERATE_TAGFILE = $(top_builddir)/apidocs/$(subdir)/$(subdir).tag" >> Doxyfile ;\ ! echo "IGNORE_PREFIX = K" >> Doxyfile ;\ ! echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\ ! $(DOXYGEN) Doxyfile ;\ fi ! apidox-am-no: install-data-local: install-apidox --- 1,37 ---- ## generate API documentation with doxygen apidox-am-yes: + @if test \! -d "$(top_srcdir)/doc/common/" && test -z "$$ADMIN" ; then \ + export DOXDATA=$(kde_libs_htmldir)/en/common ; \ + fi ; \ + test -d $(top_builddir)/apidocs || \ + ( cd $(top_builddir) && sh $(top_srcdir)/admin/doxygen.sh \ + --no-modulename --installdir=$(kde_libs_htmldir)/en \ + --no-recurse $(top_srcdir) . ) ; \ + cd $(top_builddir) && sh $(top_srcdir)/admin/doxygen.sh \ + --recurse --no-modulename --installdir=$(kde_libs_htmldir)/en \ + $(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 ; \ + cd $(top_builddir) && sh $(top_srcdir)/admin/doxygen.sh \ + --no-modulename --installdir=$(kde_libs_htmldir)/en \ + $(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 *************** *** 65,82 **** if test -d $(top_builddir)/apidocs/$(subdir)/html; then \ list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \ for file in $$list; do \ ! echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \ ! $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \ done; \ fi; \ - rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \ - $(LN_S) $(kde_libs_htmldir)/en/common $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \ else\ if test -d $(top_builddir)/apidocs; then \ $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\ list=`cd $(top_builddir)/apidocs && ls -1`; \ for file in $$list; do \ if test -f $(top_builddir)/apidocs/$$file; then \ - echo $(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \ $(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \ fi; \ --- 47,63 ---- 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; \ *************** *** 98,160 **** fi ! apidox: ! @if test "$(subdir)" != "."; then \ ! $(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\ ! else \ ! $(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\ ! fi @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; then \ ! echo "Making apidox in $$subdir"; \ ! if test "$$subdir" != "."; then \ ! (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no apidox) || exit 1; \ ! fi ; fi ;\ ! done; \ ! for subdir in $$list; do \ ! if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \ ! echo "Making apidox in $$subdir"; \ if test "$$subdir" != "."; then \ ! (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \ fi ; fi ;\ done; \ fi ! apidox-am-toplevel-no: ! apidox-am-toplevel-yes: ! @echo "*** Creating API documentation main page"; \ ! cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \ ! echo "PROJECT_NAME = $(DOXYGEN_PROJECT_NAME)" >> Doxyfile ; \ ! echo "PROJECT_NUMBER = $(DOXYGEN_PROJECT_NUMBER)" >> Doxyfile ; \ ! echo "INPUT = $(top_srcdir)" >> Doxyfile ; \ ! echo "OUTPUT_DIRECTORY = $(top_builddir)/apidocs" >> Doxyfile ; \ ! echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \ ! echo "RECURSIVE = NO" >> Doxyfile ; \ ! echo "SOURCE_BROWSER = NO" >> Doxyfile ; \ ! echo "ALPHABETICAL_INDEX = NO" >> Doxyfile ; \ ! echo "HTML_OUTPUT = ." >> Doxyfile ; \ ! echo "HTML_HEADER = apidocs/common/mainheader.html" >> Doxyfile ; \ ! echo "HTML_FOOTER = apidocs/common/mainfooter.html" >> Doxyfile ; \ ! echo "HTML_STYLESHEET = apidocs/common/doxygen.css" >> Doxyfile ; \ ! echo "GENERATE_LATEX = NO" >> Doxyfile ; \ ! echo "GENERATE_RTF = NO" >> Doxyfile ; \ ! echo "GENERATE_MAN = NO" >> Doxyfile ; \ ! echo "GENERATE_XML = NO" >> Doxyfile ; \ ! echo "GENERATE_AUTOGEN_DEF = NO" >> Doxyfile ; \ ! echo "ENABLE_PREPROCESSING = NO" >> Doxyfile ; \ ! echo "CLASS_DIAGRAMS = NO" >> Doxyfile ; \ ! echo "HAVE_DOT = NO" >> Doxyfile ; \ ! echo "GENERATE_HTML = YES" >> Doxyfile ;\ ! $(mkinstalldirs) $(top_builddir)/apidocs ; \ ! rm -f $(top_builddir)/apidocs/common ; \ ! if test -d $(top_srcdir)/doc/common; then \ ! common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\ ! else \ ! common_dir=$(kde_libs_htmldir)/en/common ;\ ! fi ;\ ! $(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\ ! doxygen Doxyfile; \ ! rm -f Doxyfile # Local Variables: --- 79,98 ---- 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: Index: Doxyfile.global =================================================================== RCS file: /cvsroot/kbear/kbear/admin/Doxyfile.global,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** Doxyfile.global 8 Oct 2002 18:12:24 -0000 1.1 --- Doxyfile.global 21 Oct 2005 19:14:15 -0000 1.1.2.1 *************** *** 1,351 **** - # Doxyfile 1.2.15 - - # This file describes the settings to be used by the documentation system - # doxygen (www.doxygen.org) for a project - # - # All text after a hash (#) is considered a comment and will be ignored - # The format is: - # TAG = value [value, ...] - # For lists items can also be appended using: - # TAG += value [value, ...] [...1114 lines suppressed...] ! 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 Index: Makefile.common =================================================================== RCS file: /cvsroot/kbear/kbear/admin/Makefile.common,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** Makefile.common 21 Nov 2002 15:58:42 -0000 1.12 --- Makefile.common 21 Oct 2005 19:14:15 -0000 1.12.2.1 *************** *** 7,11 **** SHELL=/bin/sh ! cvs dist cvs-clean configure.in configure.files subdirs package-messages package-merge: @admindir=$(admindir); \ if test "x$$admindir" = x; then \ --- 7,11 ---- 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 \ *************** *** 22,34 **** 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 $(shell test -f configure.files && cat configure.files) subdirs configure.files: subdirs .SILENT: ! .PHONY: cvs dist cvs-clean package-merge package-messages --- 22,37 ---- 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 Index: acinclude.m4.in =================================================================== RCS file: /cvsroot/kbear/kbear/admin/acinclude.m4.in,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** acinclude.m4.in 21 Nov 2002 15:58:42 -0000 1.15 --- acinclude.m4.in 21 Oct 2005 19:14:15 -0000 1.15.2.1 *************** *** 17,22 **** 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., 59 Temple Place - Suite 330, ! dnl Boston, MA 02111-1307, USA. dnl IMPORTANT NOTE: --- 17,22 ---- 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, [...5594 lines suppressed...] + [kde_has_pie_support=$enableval], + [kde_has_pie_support=detect]) + + if test "$kde_has_pie_support" = "detect"; then + kde_has_pie_support=$kde_cv_val_pie_support + fi + + AC_MSG_RESULT([$kde_has_pie_support]) + + KDE_USE_FPIE="" + KDE_USE_PIE="" + + AC_SUBST([KDE_USE_FPIE]) + AC_SUBST([KDE_USE_PIE]) + + if test "$kde_has_pie_support" = "yes"; then + KDE_USE_FPIE="-fpie" + KDE_USE_PIE="-pie" + fi + ]) Index: am_edit =================================================================== RCS file: /cvsroot/kbear/kbear/admin/am_edit,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** am_edit 21 Nov 2002 15:58:42 -0000 1.14 --- am_edit 21 Oct 2005 19:14:15 -0000 1.14.2.1 *************** *** 32,35 **** --- 32,36 ---- # David Faure <fa...@kd...> # Stephan Kulow <co...@kd...> + # Dirk Mueller <mu...@kd...> use Cwd; *************** *** 51,54 **** --- 52,56 ---- sub checkMocCandidates (); [...1528 lines suppressed...] *************** *** 2026,2027 **** --- 2429,2445 ---- #----------------------------------------------------------------------------- + + # find the .kcfg file listed in the .kcfgc file + sub findKcfgFile($) + { + my ($kcfgf) = @_; + open (KCFGFIN, $kcfgf) || die "Could not open $kcfgf: $!\n"; + seek(KCFGFIN, 0, 2); + my $kcfgfsize = tell(KCFGFIN); + seek(KCFGFIN, 0, 0); + read KCFGFIN, $kcfgfData, $kcfgfsize; + close KCFGFIN; + if(($kcfgfData =~ m/^File=(.*\.kcfg)/gm)) { + $kcfg = $1; + } + } Index: bcheck.pl =================================================================== RCS file: /cvsroot/kbear/kbear/admin/bcheck.pl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** bcheck.pl 19 Oct 2005 16:31:37 -0000 1.1.2.2 --- bcheck.pl 21 Oct 2005 19:14:15 -0000 1.1.2.3 *************** *** 119,122 **** --- 119,123 ---- s/0x[0-9a-fA-F]+/0x......../g; s/base size=/size=/g; + s/\(\)\s*$//g; s/base align=/align=/g; Index: compile =================================================================== RCS file: /cvsroot/kbear/kbear/admin/compile,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** compile 8 Oct 2002 18:12:24 -0000 1.1 --- compile 21 Oct 2005 19:14:15 -0000 1.1.2.1 *************** *** 1,7 **** #! /bin/sh - # Wrapper for compilers which do not understand `-c -o'. ! # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey <tr...@cy...>. # --- 1,8 ---- #! /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 <tr...@cy...>. # *************** *** 18,22 **** # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you --- 19,23 ---- # 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 *************** *** 25,76 **** # the same distribution terms that you use for the rest of that program. ! # Usage: ! # compile PROGRAM [ARGS]... ! # `-o FOO.o' is removed from the args passed to the actual compile. ! prog=$1 ! shift ofile= cfile= ! args= ! while test $# -gt 0; do ! case "$1" in ! -o) ! # configure might choose to run compile as `compile cc -o foo foo.c'. ! # So we do something ugly here. ! ofile=$2 ! shift ! case "$ofile" in ! *.o | *.obj) ! ;; ! *) ! args="$args -o $ofile" ! ofile= ! ;; ! esac ! ;; ! *.c) ! cfile=$1 ! args="$args $1" ! ;; ! *) ! args="$args $1" ! ;; ! esac ! 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 "$prog" $args fi # Name of file we expect compiler to create. ! cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. --- 26,108 ---- # the same distribution terms that you use for the rest of that program. ! # This file is maintained in Automake, please report ! # bugs to <bug...@gn...> or send patches to ! # <aut...@gn...>. ! 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...@gn...>. ! 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. *************** *** 78,99 **** # 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. ! "$prog" $args ! status=$? if test -f "$cofile"; then ! mv "$cofile" "$ofile" fi ! rmdir $lockdir ! exit $status --- 110,142 ---- # 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: Index: conf.change.pl =================================================================== RCS file: /cvsroot/kbear/kbear/admin/conf.change.pl,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** conf.change.pl 25 Mar 2002 22:08:19 -0000 1.4 --- conf.change.pl 21 Oct 2005 19:14:15 -0000 1.4.2.1 *************** *** 1,3 **** ! #!/usr/bin/perl -w # this script patches a config.status file, to use our own perl script --- 1,3 ---- ! #!/usr/bin/env perl # this script patches a config.status file, to use our own perl script *************** *** 20,25 **** # 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., 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. # we have to change two places --- 20,25 ---- # 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 *************** *** 28,36 **** # 2. the big main loop which patches all Makefile.in's use File::Basename; my $ac_aux_dir = dirname($0); my ($flag); ! local $ac_version = 0; my $vpath_seen = 0; $flag = 0; --- 28,37 ---- # 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; *************** *** 79,82 **** --- 80,88 ---- # 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; *************** *** 95,101 **** print STDERR "hmm, don't know autoconf version\n"; } ! } elsif (/^\#\s*CONFIG_HEADER section.*/) { $flag = 4; &insert_main_loop(); if($ac_version != 250) { print STDERR "hmm, something went wrong :-(\n"; --- 101,109 ---- 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"; *************** *** 176,177 **** --- 184,191 ---- return; } + + sub insert_command_loop { + print <<EOF; + for ac_file in .. \$CONFIG_FILES ; do + EOF + } Index: config.guess =================================================================== RCS file: /cvsroot/kbear/kbear/admin/config.guess,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** config.guess 21 Nov 2002 15:58:42 -0000 1.6 --- config.guess 21 Oct 2005 19:14:15 -0000 1.6.2.1 *************** *** 2,8 **** # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-10-21' # This file is free software; you can redistribute it and/or modify it --- 2,8 ---- # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, [...1865 lines suppressed...] c4*) echo c4-convex-bsd ! exit ;; esac fi *************** *** 1324,1328 **** download the most up to date version of the config scripts from ! ftp://ftp.gnu.org/pub/gnu/config/ If the version you run ($0) is already up to date, please --- 1423,1429 ---- download the most up to date version of the config scripts from ! http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess ! and ! http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please Index: config.pl =================================================================== RCS file: /cvsroot/kbear/kbear/admin/config.pl,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** config.pl 8 Oct 2002 18:12:24 -0000 1.4 --- config.pl 21 Oct 2005 19:14:15 -0000 1.4.2.1 *************** *** 1,3 **** ! #!/usr/bin/perl # a script for use by autoconf to make the Makefiles # from the Makefile.in's --- 1,3 ---- ! #!/usr/bin/env perl # a script for use by autoconf to make the Makefiles # from the Makefile.in's *************** *** 26,31 **** # 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., 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. my $ac_subs=$ARGV[0]; --- 26,35 ---- # 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]; *************** *** 34,37 **** --- 38,44 ---- my $ac_given_INSTALL=$ARGV[3]; + my @comp_match; + my @comp_subs; + #print "ac_subs=$ac_subs\n"; #print "ac_sacfiles=$ac_sacfiles\n"; *************** *** 39,48 **** --- 46,58 ---- #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; *************** *** 52,56 **** if ($bad_perl) { print "Using perl older than version 5.005\n"; ! foreach my $pat (@subs) { if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ ) || ($pat =~ m/s%([^%]*)%([^%]*)%;t/ ) --- 62,66 ---- if ($bad_perl) { print "Using perl older than version 5.005\n"; ! foreach $pat (@subs) { if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ ) || ($pat =~ m/s%([^%]*)%([^%]*)%;t/ ) *************** *** 77,81 **** } } else { ! foreach my $pat (@subs) { if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) || ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) || --- 87,91 ---- } } else { ! foreach $pat (@subs) { if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) || ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) || *************** *** 95,99 **** push @comp_subs, ""; } else { ! die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)" unless ( $pat =~ /^\s*$/ ); # ignore white lines } --- 105,109 ---- push @comp_subs, ""; } else { ! die "Uhh. Malformed pattern in $ac_subs ($pat)" unless ( $pat =~ /^\s*$/ ); # ignore white lines } *************** *** 131,135 **** if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) { # The file is in a subdirectory. ! if (! -d "$ac_dir") { mkdir "$ac_dir", 0777; } ($ac_dir_suffix = $ac_dir) =~ s%^./%%; $ac_dir_suffix="/".$ac_dir_suffix; --- 141,145 ---- 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; *************** *** 167,174 **** my $fname=$ac_file_in; $fname =~ s%.*/%%; ! my $configure_input="Generated automatically from $fname by config.pl."; ! if ($ac_file =~ /.*[Mm]akefile.*/) { ! $ac_comsub="# ".$configure_input."\n"; # for the first line in $ac_file ! } my $ac_file_inputs; --- 177,181 ---- my $fname=$ac_file_in; $fname =~ s%.*/%%; ! $configure_input="$ac_file. Generated from $fname by config.pl."; my $ac_file_inputs; *************** *** 176,189 **** $ac_file_inputs =~ s%:% $ac_given_srcdir/%g; ! patch_file($ac_file, $ac_file_inputs, $ac_comsub); } sub patch_file { ! my ($outf, $infiles, $identline) = @_; my $filedata; my @infiles=split(' ', $infiles); my $i=0; ! foreach my $name (@infiles) { if (open(CF, "< $name")) { while (<CF>) { --- 183,200 ---- $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>) { *************** *** 195,202 **** } } - if ($identline) { - # Put the ident in the second line. For shitty automake 1.6x. - $filedata =~ s%\n%\n$identline%; - } $filedata =~ s%\@configure_input\@%$configure_input%g; --- 206,209 ---- *************** *** 224,232 **** sub make_closure { my ($pat, $sub) = @_; ! $pat =~ s/\@/\\@/g; # @bla@ -> \@bla\@ ! $pat =~ s/\$/\\\$/g; # $bla -> \$bla ! $sub =~ s/\@/\\@/g; ! $sub =~ s/\$/\\\$/g; ! my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%$pat%$sub%g; }"; if ($@) { print "can't create CODE: $@\n"; --- 231,235 ---- 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"; Index: config.sub =================================================================== RCS file: /cvsroot/kbear/kbear/admin/config.sub,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** config.sub 21 Nov 2002 15:58:42 -0000 1.6 --- config.sub 21 Oct 2005 19:14:15 -0000 1.6.2.1 *************** *** 2,8 **** # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. --- 2,8 ---- # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ! timestamp='2005-07-01' # This file is (in principle) common to ALL GNU software. *************** *** 22,28 **** # 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., 59 Temple Place - Suite 330, ! # Boston, MA 02111-1307, USA. ! # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a --- 22,28 ---- # 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 Gener... [truncated message content] |