Skip to content

Commit 26cf625

Browse files
committed
[GR-15116] Generate the PACKAGES file for internal CRAN repo automatically.
PullRequest: fastr/2000
2 parents 91028e4 + 8957728 commit 26cf625

File tree

3 files changed

+11
-31
lines changed

3 files changed

+11
-31
lines changed

com.oracle.truffle.r.test.native/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -33,7 +33,6 @@ OSNAME := $(shell uname)
3333

3434
all:
3535
mkdir -p $(REPO_DIR)
36-
cp packages/PACKAGES $(REPO_DIR)
3736
$(MAKE) -C urand
3837
$(MAKE) -C packages
3938
ifneq ($(OSNAME), SunOS)

com.oracle.truffle.r.test.native/packages/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -21,7 +21,7 @@
2121
# questions.
2222
#
2323

24-
.PHONY: all clean make_subdirs clean_subdirs clean_recommended
24+
.PHONY: all clean repo clean_repo clean_recommended
2525

2626
SUBDIRS = testrffi vanilla tests4 gnurtests
2727
NATIVE_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

5053
copy_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

6266
clean_recommended:
6367
rm -rf recommended copy_recommended

com.oracle.truffle.r.test.native/packages/PACKAGES

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)