Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
362 commits
Select commit Hold shift + click to select a range
69f32d8
update `cigraph` to latest
Antonov548 Jul 12, 2023
1874b9d
fix `INDEX_VECTOR`
Antonov548 Jul 13, 2023
447a2b8
fix `ADJLIST`
Antonov548 Jul 13, 2023
4590cd6
add `INDEX_VECTOR_OR_0` - almost 2500 tests :)
Antonov548 Jul 13, 2023
af5dcaa
fix `cliques` types conversion
Antonov548 Jul 13, 2023
452fad4
fix `igraph_weighted_adjacency`
Antonov548 Jul 17, 2023
c3053db
Skip crashes for now
krlmlr Jul 18, 2023
07639e6
Remove stray UNPROTECT()
krlmlr Jul 18, 2023
17a8924
Simplify
krlmlr Jul 18, 2023
9213ada
Install arpack in CI/CD
krlmlr Jul 18, 2023
8bfeafd
Automated changes
krlmlr Jul 18, 2023
0828a9e
add `INDEX_VECTOR_OR_0` type
Antonov548 Jul 18, 2023
1979f50
reverse `OR_0` / update `VERTEX_QTY`
Antonov548 Jul 20, 2023
7325f6d
remove duplicate `VERTEX_QTY`
Antonov548 Jul 20, 2023
eb735c5
add `OPTIONAL` from stimulus
Antonov548 Jul 24, 2023
7663a9f
fix `cluster_leiden` iterations / init functions
Antonov548 Jul 25, 2023
acbe28d
fix `get.adjacency.dense`
Antonov548 Jul 25, 2023
7661407
optional arguments
Antonov548 Jul 26, 2023
f206e29
add `create_vs` for types
Antonov548 Jul 26, 2023
f836315
fix `R_igraph_bfshandler` return
Antonov548 Jul 28, 2023
19da37f
update test error message
Antonov548 Jul 28, 2023
edeb8fc
`cluster_label_prop` return `membership`
Antonov548 Jul 31, 2023
63c24f3
fix `EDGE_CAPACITY` type
Antonov548 Jul 31, 2023
6e9af66
Merge remote-tracking branch 'origin/main' into igraph-0.10
Antonov548 Jul 31, 2023
a9a7563
Automated changes
Antonov548 Jul 31, 2023
296370c
Merge branch 'main' into igraph-0.10
krlmlr Aug 1, 2023
b0b7f78
REVERT ME: Test in order
krlmlr Aug 1, 2023
839d9a5
Skip crashing test
krlmlr Aug 1, 2023
5bf2d3b
fix `igraph_assortativity` argument
Antonov548 Aug 2, 2023
da0b362
fix memory problems
Antonov548 Aug 2, 2023
a18df77
fix `VERTEX_SELECTOR` type memory issue
Antonov548 Aug 2, 2023
56ad6d4
fix `EDGE_SELECTOR` type memory isssues
Antonov548 Aug 2, 2023
16ec445
fix memory issues
Antonov548 Aug 2, 2023
e9a84c7
fix `igraph_realize_degree_sequence` optional type
Antonov548 Aug 3, 2023
f84ebad
fix adjlist/vector_int_list conversion
Antonov548 Aug 3, 2023
755839c
fix `MATRIX_INT` conversion
Antonov548 Aug 3, 2023
9a228ef
fix `GRAPH_LIST` type conversion
Antonov548 Aug 3, 2023
1e37af7
fix `R_igraph_bfshandler` return error
Antonov548 Aug 4, 2023
bc06040
update bfs snapshot
Antonov548 Aug 4, 2023
e24bff0
update girth test
Antonov548 Aug 4, 2023
a081e29
fix shortest_paths tests
Antonov548 Aug 4, 2023
db86416
fix sample_forestfire test
Antonov548 Aug 4, 2023
d7cbe28
fix `R_igraph_get_shortest_paths` return conversion
Antonov548 Aug 4, 2023
2d95f1b
fix optional initialization / unskip "Crashes"
Antonov548 Aug 8, 2023
86bbd7f
Update snapshot
krlmlr Aug 8, 2023
e160117
Update golden results
krlmlr Aug 8, 2023
17e878f
Skip
krlmlr Aug 8, 2023
af81840
Test no longer applicable
krlmlr Aug 8, 2023
fd784cd
Handle edge case
krlmlr Aug 8, 2023
e447070
Back-compatible random walk
krlmlr Aug 8, 2023
9b8dd29
Better prototypes
krlmlr Aug 8, 2023
4382473
Fix R_igraph_layout_merge_dla()
krlmlr Aug 8, 2023
a1f0756
Add modularity
krlmlr Aug 8, 2023
26773d3
Skip remaining tests
krlmlr Aug 8, 2023
c41d963
Install ARPACK
krlmlr Aug 8, 2023
30c2589
Merge branch 'main' into igraph-0.10
krlmlr Aug 13, 2023
120cc3c
REVERT ME: Bring back core for now to reduce PR size
krlmlr Aug 13, 2023
caf59fa
Build-ignore
krlmlr Aug 13, 2023
4793616
Revert "Build-ignore for now"
krlmlr Aug 13, 2023
022f759
Build-ignore dot files
krlmlr Aug 13, 2023
a99664c
Install GLPK on macOS
krlmlr Aug 13, 2023
b804dce
Try moving build to Makevars
krlmlr Aug 13, 2023
ffe8845
Revert "Try moving build to Makevars"
krlmlr Aug 13, 2023
69251ba
Merge branch 'main' into igraph-0.10
krlmlr Aug 16, 2023
5544da0
Merge branch 'main' into igraph-0.10
krlmlr Aug 16, 2023
79d7d42
fix `EDGE_INDICES`
Antonov548 Aug 23, 2023
a73221b
refactor: change integer types to igraph_integer_t in many places whe…
szhorvat Aug 24, 2023
10ffbdb
refactor: convert more integer quantities to igraph_integer_t
szhorvat Aug 26, 2023
1bdbb0f
use Makevars generator
Antonov548 Aug 18, 2023
098c496
libxml2 configure
Antonov548 Aug 19, 2023
25476cf
add `sources.mk`
Antonov548 Aug 21, 2023
674b2f2
update configure to try also xml2-config
Antonov548 Aug 21, 2023
9ed6b95
update `configure.win`
Antonov548 Aug 21, 2023
84f5c63
Don't need gfortran and quadmath?
krlmlr Aug 22, 2023
9cf76ac
Avoid HAVE_USELOCALE
krlmlr Aug 22, 2023
f38d171
revert
Antonov548 Aug 22, 2023
01e0035
make sources
Antonov548 Aug 22, 2023
902417b
update `Makevars.win`
Antonov548 Aug 22, 2023
da0aaa5
update `Makevars.ucrt`
Antonov548 Aug 22, 2023
54f3b28
delete include files
Antonov548 Aug 23, 2023
f0838e0
update include
Antonov548 Aug 24, 2023
7f84b4b
add vendor/io
Antonov548 Aug 24, 2023
e477ccf
delete parsers
Antonov548 Aug 24, 2023
673627f
return parsers
Antonov548 Aug 24, 2023
aefb5c6
Revert "update `Makevars.ucrt`"
Antonov548 Aug 24, 2023
5626687
Revert "update include"
Antonov548 Aug 24, 2023
76050f9
fixed parsers
Antonov548 Aug 24, 2023
e7f4388
move include
Antonov548 Aug 24, 2023
4ed48e7
move include
Antonov548 Aug 24, 2023
f66e62a
init fix Makefile-cigraph
Antonov548 Aug 24, 2023
11b1a42
add source.mk generation
Antonov548 Aug 25, 2023
9a9ab13
REVERT ME: Remove failing examples
krlmlr Aug 28, 2023
a4b3517
remove thread flags
Antonov548 Aug 28, 2023
eb4f5b2
update `Makevars.win`
Antonov548 Aug 28, 2023
47940ad
Tweak tests
krlmlr Aug 28, 2023
4992354
REVERT ME: Error on error only
krlmlr Aug 28, 2023
0b3d7cd
Try config.h for uuid
krlmlr Aug 29, 2023
bb5111c
Remove .ucrt, can use .win, it's the same
krlmlr Aug 29, 2023
256b043
Remove -L, should be picked up from correct location automatically on…
krlmlr Aug 29, 2023
05c4436
Empty configure.win, as xml2
krlmlr Aug 29, 2023
ab6cf89
Sync PKG_CPPFLAGS
krlmlr Aug 29, 2023
8e1420d
ci: install libglpk-dev for sanitizer run
szhorvat Aug 29, 2023
4c0175d
Revert "ci: install libglpk-dev for sanitizer run"
szhorvat Aug 29, 2023
f8628c3
update sources.mk / remove patches
Antonov548 Aug 29, 2023
60e5e2b
use `INTERNAL_ARPACK`
Antonov548 Aug 29, 2023
ce74ea9
fix: do not re-initialize element of matrix list
szhorvat Aug 29, 2023
4a45f47
revert me: tmate
Antonov548 Aug 30, 2023
383658f
revert tmate
Antonov548 Aug 30, 2023
cfb39e5
add `CI` env for sanitaizer
Antonov548 Aug 30, 2023
1ca7e54
fix space
Antonov548 Aug 30, 2023
f033fb9
REVERT ME: printenv
Antonov548 Aug 30, 2023
1d45f58
set CI true
Antonov548 Aug 31, 2023
59c7aa9
update cigraph sources
Antonov548 Sep 1, 2023
d68d45a
revert me: tmate
Antonov548 Sep 1, 2023
8939f58
revert tmate / stimulus version update
Antonov548 Sep 1, 2023
6087c58
add check compiler to configure
Antonov548 Sep 1, 2023
d832515
Build-ignore
krlmlr Aug 29, 2023
66c96ef
require() -> requireNamespace()
krlmlr Aug 29, 2023
e3f1575
Revert "add check compiler to configure"
Antonov548 Sep 4, 2023
6e835bf
HAVE__STRICMP and HAVE__STRNICMP
krlmlr Sep 5, 2023
3b8ccf2
tmate session
Antonov548 Sep 5, 2023
424e839
use `igraph_i_strdup`
Antonov548 Sep 5, 2023
a98b20b
remove tmate
Antonov548 Sep 5, 2023
52937fc
remove -DIGRAPH_THREAD_LOCAL=/**/
Antonov548 Sep 5, 2023
46642af
again try tmate
Antonov548 Sep 6, 2023
8630574
add `-DIGRAPH_THREAD_LOCAL=`
Antonov548 Sep 6, 2023
2e4fe47
add to .ucrt
Antonov548 Sep 6, 2023
cecb705
tmate
Antonov548 Sep 11, 2023
01b41fb
Define concurrency
krlmlr Sep 5, 2023
4a4db24
REVERT ME: Only Windows
krlmlr Sep 12, 2023
5dbfc70
Detached tmate
krlmlr Sep 12, 2023
1b01879
SSH later, for environment variables, and sleep
krlmlr Sep 12, 2023
69e48c0
tmate update
Antonov548 Sep 12, 2023
59ee45a
add limit-access-to-actor: true
Antonov548 Sep 12, 2023
6bf1bbf
remove one session
Antonov548 Sep 12, 2023
9686bd1
simple tmate
Antonov548 Sep 12, 2023
ec915fe
undo build-and-check
Antonov548 Sep 14, 2023
be4febd
update build-and-check
Antonov548 Sep 14, 2023
53d4417
update build-and-check
Antonov548 Sep 14, 2023
11db94f
update build-and-check
Antonov548 Sep 14, 2023
d438e71
REVERT ME: skip tests for windows
Antonov548 Sep 14, 2023
5f89a68
try `skip_on_cran()`
Antonov548 Sep 20, 2023
1518adb
skip tests
Antonov548 Sep 20, 2023
e4adf5e
Remove core/ and include/ from include path
krlmlr Sep 20, 2023
6a352fd
Reduce PR size
krlmlr Sep 20, 2023
3cc72d1
Merge branch 'main' into igraph-0.10
krlmlr Sep 26, 2023
1c02ed7
Merge branch 'main' into igraph-0.10
krlmlr Sep 26, 2023
9b2b641
Merge branch 'main' into igraph-0.10
krlmlr Sep 26, 2023
251c01e
Merge branch 'main' into igraph-0.10
krlmlr Sep 26, 2023
7d46302
revdepcheck results
krlmlr Sep 26, 2023
2790540
unskip `cluster_leading_eigen` test
Antonov548 Sep 27, 2023
c373576
fix update-cigraph script
Antonov548 Sep 27, 2023
eb91782
fix `numeric`
Antonov548 Sep 27, 2023
d071610
fix typo
Antonov548 Sep 27, 2023
5db0b71
undo include
Antonov548 Sep 27, 2023
682e9ac
Bump version to 1.5.1.9007
krlmlr Sep 27, 2023
9747c7b
chore: Install ccache on GHA
krlmlr Sep 28, 2023
9b41fdc
Merge branch 'main' into igraph-0.10
krlmlr Sep 28, 2023
5dff8cb
Merge branch 'main' into igraph-0.10
krlmlr Sep 28, 2023
aa9117a
Merge branch 'main' into igraph-0.10
krlmlr Oct 5, 2023
71e4e6e
update parsers
Antonov548 Oct 5, 2023
06f39aa
fix: translate igraph_adjacency_t values correctly for 0.10
szhorvat Oct 5, 2023
92983a8
adjacency.R example
Antonov548 Oct 10, 2023
fe58af8
remove `location` report
Antonov548 Oct 10, 2023
59329e2
cliques.R example
Antonov548 Oct 10, 2023
1369ed4
fit.R example
Antonov548 Oct 10, 2023
be6cd71
paths.R example
Antonov548 Oct 10, 2023
6816ad0
fix `R_igraph_plfit_result_to_SEXP`
Antonov548 Oct 10, 2023
7224e5a
structural.properties.R example
Antonov548 Oct 10, 2023
66bf990
Bump version to 1.5.1.9010
krlmlr Oct 6, 2023
9bc837c
chore: added FUNDING.yml
ntamas Oct 9, 2023
9dbeacc
Bump version to 1.5.1.9011
krlmlr Oct 10, 2023
a41033c
Fix snapshots
krlmlr Oct 10, 2023
97f3c98
105 -> 88 problems
krlmlr Oct 10, 2023
caed705
fix: dfs handler
Antonov548 Oct 11, 2023
4bc47dc
Merge branch 'igraph-0.10' of https://github.com/igraph/rigraph into …
Antonov548 Oct 11, 2023
123ff6f
fix: weighted adjacency set attributes /
Antonov548 Oct 12, 2023
2e956d7
unskip: weighted graph_from_adjacency_matrix works on integer matrices
Antonov548 Oct 12, 2023
0435b0d
fix: `cluster_edge_betweenness`
Antonov548 Oct 13, 2023
7546a8b
unskip: community detection functions work
Antonov548 Oct 16, 2023
fd91642
update doc
Antonov548 Oct 16, 2023
cfa2f2a
support for tri-values loop control
szhorvat Oct 16, 2023
59476ec
unskip: graph_from_adjacency_matrix works
Antonov548 Oct 17, 2023
7d5cbd4
docs: update assortativity docs with new parameter names
szhorvat Oct 17, 2023
56eb3e3
unksip: windows freezing tests
Antonov548 Oct 20, 2023
168e276
Much fewer problems
krlmlr Oct 20, 2023
3f62aa5
fix: update football.gml to be conformant
szhorvat Oct 21, 2023
91af1c8
Merge remote-tracking branch 'origin/main' into igraph-0.10
Antonov548 Oct 21, 2023
a464102
Merge branch 'main' into igraph-0.10
krlmlr Oct 21, 2023
bebc929
Result update
krlmlr Oct 22, 2023
cd13770
Fix protection
krlmlr Oct 22, 2023
2e071af
Support name of weight attribute again
krlmlr Oct 22, 2023
a346832
Halving
krlmlr Oct 22, 2023
6103dfd
docs: update girth docs to indicate that now infinity is returned for…
szhorvat Oct 22, 2023
7ce1a8e
Merge branch 'main' into igraph-0.10
krlmlr Oct 22, 2023
e4509ba
Two fewer
krlmlr Oct 22, 2023
8080664
Update vendored igraph/C to igraph/igraph@e502113a139de32a306a6f87034…
szhorvat Oct 22, 2023
b923308
feat: greedy_vertex_coloring() gets support for "dsatur" heuristic
szhorvat Oct 22, 2023
2bceaf5
fix a deprecation warning
szhorvat Oct 22, 2023
acd6c09
update stimulus to 0.18
szhorvat Oct 22, 2023
bc48169
autogen C code for adjacency() and weighted_adjacency()
szhorvat Oct 22, 2023
e5e5df1
treat NEIMODE enum as integer in R
szhorvat Oct 22, 2023
3a14895
docs: regenerate docs
szhorvat Oct 23, 2023
2b14f99
feat: is_forest
szhorvat Oct 23, 2023
b904eab
feat: is_acyclic
szhorvat Oct 23, 2023
d6a2b96
docs: update is_forest() example
szhorvat Oct 23, 2023
78fe492
refactor: integer values are now traferred to C as 'numeric' instead …
szhorvat Oct 23, 2023
58ef787
fix: a few missed integer -> numeric conversions
szhorvat Oct 23, 2023
a092487
refactor: make use of R's own gamma and Poission samplers
szhorvat Oct 23, 2023
5774311
tests: improve Dirichlet sampler test, fix mean value test
szhorvat Oct 23, 2023
68cb969
Now 29 new problems
krlmlr Oct 24, 2023
b1bd446
Update vendored igraph/C to igraph/igraph@6cca390c655678c07053e11428d…
szhorvat Oct 24, 2023
1162d97
Update vendored igraph/C to igraph/igraph@d14c10903c445443452671e94cf…
szhorvat Oct 24, 2023
2f0afaf
Update vendored igraph/C to igraph/igraph@fbcef007a008d1716f08ca04362…
szhorvat Oct 26, 2023
65c2c4a
Update vendored igraph/C to igraph/igraph@771a449d09fcb4926d123975f35…
szhorvat Oct 26, 2023
cae0093
Update vendored igraph/C to igraph/igraph@35c631497e66a4db8d50a9691e0…
szhorvat Oct 26, 2023
f772ee3
update parsers
Antonov548 Oct 27, 2023
cb7ceda
is_tree: separate `VERTEX_ROOT` type
Antonov548 Oct 27, 2023
788ced4
fix: `cluster_fluid_communities`
Antonov548 Oct 30, 2023
4eb088c
Merge branch 'main' into igraph-0.10
krlmlr Oct 30, 2023
a5effd8
Document
krlmlr Oct 30, 2023
4e3efcc
Update vendored igraph/C to igraph/igraph@8c66cbd900bb7ae1f998f39c31c…
szhorvat Nov 2, 2023
ad1c282
Merge branch 'main' into igraph-0.10
krlmlr Nov 9, 2023
ef0d917
fix `all_shortest_paths` return names
Antonov548 Nov 10, 2023
605804a
Merge remote-tracking branch 'origin/main' into igraph-0.10
Antonov548 Nov 10, 2023
1ae0269
update `cpp11`
Antonov548 Nov 10, 2023
f331f62
remove Rplots.pdf
Antonov548 Nov 10, 2023
25f6417
remove graph.bfs.new.md
Antonov548 Nov 10, 2023
1343542
Merge branch 'main' into igraph-0.10
krlmlr Nov 10, 2023
8f926a2
Merge branch 'main' into igraph-0.10
krlmlr Nov 10, 2023
3af0df2
Merge branch 'main' into igraph-0.10
krlmlr Nov 10, 2023
bd75925
Fix tests according to documentation, one failure remains
krlmlr Nov 10, 2023
3fa5b62
Merge branch 'main' into igraph-0.10
krlmlr Nov 11, 2023
237b63a
Merge branch 'main' into igraph-0.10
krlmlr Nov 18, 2023
7fa65b1
Shallow clone
krlmlr Nov 18, 2023
7ff87d1
Update vendored igraph/C to igraph/igraph@99a314ee38c6ea4252a9db94a3a…
krlmlr Nov 18, 2023
1263765
Merge branch 'main' into igraph-0.10
krlmlr Nov 18, 2023
efe7e38
Merge branch 'main' into igraph-0.10
krlmlr Nov 18, 2023
fbf21c8
Avoid -e
krlmlr Nov 18, 2023
30b91fa
Update generated code
krlmlr Nov 18, 2023
4872afd
Manually sync autogenerated code
krlmlr Nov 18, 2023
801933a
Merge branch 'main' into igraph-0.10
krlmlr Nov 18, 2023
5632523
Merge branch 'main' into igraph-0.10
krlmlr Nov 21, 2023
b156dbc
revdepcheck results
krlmlr Nov 21, 2023
f853ff7
Merge branch 'main' into igraph-0.10
krlmlr Nov 21, 2023
6a67e4e
Current results
krlmlr Nov 21, 2023
ada1e08
Merge branch 'main' into igraph-0.10
krlmlr Dec 6, 2023
82c9d4a
Revert "chore: Work around ggnetwork problems for now (#987)"
krlmlr Dec 6, 2023
dcf5a5b
Update revdepcheck results
krlmlr Dec 7, 2023
8b94897
Merge branch 'main' into igraph-0.10
krlmlr Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
src/vendor/cigraph

