This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Possible bug with generic build script.

On Fri, 15 Oct 2004, Gareth Pearce wrote:

> > Even simpler -- it works for wildcards aiming from a single target
> > directory to a single source directory, i.e., it won't magically flatten a
> > directory tree for you, you'll have to use "find" for that...
> >
> > If you need to copy directory structures using the install_docs mechanism,
> > I suppose it could be done with something like the patch below -- give it
> > a shot.  You will have to put a "/" after each directory that you want
> > copied as a tree.  The flattening is a bit harder, but still doable.
> Since you're just passing this list of files to install, install puts them
> all in the one folder - hence 'flattening' everything.

Whoops, you're right.  Should've read the "install" manpage earlier...

> The / trick is a nice way to support recursive folder contents, if that
> was what you wanted (my particular case has no need for that, its
> directory structure is fairly flat).

This also means that the "/" trick will not work as intended -- it'll just
make "dir/" equivalent to "dir/*"...

> In my version, I ended up making a separate install_docs for each target
> directory - since there was only 2 target directories I wanted, this was no
> real issue.  My original bug report was that wildcards were not working,
> that is fixed.

Great.  It'd still be nice to be able to specify both flat and tree copies
without having to write your own code...

> The concept I had which is not addressed is where defining doc/*.html copies
> into /usr/share/doc/<package>/doc/ rather then /usr/share/doc/<package> -
> However such things are selective, some people might want the later in some
> cases others the former.  My own case, I ended up doing both (to separate
> main docs from the docs for a specific subprogram).  Not sure if addressing
> this issue is worthwhile, there are too many options as to what might be
> wanted.

Well, I don't mind adding code that'll do both kinds of copies (using
"install" in the flat case, and "tar" in the tree case), but the main
question is how to distinguish between them?  I.e., as you said, does
"doc/*.html" mean a flat copy or a tree copy?  Does "doc/*.html/" for tree
copy look too ugly?  Do we ever want to flatten directory structure,
anyway?  That is, can we always take "doc/*.html" to mean a tree copy?  Or
do we just have two variables -- "install_docs" and "install_doc_dirs"
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]