From minshall at acm.org  Sun Jul  6 13:34:34 2014
From: minshall at acm.org (Greg Minshall)
Date: Sun, 06 Jul 2014 14:34:34 +0300
Subject: [Rd] request for "minor" fix to src/library/tools/QC.r
Message-ID: <41388.1404646474@greg-minshalls-mbp.local>

hi.  i was hoping to automatically set the Version: number in my package
description file (image2k-package.Rd) in the man directory by using a
.in file in the same directory.  "R CMD build" excludes the .in file
because the routine .check_package_subdirs() in QC.R (which build calls)
doesn't like that file.

.check_package_subdirs() also checks files in R/, and at *that* point in
the code says "now configure might generate files in this directory" and
explicitly allows any files that end in .in.  i wonder if that code
could be duplicated for the case of files in man/?  a diff to that
effect (just copying three lines from the immediately prior case for R/)
is provided below.

(as a check as to the viability of this, i manually added my
man/image2k-package.in file to the tarball built by build, and both
check and install seemed to survive without any problems.  a sample size
of 1 is *always* my favorite. :)

cheers, Greg Minshall
----
--- src/library/tools/R/QC.r	2014-03-25 01:15:06.000000000 +0200
+++ src/library/tools/R/mod-QC.r	2014-07-06 14:05:46.000000000 +0300
@@ -4372,6 +4372,9 @@
                                           full.names = FALSE,
                                           OS_subdirs = OS_subdirs)
         wrong <- setdiff(all_files, man_files)
+        ## now configure might generate files in this directory
+        generated <- grep("\\.in$", wrong)
+        if(length(generated)) wrong <- wrong[-generated]
         if(length(wrong)) {
             wrong_things$man <- wrong
             if(doDelete) unlink(file.path(dir, "man", wrong))



[Rd] request for "minor" fix to src/library/tools/QC.r
Greg Minshall