STANDALONE is the jCommon module of jLab.

 STANDALONE  Create stand-alone version of an m-file, including dependencies.
 
    DEPENDS=STANDALONE(FILENAME,SOURCEDIR) looks in m-file FILENAME for all
    calls to m-files in directory SOURCEDIR and subdirectories, and returns 
    in cell array DEPENDS a list of m-files called by FILENAME, or called
    by any m-files called by those files, etc., excluding FILENAME itself.
 
    Thus, in order to create a stand-alone version of FILENAME, one needs
    to include all the files in DEPENDS from SOURCEDIR and subdirectories.
    These files are called the 'dependencies' of FILENAME.
    
    Note that SOURCEDIR must be the full pathname of a directory, e.g.
    SOURCEDIR='/Users/lilly/Desktop/Dropbox/Matlab/jlab'.
 
    FILENAME may either be a string, or a cell array of strings containing
    multiple filenames.  The trailing '.m' extension is not needed.   
    ___________________________________________________________________
 
    Copying files
 
    STANDALONE(FILENAME,SOURCEDIR,TARGETDIR) on Mac or Unix systems copies
    all the files in FILENAME to directory TARGETDIR, which is again the 
    full pathname of a directory, and copies all files in DEPENDS to a
    subdirectory within TARGETDIR named 'private'.  
 
    The directories are created if they do not already exist. 
 
    The subdirectory 'private' has a special meaning in Matlab.  Functions
    in this folder can only be called by functions in the enclosing 
    directory, or by scripts called by these functions. Thus, the 
    dependency files cannot be accidentally called by other functions.  
    
    WARNING: This routine will automatically copy potentially large numbers
    of files by directly accessing the 'cp' command.  If you make an error 
    in the input directories, you could end up with a big mess, or even
    overwrite things you don't want to overwrite.  Please use with caution.
 
    For example, to make a standalone version of this function, type
 
         standalone('standalone',....,
                '/Users/lilly/Desktop/DropBox/Matlab/jlab',...
                '/Users/lilly/Desktop/DropBox/Matlab/standalone')
 
    which copies 'standalone.m' into a directory 'standalone', and its
    dependencies into the subdirectory 'standalone/private'. 
    ___________________________________________________________________
 
    Usage: depends=standalone(filename,sourcedir);
           standalone(filename,sourcedir,targetdir)
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2015--2017 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index