4 # Morgan Deters <mdeters@cs.nyu.edu> for CVC4
6 # usage: mkbuilddir target build-type
8 # Sets up the builds/ directory for building build-type for target:
9 # - removes configure detritus from top-level source directory
10 # - makes builds/$target/$build_type directory if it's not already there
11 # - links builds/Makefile to (possibly nonexistent) build Makefile
12 # - creates the builds/current Makefile include snippet
13 # - links builds/src and builds/test into build directory
17 echo 'usage: mkbuilddir target build_type' >&2
24 : ${as_me:=mkbuilddir}
27 : ${MKDIR_P:=mkdir -p}
30 $as_echo "$as_me: Setting up builds/$target/$build_type..."
31 $RM config.log config.status confdefs.h builds
/Makefile
32 $MKDIR_P "builds/$target/$build_type"
33 $LN_S "$target/$build_type/Makefile.builds" builds
/Makefile
35 $as_echo "$as_me: Creating builds/current..."
36 (echo "# This is the most-recently-configured CVC4 build"; \
37 echo "# 'make' in the top-level source directory applies to this build"; \
38 echo "CURRENT_BUILD = $target/$build_type") > builds
/current
40 for dir
in src
test; do
41 $as_echo "$as_me: Linking builds/$dir..."
43 $LN_S "$target/$build_type/$dir" "builds/$dir"