xref: /netbsd-src/sys/external/bsd/compiler_rt/prepare-import.sh (revision aef5eb5f59cdfe8314f1b5f78ac04eb144e44010)
1#!/bin/sh
2# $NetBSD: prepare-import.sh,v 1.6 2018/12/29 16:27:12 kamil Exp $
3#
4# Checkout compiler_rt into dist.
5# Run this script and check for additional files and directories to prune,
6# only relevant content should be included.
7
8set -e
9
10cd dist
11rm -rf .svn
12rm -rf SDKs android cmake make third_party unittests www
13rm -f .arcconfig .gitignore CMakeLists.txt Makefile
14rm -rf lib/BlocksRuntime lib/dfsan lib/cfi
15rm -rf  lib/builtins/Darwin-excludes lib/builtins/macho_embedded
16rm -rf test/BlocksRuntime test/asan test/cfi test/dfsan test/lit.* test/lsan
17rm -rf test/msan test/sanitizer_common test/safestack test/tsan test/ubsan
18rm -f lib/*/*/Makefile.mk lib/*/Makefile.mk */Makefile.mk
19rm -f lib/*/CMakeLists.txt */CMakeLists.txt
20rm -f lib/builtins/apple_versioning.c lib/lit.common.*
21cd ..
22find dist -type d -delete 2> /dev/null
23