Skip to content

Instantly share code, notes, and snippets.

@vsbuffalo
Created December 8, 2010 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsbuffalo/734056 to your computer and use it in GitHub Desktop.
Save vsbuffalo/734056 to your computer and use it in GitHub Desktop.
R package Makefile template
# R package Makefile template
# Vince Buffalo <vsbuffaloAAAAA@gmail.com> (with poly-A tail removed)
#
# Replace 'package' with the name of your package (which should be a
# directory). My layout for package development is:
# package_build
# - TODO
# - Readme.md (for Github)
# - package (actual R package directory)
# - Makefile (this)
# - test-all.R (but this is just a wrapper around package/tests
#
DIR=package
PKG=$(DIR)_*.tar.gz
build: clean
R CMD build $(DIR)
install:
R CMD install $(PKG)
all: build install
clean: clean-pdf
rm -f qrqc_*.tar.gz
clean-pdf:
rm -f $(DIR).pdf
pdf: clean-pdf
R CMD Rd2pdf $(DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment