zic: Remove from tree.
[haiku.git] / 3rdparty / qtcreator / create_project_file.sh
blobce9fb8a857b775902667896ddec18342d6894350
1 #!/bin/sh
3 if [ "$#" -ne 2 ]; then
4 echo "This script creates project files for Qt Creator to develop Haiku with."
5 echo "It should only be used on a per-project basis, as Qt Creator is too slow"
6 echo "when used on all of Haiku at once."
7 echo ""
8 echo "THIS SCRIPT *MUST* BE RUN FROM THE REPOSITORY ROOT."
9 echo ""
10 echo "Usage: <script> <project name> <path to project root>"
11 echo "e.g: create_project_file.sh Tracker src/kits/tracker/"
12 exit 1
15 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
16 NAME=$1
17 ROOTDIR=$2
19 printf "// Add predefined macros for your project here. For example:\n// #define THE_ANSWER 42\n" \
20 >$DIR/$NAME.config
21 printf "[General]\n" >$DIR/$NAME.creator
23 # Build lists of files
24 find $ROOTDIR -type f | sed "s@^@../../@" >$DIR/$NAME.files
25 find $ROOTDIR -type d | sed "s@^@../../@" >$DIR/$NAME.includes
26 find headers -type d | sed "s@^@../../@" >>$DIR/$NAME.includes
27 echo "Done. Project file: $DIR/$NAME.creator"