Mercurial > hg > octave-nkf
changeset 6634:8c2fff7b50b0
[project @ 2007-05-18 21:38:13 by dbateman]
author | dbateman |
---|---|
date | Fri, 18 May 2007 21:38:13 +0000 |
parents | 5af6275fbca9 |
children | c9c504d939c5 |
files | scripts/ChangeLog scripts/pkg/pkg.m |
diffstat | 2 files changed, 45 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2007-05-18 David Bateman <dbateman@free.fr> + + * pkg/pkg.m (install): More verbosity. + (configure_make): Ditto. + (create_pkgadddel): Install in architecture dependent directory if + it exists to address issues with autoload/mfilename. + (write_INDEX): Check in archiecture dependent directories as well. + 2007-05-17 David Bateman <dbateman@free.fr> * plot/hbar.m: Remove.
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -302,12 +302,18 @@ ## Create a temporary directory tmpdir = tmpnam (); tmpdirs{end+1} = tmpdir; + if (verbose) + printf ("mkdir (%s)\n", tmpdir); + endif [status, msg] = mkdir (tmpdir); if (status != 1) error ("couldn't create temporary directory: %s", msg); endif ## Uncompress the package + if (verbose) + printf ("untar (%s, %s)\n", tgz, tmpdir); + endif untar (tgz, tmpdir); ## Get the name of the directories produced by tar @@ -760,6 +766,11 @@ if (! all (isspace (filenames))) mkdir (instdir); if (! all (isspace (archindependent))) + if (verbose) + printf ("copyfile"); + printf (" %s", archindependent{:}); + printf ("%s\n", instdir); + endif [status, output] = copyfile (archindependent, instdir); if (status != 1) rm_rf (desc.dir); @@ -767,6 +778,11 @@ endif endif if (! all (isspace (archdependent))) + if (verbose) + printf ("copyfile"); + printf (" %s", archdependent{:}); + printf (" %s\n", archdir); + endif mkdir (archdir); [status, output] = copyfile (archdependent, archdir); if (status != 1) @@ -799,7 +815,16 @@ endfunction function create_pkgadddel (desc, packdir, nm) - pkg = fullfile (desc.dir, nm); + archdir = fullfile (desc.dir, getarch ()); + + ## If it is exists, the PKG_* files should go into the architecture + ## dependent directory so that the autoload/mfilename commands work + ## as expected... + if (exist (archdir, "dir")) + pkg = fullfile (desc.dir, getarch(), nm); + else + pkg = fullfile (desc.dir, nm); + endif fid = fopen (pkg, "wt"); if (fid >= 0) @@ -1138,6 +1163,17 @@ error ("couldn't read directory %s: %s", dir, msg); endif + ## Check for architecture dependent files + arch = getarch(); + tmpdir = fullfile (dir, arch); + if (exist (tmpdir, "dir")) + [files2, err, msg] = readdir (tmpdir); + if (err) + error ("couldn't read directory %s: %s", tmpdir, msg); + endif + files = [files; files2]; + endif + functions = {}; for i = 1:length (files) file = files{i};