Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo Fabbri authored Dec 22, 2023
1 parent 5533828 commit 6ae421e
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
site:
Rscript -e "rmarkdown::render('README.Rmd', output_file = 'README.md')"
Rscript -e "pkgdown::build_site()"
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`

all: doc vignettes site install_deps build

doc:
Rscript -e "devtools::document()"
build:

vignettes: doc
Rscript -e "devtools::build_vignettes()"

site: doc
Rscript -e "devtools::build_readme()"
Rscript -e "devtools::build_site()"

install_deps:
Rscript \
-e 'if (!requireNamespace("remotes")) install.packages("remotes")' \
-e 'devtools::install_deps(dependencies = TRUE)'

build: doc install_deps
Rscript -e "devtools::build()"

check: build
Rscript -e "devtools::check()"

install: build
Rscript -e "devtools::install()"

clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck

0 comments on commit 6ae421e

Please sign in to comment.