Skip to content

Commit 489ca64

Browse files
committed
use tabs; other fixups
1 parent f7bf0b7 commit 489ca64

File tree

2 files changed

+77
-75
lines changed

2 files changed

+77
-75
lines changed

src/Makevars.in

Lines changed: 76 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@ PKG_CXXFLAGS = @CXX11STD@
33

44
# If TBB_ROOT is defined, use it.
55
ifdef TBB_ROOT
6-
7-
ifndef TBB_LIB
8-
TBB_LIB = $(TBB_ROOT)/lib
9-
endif
10-
11-
ifndef TBB_INC
12-
TBB_INC = $(TBB_ROOT)/include
13-
endif
14-
6+
7+
ifndef TBB_LIB
8+
TBB_LIB = $(TBB_ROOT)/lib
9+
endif
10+
11+
ifndef TBB_INC
12+
TBB_INC = $(TBB_ROOT)/include
13+
endif
14+
1515
endif
1616

1717
# If TBB_LIB is defined by TBB_INC is not, make a guess.
1818
ifdef TBB_LIB
19-
ifndef TBB_INC
20-
TBB_INC = $(TBB_LIB)/../include
21-
endif
19+
ifndef TBB_INC
20+
TBB_INC = $(TBB_LIB)/../include
21+
endif
2222
endif
2323

2424
ifdef TBB_INC
25-
PKG_CPPFLAGS = -I../inst/include -I$(TBB_INC)
25+
PKG_CPPFLAGS = -I../inst/include -I$(TBB_INC)
2626
else
27-
PKG_CPPFLAGS = -I../inst/include
27+
PKG_CPPFLAGS = -I../inst/include
2828
endif
2929

3030
ifdef TBB_LIB
31-
PKG_LIBS = -Wl,-L,"$(TBB_LIB)" -Wl,-rpath,"$(TBB_LIB)" -ltbb -ltbbmalloc
31+
PKG_LIBS = -Wl,-L,"$(TBB_LIB)" -Wl,-rpath,"$(TBB_LIB)" -ltbb -ltbbmalloc
3232
endif
3333

3434
ifeq ($(OS), Windows_NT)
3535

36-
USE_TBB=Windows
37-
TBB_COPY_PATTERN=tbb*.dll
38-
39-
MAKE = make
40-
MAKEFLAGS = -e -j1
41-
MAKE_CMD = \
42-
MSYS2_ARG_CONV_EXCL="*" \
43-
CYGWIN=nodosfilewarning \
44-
CONLY="@WINDOWS_CC@" \
45-
CPLUS="@WINDOWS_CXX11@" \
46-
CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" \
47-
PIC_KEY="@CXX11PICFLAGS@" \
48-
WARNING_SUPPRESS="" \
49-
$(MAKE)
36+
USE_TBB=Windows
37+
TBB_COPY_PATTERN=tbb*.dll
38+
39+
MAKE = make
40+
MAKEFLAGS = -e -j1
41+
MAKE_CMD = \
42+
MSYS2_ARG_CONV_EXCL="*" \
43+
CYGWIN=nodosfilewarning \
44+
CONLY="@WINDOWS_CC@" \
45+
CPLUS="@WINDOWS_CXX11@" \
46+
CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" \
47+
PIC_KEY="@CXX11PICFLAGS@" \
48+
WARNING_SUPPRESS="" \
49+
$(MAKE)
5050

