Skip to content

Commit

Permalink
Merge pull request #118 from cbeleites/bugfix/104-make-trouble
Browse files Browse the repository at this point in the history
use git clean for Makefile target clean, remove target superclean.
  • Loading branch information
ximeg authored May 12, 2020
2 parents 5f0d107 + b0a78a3 commit ca32409
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
24 changes: 5 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,17 @@ all: roxygenize pkg-data pkg-doc vignettes pkg-vignettes | fileio-tests
DATE = $(shell date +%Y%m%d)

clean:
@rm -f *~ .*~ \#*\#
@rm -f hyperSpec_*.tar.gz
@rm -rf hyperSpec.Rcheck
$(MAKE) -C Vignettes/baseline clean
$(MAKE) -C Vignettes/chondro clean
$(MAKE) -C Vignettes/fileio clean
$(MAKE) -C Vignettes/flu clean
$(MAKE) -C Vignettes/hyperspec clean
$(MAKE) -C Vignettes/laser clean
$(MAKE) -C Vignettes/plotting clean
$(MAKE) -C hyperSpec/inst/doc clean
$(MAKE) -C hyperSpec/vignettes -f Makefile-local clean

superclean:
@git clean -q -f -x -d
@git clean -q -f -x -d --exclude .Rproj.user/ --exclude hyperSpec.Rproj

# TODO: add dependency `clean`

## bootstrap target does the required processing immediately after cloning, superclean, or
## bootstrap target does the required processing immediately after cloning, clean, or
## if the installed version of hyperSpec is too old for building the vignettes

bootstrap: installdeps bootstrapI chondro flu laser pkg-data | fileio-tests
bootstrap: installdeps pkg-data bootstrapI chondro flu laser | fileio-tests
@R CMD build --no-build-vignettes hyperSpec/
@R CMD INSTALL hyperSpec_*-$(DATE).tar.gz
$(MAKE) -C hyperspec/vignettes -f Makefile-local
$(MAKE) -C hyperSpec/vignettes -f Makefile-local

bootstrapI: roxygenize
@R CMD build --no-build-vignettes hyperSpec/
Expand Down Expand Up @@ -111,7 +97,7 @@ flu:

hyperspec:
$(MAKE) -C Vignettes/hyperspec
$(MAKE) -C hyperSpec/vignettes -f Makefile-local hyperspec.Rnw
$(MAKE) -C hyperSpec/vignettes -f Makefile-local all

# laser ............................................................................................

Expand Down
3 changes: 3 additions & 0 deletions hyperSpec/vignettes/Makefile-local
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ rawdata:

# hyperspec vignette (aka introduction)

../../Vignettes/hyperspec/strukturhyperspec.pdf:
@$(MAKE) -C ../../Vignettes/hyperspec strukturhyperspec.pdf

hyperspec.Rnw: ../../Vignettes/hyperspec/hyperspec.Rnw ../../Vignettes/hyperspec/strukturhyperspec.pdf \
../../Vignettes/hyperspec/functions.RData ../../Vignettes/hyperspec/hyperspec.bib
cp -av $^ ./
Expand Down

0 comments on commit ca32409

Please sign in to comment.