From hb at biostat.ucsf.edu  Tue Apr 17 23:20:17 2012
From: hb at biostat.ucsf.edu (Henrik Bengtsson)
Date: Tue, 17 Apr 2012 14:20:17 -0700
Subject: [Rd] Setting up the NAMESPACE file "automatically" during R CMD
	build?
Message-ID: <CAFDcVCQOqXqR3LPAyPahWcPxj8nwK+5x_1AYsmSqjCKct6yraQ@mail.gmail.com>

Hi,

I'd like to compile the NAMESPACE file from a template where things
such as S3method() statements are automatically inserted based on code
inspection, because doing it by hand is too error prone.  I am
currently generating a NAMESPACE file this way which I copy to my
package root, but I'd like to automate this so it is done when
building the *.tar.gz source (during 'R CMD build'), such that is
there for building binaries and when installing the package.

What is the best way to do this?  I was thinking of utilizing a
<pkg>/configure script, but as far I understand "Writing R
Extensions", that is only run by 'R CMD INSTALL' not 'R CMD build'.
Am I asking the wrong question?

Thanks,

Henrik



[Rd] Setting up the NAMESPACE file "automatically" during R CMD build?
Henrik Bengtsson