-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve twoBit R interface compilation
- Add missing symlinks for twobit.h twobit.c (and drop them from .gitignore) - Add Roxygen script to support roxygen2 systems (> 4.0)
- Loading branch information
1 parent
87e99aa
commit afa8921
Showing
5 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
pkg/src/twobit.c | ||
pkg/src/twobit.h | ||
*.roxygen | ||
2bit_ls | ||
test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/Rscript | ||
library(methods) | ||
library(utils) | ||
library(roxygen2) | ||
|
||
args <- commandArgs(TRUE) | ||
|
||
sourcePath = args[1] | ||
|
||
tmp = charToRaw(sourcePath) | ||
if (tmp[length(tmp)] == charToRaw("/")) | ||
tmp = tmp[1:(length(tmp) - 1)] | ||
sourcePath = rawToChar(tmp) | ||
|
||
output = paste(sourcePath, ".roxygen", sep='') | ||
|
||
# | ||
# stupid roxygen no longer supports separte output path | ||
# | ||
res = system(paste("mkdir", output), intern = FALSE, wait = TRUE) | ||
if (res != 0) | ||
stop("failed to create output folder") | ||
|
||
res = system(paste("cp -Rf ", sourcePath, "/* ", output, sep=''), intern = FALSE, wait = TRUE) | ||
if (res != 0) | ||
stop("failed to copy input to output folder") | ||
|
||
#roxygenize(sourcePath, output) | ||
#roxygenize(output, output) | ||
roxygenize(output) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../twobit.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../twobit.h |