Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@
^BRANCHES\.md$
^scripts$
^\.claude$
^\.build$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ cran
/Rplots.pdf
/_codeql_detected_source_root
/tests/testthat/_problems/
/.build/
23 changes: 17 additions & 6 deletions Makefile-cigraph
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(RAY2): src/vendor/%: vendor/%

# R files that are generated/copied

RGEN = R/aaa-auto.R src/rinterface.c \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we add the post-processing step to this makefile so that generating the functions remain a single call?

RGEN = .build/r-wrappers.stamp src/rinterface.c \
configure src/config.h.in

# Files generated by stimulus
Expand All @@ -121,21 +121,32 @@ src/rinterface.c: \
-t tools/stimulus/types-RC.yaml \
-l RC

R/aaa-auto.R: \
# Stimulus generates a single R/aaa-auto.R blob, which tools/split-aaa-auto.R
# then splits into per-category R/aaa-<cat>.R files driven by
# tools/aaa-categories.yaml. The monolithic blob is written to .build/ so it
# never lands in R/ itself.
.build/r-wrappers.stamp: \
venv \
$(vendored_srcdir)/interfaces/functions.yaml \
$(vendored_srcdir)/interfaces/types.yaml \
tools/stimulus/aaa-auto.R.in \
tools/stimulus/functions-R.yaml \
tools/stimulus/types-RR.yaml
tools/stimulus/types-RR.yaml \
tools/aaa-categories.yaml \
tools/split-aaa-auto.R
mkdir -p .build
$(STIMULUS) \
-f $(vendored_srcdir)/interfaces/functions.yaml \
-f tools/stimulus/functions-R.yaml \
-i tools/stimulus/aaa-auto.R.in \
-o R/aaa-auto.R \
-o .build/aaa-auto.R \
-t $(vendored_srcdir)/interfaces/types.yaml \
-t tools/stimulus/types-RR.yaml \
-l RR
Rscript tools/split-aaa-auto.R .build/aaa-auto.R
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaah ok, this was wrong in the PR description

touch $@

r_wrappers: .build/r-wrappers.stamp

# This is the list of all object files in the R package,
# we write it to a file to be able to depend on it.
Expand All @@ -157,9 +168,9 @@ pre_build: venv patches $(RSRC) \
$(PARSER2)

clean:
rm -rf src/core src/vendor src/include src/config.h.in src/rinterface.c R/aaa-auto.R
rm -rf src/core src/vendor src/include src/config.h.in src/rinterface.c R/aaa-*.R .build
git -C $(top_srcdir) reset --hard

.PHONY: all igraph force clean check check-cran check-rhub check-links install test src/sources.mk
.PHONY: all igraph force clean check check-cran check-rhub check-links install test r_wrappers src/sources.mk

.NOTPARALLEL:
Loading