diff options
| author | Sascha Schumann <sas@php.net> | 2000-08-24 11:56:54 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2000-08-24 11:56:54 +0000 |
| commit | 693180c1a239b4e7b98be8debe617b83b0b7a6a9 (patch) | |
| tree | 943faa5bd8d4fa1cb11cca0018e0b002e1407ac7 | |
| parent | a8be2cf641ffec8d813c73b0e20d3a978c3e191f (diff) | |
| download | php-git-693180c1a239b4e7b98be8debe617b83b0b7a6a9.tar.gz | |
Small speedup
| -rw-r--r-- | build/mkdep.awk | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/build/mkdep.awk b/build/mkdep.awk index 597556c5ce..9eb5e6f611 100644 --- a/build/mkdep.awk +++ b/build/mkdep.awk @@ -1,3 +1,27 @@ +# +----------------------------------------------------------------------+ +# | PHP version 4.0 | +# +----------------------------------------------------------------------+ +# | Copyright (c) 2000 The PHP Group | +# +----------------------------------------------------------------------+ +# | This source file is subject to version 2.02 of the PHP license, | +# | that is bundled with this package in the file LICENSE, and is | +# | available at through the world-wide-web at | +# | http://www.php.net/license/2_02.txt. | +# | If you did not receive a copy of the PHP license and are unable to | +# | obtain it through the world-wide-web, please send a note to | +# | license@php.net so we can mail you a copy immediately. | +# +----------------------------------------------------------------------+ +# | Authors: Sascha Schumann <sascha@schumann.cx> | +# +----------------------------------------------------------------------+ +# +# $Id$ +# +# Usage: +# +# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ +# awk -f mkdep.awk > dependencies + + { top_srcdir=$1 top_builddir=$2 @@ -34,18 +58,18 @@ done=0 while ((cmdx | getline) > 0) { if (match($0, "^# [0-9]* \".*\.h\"") != 0) { - sub(top_srcdir, "$(top_srcdir)", $3) - sub(top_builddir, "$(top_builddir)", $3) + if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) + sub(top_builddir, "$(top_builddir)", $3) if (substr($3,2,1) != "/" && used[$3] != 1) { if (done == 0) - printf("%s", target " " target2 ":") + printf(target " " target2 ":") done=1 - printf("%s", " \\\n\t" substr($3,2,length($3)-2)) + printf(" \\\n\t" substr($3,2,length($3)-2)) used[$3] = 1; } } } if (done == 1) - printf("\n\n") + print "\n" } } |