^tags$
^.github$
^cigraph$
Expand Down Expand Up @@ -44,5 +42,9 @@ src/vendor/cigraph
^CITATION\.cff$
^cran$
^R/cran\.R$
^src/build$
^src/install$
^src/vendor/cigraph/\..*$
^rconfigure\.py$
^\.ccache$
^\.aviator/config\.yml$
29 changes: 27 additions & 2 deletions .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- main
- fix/*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true

name: R-CMD-check

jobs:
Expand All @@ -35,6 +39,7 @@ jobs:
- name: apt update
run: |
sudo apt-get update
sudo apt-get install -y libarpack2-dev
shell: bash

- name: Cache Python virtualenv
Expand Down Expand Up @@ -135,6 +140,19 @@ jobs:
save: false
restore: false

- name: apt update
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libarpack2-dev
shell: bash

- name: apt update
if: runner.os == 'macOS'
run: |
brew install glpk
shell: bash

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -154,7 +172,7 @@ jobs:
- name: Check R package
uses: r-lib/actions/check-r-package@v2
with:
error-on: '"note"'
error-on: '"error"'

coverage:
runs-on: ubuntu-20.04
Expand All @@ -173,6 +191,12 @@ jobs:
with:
fetch-depth: 0

- name: apt update
run: |
sudo apt-get update
sudo apt-get install -y libarpack2-dev
shell: bash

- name: Setup R
uses: r-lib/actions/setup-r@v2

Expand All @@ -188,7 +212,6 @@ jobs:
- name: Run coverage
run: |
line_exclusions <- fs::dir_ls(c("src/vendor"), type = "file", recurse = TRUE)

cov <- covr::package_coverage(
type = c("tests", "examples"),
line_exclusions = as.list(names(line_exclusions)),
Expand All @@ -212,6 +235,7 @@ jobs:
- name: apt update
run: |
sudo apt-get update
sudo apt-get install -y libarpack2-dev
shell: bash

- name: run sanitizer
Expand All @@ -221,6 +245,7 @@ jobs:
options: --rm --platform linux/amd64 -v ${{ github.workspace }}:/rigraph
run: |
set -e
printenv
cd rigraph
RDcsan CMD INSTALL . --no-byte-compile
TESTTHAT_PARALLEL=false CI=true RDcsan -q -e 'testthat::test_local(reporter = c("location", "summary"), load_package = "installed")'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ igraph.Rcheck/
.vscode/
.Rproj.user
/configure~
/build/
/src/build/
/src/install/
inst/doc
cran
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "cigraph"]
path = cigraph
url = https://github.com/igraph/igraph.git
branch = cran
60 changes: 15 additions & 45 deletions Makefile-cigraph
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ all: pre_build
########################################################
# Main package

top_srcdir=cigraph
# FIXME: with the switch to igraph 0.10, change to:
# vendored_srcdir=src/vendor/cigraph
top_srcdir=src/vendor/cigraph
vendored_srcdir=$(top_srcdir)
VERSION=$(shell tools/getversion.sh)

Expand All @@ -22,54 +20,23 @@ VERSION=$(shell tools/getversion.sh)
version_number: force
@echo '$(VERSION)' | cmp -s - $@ || echo '$(VERSION)' > $@

# Source files from the C library
CORESRC := $(shell cd $(top_srcdir) ; git ls-files --full-name src | \
grep -v '\.txt$$' | grep -v "COPYING$$" | grep -v "README" | \
grep -v "src/config.h.in" )

# Vendored dependencies of the C library. We don't need BLAS / LAPACK
# because they are included in R. We don't need F2C either because we
# will use the original Fortran sources for ARPACK. We also rely on an
# external GLPK instead of the one vendored in igraph because the
# vendored GLPK does not fit well in the build process of the R interface.
VENDORSRC := $(shell cd $(top_srcdir) ; git ls-files --full-name vendor | \
grep -v "^vendor/lapack/" | grep -v "^vendor/f2c" | \
grep -v "^vendor/glpk/" | \
grep -v '\.txt$$' | grep -v "COPYING$$" | grep -v "README" )

# Include files from the C library
CINC := $(shell cd $(top_srcdir) ; git ls-files --full-name include)
CINC := $(patsubst include/%, src/include/%, $(CINC))

# Transform CORESRC and VENDORSRC to their target folders in src/
CORESRC := $(patsubst src/%, src/core/%, $(CORESRC))
VENDORSRC := $(patsubst vendor/%, src/vendor/%, $(VENDORSRC))

# Rules that copy the sources from cigraph/ to src/
$(CORESRC): src/core/%: $(top_srcdir)/src/%
mkdir -p $(@D) && cp $< $@
$(VENDORSRC): src/vendor/%: $(top_srcdir)/vendor/%
mkdir -p $(@D) && cp $< $@
$(CINC): src/include/%: $(top_srcdir)/include/%
mkdir -p $(@D) && cp $< $@

# Files generated by flex/bison

PARSER := $(shell cd $(top_srcdir) ; git ls-files --full-name src | \
grep -E '\.(l|y)$$')
PARSER1 := $(patsubst src/%.l, src/core/%.c, $(PARSER))
PARSER2 := $(patsubst src/%.y, src/core/%.c, $(PARSER1))
PARSER1 := $(patsubst src/%.l, src/%.c, $(PARSER))
PARSER2 := $(patsubst src/%.y, src/%.c, $(PARSER1))

YACC=bison -b yy -d
LEX=flex

%.c: %.y
$(YACC) $<
mv -f yy.tab.c $@
mv -f yy.tab.h $(@:.c=.h)
mv -f yy.tab.c src/vendor/io/$(notdir $@)
mv -f yy.tab.h src/vendor/io/parsers/$(basename $(notdir $@)).h

%.c: %.l
$(LEX) -o $@ --header-file=$(@:.c=.h) $<
$(LEX) -o src/vendor/io/$(notdir $@) --header-file=src/vendor/io/parsers/$(basename $(notdir $@)).h $<

# Create Python virtualenv for Stimulus

Expand All @@ -83,15 +50,12 @@ $(PYVENV)/stamp: tools/build-requirements.txt
# Apply possible patches

patches: $(CORESRC) $(VENDORSRC) $(CINC) $(PARSER2)
if [ -d "patches" ]; then \
find patches -type f -name '*.patch' -print0 | sort -z | xargs -t -0 -n 1 tools/apply-patch.sh; \
fi
-rm -f src/*.orig
tools/fix-lexers.sh

# C files generated by C configure

CGEN = src/include/igraph_export.h src/include/igraph_threading.h src/include/igraph_version.h
CGEN = src/include/igraph_export.h src/include/igraph_threading.h src/include/igraph_version.h src/sources.mk

src/include/igraph_export.h: tools/stimulus/igraph_export.h
mkdir -p src/include
Expand All @@ -105,6 +69,11 @@ src/include/igraph_version.h: $(top_srcdir)/include/igraph_version.h.in
mkdir -p src/include
cp $< $@

# Create sources.mk

src/sources.mk:
$(PYTHON) rconfigure.py

# R source and doc files

RSRC := $(shell git ls-files R doc inst demo NEWS cleanup.win configure.win)
Expand Down Expand Up @@ -201,8 +170,9 @@ src/Makevars.win src/Makevars.ucrt src/Makevars.in: src/%: tools/stimulus/% \
# Can't insert newlines, not all make variants accept them
cat object_files >> $@

pre_build: venv patches $(CSRC) $(CINC2) $(PARSER2) $(RSRC) $(RGEN) \
$(CGEN) $(RAY2) $(ARPACK2) $(UUID2)
pre_build: venv patches $(RSRC) \
$(CGEN) $(RAY2) $(ARPACK2) $(UUID2) \
$(PARSER2)

clean:
rm -rf src/core src/vendor src/include src/Makevars.in src/Makevars.ucrt src/Makevars.win src/config.h.in src/rinterface.c R/aaa-auto.R
Expand Down
Loading