Skip to content

Commit 08cf52d

Browse files
macos issues
1 parent ddac0d9 commit 08cf52d

2 files changed

Lines changed: 9 additions & 30 deletions

File tree

configure

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
#!/bin/sh
33
# configure script to build and install libffi to inst/libffi for Unix
4-
set -e
4+
set -ex
55

66
> config.log
77
THISDir=`dirname $0`
@@ -11,17 +11,11 @@ CC=`"${R_HOME}/bin/R" CMD config CC`
1111
CC=$(echo "${CC}" | awk '{print $1}')
1212
AR=`"${R_HOME}/bin/R" CMD config AR`
1313
RANLIB=`"${R_HOME}/bin/R" CMD config RANLIB`
14-
LOCAL_TINYCC="${THISDir}/tinycc"
1514
TINYCC_SRC="${THISDir}/src/tinycc"
16-
USE_LOCAL=0
17-
if [ -d "$LOCAL_TINYCC" ]; then
18-
TINYCC_SRC="$LOCAL_TINYCC"
19-
USE_LOCAL=1
20-
echo "Using existing tinycc source at $LOCAL_TINYCC" >> config.log
21-
else
22-
echo "Unpacking tinycc tarball to ${TINYCC_SRC} ..." >> config.log
23-
"${R_HOME}/bin/Rscript" "${THISDir}/tools/vendortinycc.R" unpack
24-
fi
15+
16+
echo "Unpacking tinycc tarball to ${TINYCC_SRC} ..." >> config.log
17+
"${R_HOME}/bin/Rscript" "${THISDir}/tools/vendortinycc.R" unpack
18+
2519
TINYCC_DEST="${THISDir}/inst/tinycc"
2620
if [ -d "$TINYCC_DEST" ]; then
2721
echo "Removing existing tinycc installation at $TINYCC_DEST ..." >> config.log
@@ -69,9 +63,6 @@ if [ -d "$TINYCC_SRC" ]; then
6963
done
7064

7165
echo "tinycc built and installed to $TINYCC_DEST" >> config.log
72-
if [ "$USE_LOCAL" -eq 0 ]; then
73-
rm -rf "$TINYCC_SRC"
74-
fi
7566

7667
# Test TinyCC preprocessing with difficult_structs.h
7768
cd "${THISDir}"

configure.win

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
# we are on rtools so we have pkg-config etc
3-
3+
set -ex
44
# Get R's build configuration
55
MAKE=`"${R_HOME}/bin/R" CMD config MAKE`
66
CC=`"${R_HOME}/bin/R" CMD config CC`
@@ -12,15 +12,9 @@ THISDir=$(dirname "$0")
1212
THISDir=$(cd "$THISDir" && pwd)
1313
LOCAL_TINYCC="${THISDir}/tinycc"
1414
TINYCC_SRC="${THISDir}/src/tinycc"
15-
USE_LOCAL=0
16-
if [ -d "$LOCAL_TINYCC" ]; then
17-
TINYCC_SRC="$LOCAL_TINYCC"
18-
USE_LOCAL=1
19-
echo "Using existing tinycc source at $LOCAL_TINYCC"
20-
else
21-
echo "Unpacking tinycc tarball to ${TINYCC_SRC} ..."
22-
"${R_HOME}/bin/Rscript" "${THISDir}/tools/vendortinycc.R" unpack
23-
fi
15+
16+
echo "Unpacking tinycc tarball to ${TINYCC_SRC} ..."
17+
"${R_HOME}/bin/Rscript" "${THISDir}/tools/vendortinycc.R" unpack
2418
TINYCC_DEST="${THISDir}/inst/tinycc"
2519
echo "Package source directory: $THISDir"
2620
echo "TinyCC will be installed to: $TINYCC_DEST"
@@ -130,12 +124,6 @@ if [ -d "$TINYCC_SRC" ]; then
130124
echo "Cannot test TinyCC: binary or test header not found"
131125
fi
132126
echo "=== End TinyCC preprocessing test ==="
133-
echo ""
134-
135-
# remove tinycc source if we unpacked it
136-
if [ "$USE_LOCAL" -eq 0 ]; then
137-
rm -rf "${TINYCC_SRC}"
138-
fi
139127
else
140128
echo "Error: tinycc source directory $TINYCC_SRC does not exist."
141129
exit 1

0 commit comments

Comments
 (0)