@@ -250,72 +250,72 @@ if (all(file.exists(eigen_files_to_vendor_src))) {
250
250
}
251
251
}
252
252
253
- # Copy boost_math headers / implementations to an include/ subdirectory of src/
254
- boost_header_files_to_vendor_src <- c()
255
- boost_header_files_to_vendor_dst <- c()
256
- # Existing header files
257
- boost_header_subfolder_src <- " deps/boost_math/include/boost"
258
- boost_header_filenames_src <- list.files(boost_header_subfolder_src , pattern = " \\ .(hpp)$" , recursive = TRUE )
259
- boost_header_files_to_vendor_src <- file.path(boost_header_subfolder_src , boost_header_filenames_src )
260
- # Existing implementation files
261
- boost_impl_subfolder_src <- " deps/boost_math/src"
262
- boost_impl_filenames_src <- list.files(boost_impl_subfolder_src , pattern = " \\ .(cpp)$" , recursive = TRUE )
263
- boost_impl_files_to_vendor_src <- file.path(boost_impl_subfolder_src , boost_impl_filenames_src )
264
- # Destination files
265
- boost_header_subfolder_dst <- " src/include/boost"
266
- boost_header_files_to_vendor_dst <- file.path(cran_dir , boost_header_subfolder_dst , boost_header_filenames_src )
267
- boost_impl_files_to_vendor_dst <- file.path(cran_dir , boost_header_subfolder_dst , boost_impl_filenames_src )
268
-
269
- if (all(file.exists(boost_header_files_to_vendor_src ))) {
270
- n_removed <- suppressWarnings(sum(file.remove(boost_header_files_to_vendor_dst )))
271
- if (n_removed > 0 ) {
272
- cat(sprintf(" Removed %d previously vendored files from src/include/boost\n " , n_removed ))
273
- }
274
-
275
- cat(
276
- sprintf(
277
- " Vendoring files from deps/boost_math/include/boost/ to src/include/boost\n "
278
- )
279
- )
280
-
281
- # Recreate the directory structure
282
- dst_dirs <- unique(dirname(boost_header_files_to_vendor_dst ))
283
- for (dst_dir in dst_dirs ) {
284
- if (! dir.exists(dst_dir )) {
285
- dir.create(dst_dir , recursive = TRUE )
286
- }
287
- }
288
-
289
- if (all(file.copy(boost_header_files_to_vendor_src , boost_header_files_to_vendor_dst ))) {
290
- cat(" All deps/boost_math/include/boost header files successfully copied to src/include/boost\n " )
291
- } else {
292
- stop(" Failed to vendor all deps/boost_math/include/boost header files" )
293
- }
294
- }
295
-
296
- if (all(file.exists(boost_impl_files_to_vendor_src ))) {
297
- n_removed <- suppressWarnings(sum(file.remove(boost_impl_files_to_vendor_dst )))
298
- if (n_removed > 0 ) {
299
- cat(sprintf(" Removed %d previously vendored cpp files from src/include/boost\n " , n_removed ))
300
- }
301
-
302
- cat(
303
- sprintf(
304
- " Vendoring files from deps/boost_math/src/ to src/include/boost\n "
305
- )
306
- )
307
-
308
- # Recreate the directory structure
309
- dst_dirs <- unique(dirname(boost_impl_files_to_vendor_dst ))
310
- for (dst_dir in dst_dirs ) {
311
- if (! dir.exists(dst_dir )) {
312
- dir.create(dst_dir , recursive = TRUE )
313
- }
314
- }
315
-
316
- if (all(file.copy(boost_impl_files_to_vendor_src , boost_impl_files_to_vendor_dst ))) {
317
- cat(" All deps/boost_math/src header files successfully copied to src/include/boost\n " )
318
- } else {
319
- stop(" Failed to vendor all deps/boost_math/src header files" )
320
- }
321
- }
253
+ # # Copy boost_math headers / implementations to an include/ subdirectory of src/
254
+ # boost_header_files_to_vendor_src <- c()
255
+ # boost_header_files_to_vendor_dst <- c()
256
+ # # Existing header files
257
+ # boost_header_subfolder_src <- "deps/boost_math/include/boost"
258
+ # boost_header_filenames_src <- list.files(boost_header_subfolder_src, pattern = "\\.(hpp)$", recursive = TRUE)
259
+ # boost_header_files_to_vendor_src <- file.path(boost_header_subfolder_src, boost_header_filenames_src)
260
+ # # Existing implementation files
261
+ # boost_impl_subfolder_src <- "deps/boost_math/src"
262
+ # boost_impl_filenames_src <- list.files(boost_impl_subfolder_src, pattern = "\\.(cpp)$", recursive = TRUE)
263
+ # boost_impl_files_to_vendor_src <- file.path(boost_impl_subfolder_src, boost_impl_filenames_src)
264
+ # # Destination files
265
+ # boost_header_subfolder_dst <- "src/include/boost"
266
+ # boost_header_files_to_vendor_dst <- file.path(cran_dir, boost_header_subfolder_dst, boost_header_filenames_src)
267
+ # boost_impl_files_to_vendor_dst <- file.path(cran_dir, boost_header_subfolder_dst, boost_impl_filenames_src)
268
+ #
269
+ # if (all(file.exists(boost_header_files_to_vendor_src))) {
270
+ # n_removed <- suppressWarnings(sum(file.remove(boost_header_files_to_vendor_dst)))
271
+ # if (n_removed > 0) {
272
+ # cat(sprintf("Removed %d previously vendored files from src/include/boost\n", n_removed))
273
+ # }
274
+ #
275
+ # cat(
276
+ # sprintf(
277
+ # "Vendoring files from deps/boost_math/include/boost/ to src/include/boost\n"
278
+ # )
279
+ # )
280
+ #
281
+ # # Recreate the directory structure
282
+ # dst_dirs <- unique(dirname(boost_header_files_to_vendor_dst))
283
+ # for (dst_dir in dst_dirs) {
284
+ # if (!dir.exists(dst_dir)) {
285
+ # dir.create(dst_dir, recursive = TRUE)
286
+ # }
287
+ # }
288
+ #
289
+ # if (all(file.copy(boost_header_files_to_vendor_src, boost_header_files_to_vendor_dst))) {
290
+ # cat("All deps/boost_math/include/boost header files successfully copied to src/include/boost\n")
291
+ # } else {
292
+ # stop("Failed to vendor all deps/boost_math/include/boost header files")
293
+ # }
294
+ # }
295
+ #
296
+ # if (all(file.exists(boost_impl_files_to_vendor_src))) {
297
+ # n_removed <- suppressWarnings(sum(file.remove(boost_impl_files_to_vendor_dst)))
298
+ # if (n_removed > 0) {
299
+ # cat(sprintf("Removed %d previously vendored cpp files from src/include/boost\n", n_removed))
300
+ # }
301
+ #
302
+ # cat(
303
+ # sprintf(
304
+ # "Vendoring files from deps/boost_math/src/ to src/include/boost\n"
305
+ # )
306
+ # )
307
+ #
308
+ # # Recreate the directory structure
309
+ # dst_dirs <- unique(dirname(boost_impl_files_to_vendor_dst))
310
+ # for (dst_dir in dst_dirs) {
311
+ # if (!dir.exists(dst_dir)) {
312
+ # dir.create(dst_dir, recursive = TRUE)
313
+ # }
314
+ # }
315
+ #
316
+ # if (all(file.copy(boost_impl_files_to_vendor_src, boost_impl_files_to_vendor_dst))) {
317
+ # cat("All deps/boost_math/src header files successfully copied to src/include/boost\n")
318
+ # } else {
319
+ # stop("Failed to vendor all deps/boost_math/src header files")
320
+ # }
321
+ # }
0 commit comments