diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-11-10 18:48:06 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-11 10:21:31 +0100 |
commit | b1443d7b5d96c1bf56da31873b7bc0e585be2236 (patch) | |
tree | a705435edef25fc82740922086f40e6f9b538466 /bin | |
parent | fea5c10e222b10d83e0081dc1d1b2e678689d250 (diff) |
make bin/update_pch work with srcdir != builddir
I guess I'm tired of symlinking builddir/workdir to srcdir.
Change-Id: I6192bb981d6727479cd2ce4b3ac75bb0a71c3fe9
Reviewed-on: https://gerrit.libreoffice.org/82397
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update_pch | 7 | ||||
-rwxr-xr-x | bin/update_pch.sh | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/bin/update_pch b/bin/update_pch index 10f5e2e9df65..6112fc654555 100755 --- a/bin/update_pch +++ b/bin/update_pch @@ -33,6 +33,7 @@ EXCLUDE_MODULE = False EXCLUDE_LOCAL = False EXCLUDE_SYSTEM = True SILENT = False +WORKDIR = 'workdir' # System includes: oox, sal, sd, svl, vcl @@ -607,7 +608,7 @@ def parse_makefile(groups, lines, lineno, lastif, ifstack): if osname not in groups: groups[osname] = [] if ingeneratedobjects: - file = 'workdir/' + file + file = WORKDIR + '/' + file groups[osname].append(file) return groups @@ -909,6 +910,10 @@ def main(): global EXCLUDE_LOCAL global EXCLUDE_SYSTEM global SILENT + global WORKDIR + + if os.getenv('WORKDIR'): + WORKDIR = os.getenv('WORKDIR') root = '.' module = sys.argv[1] diff --git a/bin/update_pch.sh b/bin/update_pch.sh index 5299242b9d7c..78b4a47e6044 100755 --- a/bin/update_pch.sh +++ b/bin/update_pch.sh @@ -11,8 +11,12 @@ # Usage: update_pch.sh [<module>] # Invoke: make cmd cmd="./bin/update_pch.sh [..]" -root=`dirname $0` -root=`cd $root/.. >/dev/null && pwd` +if test -n "$SRC_DIR"; then + root="$SRC_DIR" +else + root=`dirname $0` + root=`cd $root/.. >/dev/null && pwd` +fi root=`readlink -f $root` cd $root |