File: update-isl.sh

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (38 lines) | stat: -rwxr-xr-x 1,311 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
set -e

# Replace the content of the isl directory with a fresh clone from
# http://repo.or.cz/isl.git

SCRIPTPATH=`realpath --no-symlinks $(dirname $0)`
ISL_SOURCE_DIR="${SCRIPTPATH}/isl"
GITDIR=`mktemp -d --tmpdir isl-XXX`

# Checkout isl source code
git clone --recursive http://repo.or.cz/isl.git $GITDIR
if [ -n "$1" ]; then
  (cd $GITDIR && git checkout --detach $1)
  (cd $GITDIR && git submodule update --recursive)
fi

# Customize the source directory for Polly:
# - Remove the autotools build system to avoid including GPL source into
#   the LLVM repository, even if covered by the autotools exception
# - Create files that the autotools would have created
# - Save the custom isl C++ binding
# - Strip git source versioning
(cd $GITDIR && rm -rf m4 autogen.sh configure.ac)
(cd $GITDIR && find -name "Makefile.am" -execdir rm -f '{}' \;)
(cd $GITDIR && git describe > $GITDIR/GIT_HEAD_ID)
cp $ISL_SOURCE_DIR/include/isl/isl-noexceptions.h $GITDIR/include/isl/isl-noexceptions.h
rm -rf $GITDIR/.git
rm -rf $GITDIR/imath/.git

# Replace the current isl source
# IMPORTANT: Remember to `git add` any new files in LLVM's versioning
#            and add them to its CMakeLists.txt if necessary.
rm -rf $ISL_SOURCE_DIR
mv -T $GITDIR $ISL_SOURCE_DIR

# Cleanup script temporaries
rm -rf $TMPDIR