11#
2- # Copyright (c) 2014, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ # Copyright (c) 2014, 2019 , Oracle and/or its affiliates. All rights reserved.
33# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44#
55# This code is free software; you can redistribute it and/or modify it
2121# questions.
2222#
2323
24- .PHONY : all clean make_subdirs clean_subdirs clean_recommended
24+ .PHONY : all clean repo clean_repo clean_recommended
2525
2626SUBDIRS = testrffi vanilla tests4 gnurtests
2727NATIVE_RECOMMENDED_PROJECT = $(subst test.native,native.recommended,$(TOPDIR ) )
@@ -40,24 +40,28 @@ GNUR_RECOMMENDED := $(wildcard $(GNUR_HOME_BINARY)/src/library/Recommended/*.tgz
4040# WARNING: If you add/delete anything in this project you must update mx_fastr_dists.py
4141# to reflect the changes, e.g., adding a new SUBDIR
4242
43- all : make_subdirs copy_recommended
43+ all : repo copy_recommended
4444
45- make_subdirs :
45+ # runs make in all the packages directories
46+ # creates the PACKAGES, PACAKGES.gz, etc. files in the pkgs repository
47+ repo :
4648 for dir in $( SUBDIRS) ; do \
4749 $(MAKE ) PACKAGE=$$ dir -C $$ dir || exit 1; \
4850 done
51+ (cd $( REPO_DIR) ; $( GNUR_HOME_BINARY) /bin/R --vanilla --slave -e " tools::write_PACKAGES('.', type='source')" )
4952
5053copy_recommended :
5154 mkdir -p recommended
5255 cp $(GNUR_RECOMMENDED ) recommended
5356 touch copy_recommended
5457
55- clean : clean_subdirs clean_recommended
58+ clean : clean_repo clean_recommended
5659
57- clean_subdirs :
60+ clean_repo :
5861 for dir in $( SUBDIRS) ; do \
5962 $(MAKE ) PACKAGE=$$ dir -C $$ dir clean || exit 1; \
6063 done
64+ rm $(REPO_DIR ) /PACKAGES*
6165
6266clean_recommended :
6367 rm -rf recommended copy_recommended
0 commit comments