5151
else
52-
53-
UNAME := $(shell uname)
54-
TBB_COPY_PATTERN=libtbb*.*
55-
56-
ifeq ($(UNAME), Darwin)
57-
USE_TBB=Mac
58-
endif
59-
60-
ifeq ($(UNAME), Linux)
61-
USE_TBB=Linux
62-
endif
63-
64-
ifeq ($(UNAME), SunOS)
65-
SUNOS_ARCH = $(shell uname -p)
66-
ifeq ($(SUNOS_ARCH), i386)
67-
USE_TBB=SunOS
68-
endif
69-
endif
70-
71-
MAKEFLAGS += -e
72-
MAKE_CMD = \
73-
CONLY="@CC@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
74-
CPLUS="@CXX11@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
75-
CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" \
76-
PIC_KEY="@CXX11PICFLAGS@" \
77-
WARNING_SUPPRESS="" \
78-
$(MAKE)
52+
53+
UNAME := $(shell uname)
54+
TBB_COPY_PATTERN=libtbb*.*
55+
56+
ifeq ($(UNAME), Darwin)
57+
USE_TBB=Mac
58+
endif
59+
60+
ifeq ($(UNAME), Linux)
61+
USE_TBB=Linux
62+
endif
63+
64+
ifeq ($(UNAME), SunOS)
65+
SUNOS_ARCH = $(shell uname -p)
66+
ifeq ($(SUNOS_ARCH), i386)
67+
USE_TBB=SunOS
68+
endif
69+
endif
70+
71+
MAKEFLAGS += -e
72+
MAKE_CMD = \
73+
CONLY="@CC@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
74+
CPLUS="@CXX11@ $(PKG_CPPFLAGS) @CPPFLAGS@" \
75+
CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" \
76+
PIC_KEY="@CXX11PICFLAGS@" \
77+
WARNING_SUPPRESS="" \
78+
$(MAKE)
7979

8080
endif
8181

@@ -88,29 +88,29 @@ MAKE_TARGETS = tbb_build_prefix=lib tbb_release tbbmalloc_release
8888

8989
ifeq ($(USE_TBB), Windows)
9090

91-
# rtools: turn on hacks to compensate for make and shell differences rtools<=>MinGW
92-
# compiler: overwrite default (which is cl = MS compiler)
93-
MAKE_ARGS += rtools=true compiler=gcc
94-
ifeq ($(WIN), 64)
95-
MAKE_ARGS += arch=intel64 runtime=mingw
96-
ARCH_DIR=x64/
97-
else
98-
MAKE_ARGS += arch=ia32 runtime=mingw
99-
ARCH_DIR=i386/
100-
endif
101-
102-
# Linker needs access to the tbb dll; otherwise you get errors such as:
103-
# "undefined reference to `tbb::task_scheduler_init::terminate()'"
104-
PKG_LIBS += -L$(shell pwd)/tbb/build/lib_release -ltbb -ltbbmalloc
91+
# rtools: turn on hacks to compensate for make and shell differences rtools<=>MinGW
92+
# compiler: overwrite default (which is cl = MS compiler)
93+
MAKE_ARGS += rtools=true compiler=gcc
94+
ifeq ($(WIN), 64)
95+
MAKE_ARGS += arch=intel64 runtime=mingw
96+
ARCH_DIR=x64/
97+
else
98+
MAKE_ARGS += arch=ia32 runtime=mingw
99+
ARCH_DIR=i386/
100+
endif
101+
102+
# Linker needs access to the tbb dll; otherwise you get errors such as:
103+
# "undefined reference to `tbb::task_scheduler_init::terminate()'"
104+
PKG_LIBS += -L$(shell pwd)/tbb/build/lib_release -ltbb -ltbbmalloc
105105

106106
endif
107107

108108
# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
109109
ifeq ($(USE_TBB), SunOS)
110-
R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
111-
ifeq ($(R_32BIT), TRUE)
112-
MAKE_ARGS += arch=ia32
113-
endif
110+
R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
111+
ifeq ($(R_32BIT), TRUE)
112+
MAKE_ARGS += arch=ia32
113+
endif
114114
endif
115115

116116
# Write compilation output to file, and log it if installation fails.
@@ -147,6 +147,8 @@ else
147147
endif
148148

149149
tbb-clean:
150+
@rm -rf ../inst/lib
151+
@rm -rf ../inst/libs
150152
@rm -rf ../inst/include/tbb
151153
@rm -rf ../inst/include/oneapi
152154
@rm -rf ../inst/include/tbb_local

src/install.libs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
sysname,
3232
Windows = ".dll",
3333
Darwin = ".dylib",
34-
".so"
34+
".so.2"
3535
)
3636

3737
fmt <- "cp -R tbb/build/lib_release/*%s '%s/'"

0 commit comments

Comments
 (0)