comparison scripts/pkg/private/create_pkgadddel.m @ 21510:ddfd7e5f8d18

pkg: support PKG_ADD file in inst/. * pkg/private/create_pkgadddel.m: inst/ is meant to be the directory of the package "ready" to install" and all files within it are copied to the arch independent directory of the package. However, when reading the m files for PKG_ADD directives, it clobers an existing PKG_ADD file. So append to such file if it exists. This change will break "pkg build" since it is unable to guess the right place for the PKG_ADD (but it is already broken, see bug #45369).
author Carnë Draug <carandraug@octave.org>
date Sun, 20 Mar 2016 21:39:49 +0000
parents 516bb87ea72e
children 6c2fd62db1f7
comparison
equal deleted inserted replaced
21509:dcee67d28570 21510:ddfd7e5f8d18
22 ## Undocumented internal function. 22 ## Undocumented internal function.
23 ## @end deftypefn 23 ## @end deftypefn
24 24
25 function create_pkgadddel (desc, packdir, nm, global_install) 25 function create_pkgadddel (desc, packdir, nm, global_install)
26 instpkg = fullfile (desc.dir, nm); 26 instpkg = fullfile (desc.dir, nm);
27 instfid = fopen (instpkg, "wt"); 27 instfid = fopen (instpkg, "at"); # append to support PKG_ADD at inst/
28 ## If it is exists, most of the PKG_* file should go into the 28 ## If it is exists, most of the PKG_* file should go into the
29 ## architecture dependent directory so that the autoload/mfilename 29 ## architecture dependent directory so that the autoload/mfilename
30 ## commands work as expected. The only part that doesn't is the 30 ## commands work as expected. The only part that doesn't is the
31 ## part in the main directory. 31 ## part in the main directory.
32 archdir = fullfile (getarchprefix (desc, global_install), 32 archdir = fullfile (getarchprefix (desc, global_install),