-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·48 lines (37 loc) · 1.32 KB
/
install.sh
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
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
# PRISM-customised install script for CUDD
# Needs to be run from the containing directory
# Only re-run configure if Makefile doesn't already exist
if [ ! -f Makefile ]; then
# Hacking of time-stamps (lost in git) to avoid autoconf issues
sleep 1; touch aclocal.m4
sleep 1; touch configure; touch config.h.in; touch `find . -name Makefile.in -print`
# Collate arguments to be passed to configure
CONFIGURE_ARGS=""
if [ ! -z "$MAKE" ]; then
CONFIGURE_ARGS=${CONFIGURE_ARGS}${CONFIGURE_ARGS:+ }MAKE="$MAKE"
fi
if [ ! -z "$CC" ]; then
CONFIGURE_ARGS=${CONFIGURE_ARGS}${CONFIGURE_ARGS:+ }CC="$CC"
fi
if [ ! -z "$CXX" ]; then
CONFIGURE_ARGS=${CONFIGURE_ARGS}${CONFIGURE_ARGS:+ }CXX="$CXX"
fi
if [ ! -z "$LD" ]; then
CONFIGURE_ARGS=${CONFIGURE_ARGS}${CONFIGURE_ARGS:+ }LD="$LD"
fi
# Build Makefile
./configure --prefix="$(pwd)" $CONFIGURE_ARGS CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" || exit 1
fi
# Build, install (locally)
make || exit 1
make install || exit 1
# Install links to headers not installed by make install
mkdir -p include # should already exist though
for HEADER in cudd/cuddInt.h config.h st/st.h mtr/mtr.h epd/epd.h util/util.h
#for HEADER in $(find . -name "*.h")
do
if [ ! -L include/`basename $HEADER` ]; then
ln -s ../$HEADER include
fi
done