[Support] Remove unused includes (NFC) (#116752)
[llvm-project.git] / polly / lib / External / update-isl.sh
bloba2b989b1c9d422e301db0b8f36c3a88faa3a3782
1 #! /bin/sh
2 set -e
4 # Replace the content of the isl directory with a fresh clone from
5 # http://repo.or.cz/isl.git
7 SCRIPTPATH=`realpath --no-symlinks $(dirname $0)`
8 ISL_SOURCE_DIR="${SCRIPTPATH}/isl"
9 GITDIR=`mktemp -d --tmpdir isl-XXX`
11 # Checkout isl source code
12 git clone --recursive http://repo.or.cz/isl.git $GITDIR
13 if [ -n "$1" ]; then
14 (cd $GITDIR && git checkout --detach $1)
15 (cd $GITDIR && git submodule update --recursive)
18 # Customize the source directory for Polly:
19 # - Remove the autotools build system to avoid including GPL source into
20 # the LLVM repository, even if covered by the autotools exception
21 # - Create files that the autotools would have created
22 # - Save the custom isl C++ binding
23 # - Strip git source versioning
24 (cd $GITDIR && rm -rf m4 autogen.sh configure.ac)
25 (cd $GITDIR && find -name "Makefile.am" -execdir rm -f '{}' \;)
26 (cd $GITDIR && git describe > $GITDIR/GIT_HEAD_ID)
27 cp $ISL_SOURCE_DIR/include/isl/isl-noexceptions.h $GITDIR/include/isl/isl-noexceptions.h
28 rm -rf $GITDIR/.git
29 rm -rf $GITDIR/imath/.git
31 # Replace the current isl source
32 # IMPORTANT: Remember to `git add` any new files in LLVM's versioning
33 # and add them to its CMakeLists.txt if necessary.
34 rm -rf $ISL_SOURCE_DIR
35 mv -T $GITDIR $ISL_SOURCE_DIR
37 # Cleanup script temporaries
38 rm -rf $TMPDIR