something like,

copy \
                {*}[glob ${srcdir}/*.c] \
                {*}[glob ${srcdir}/*.h] \
                {*}[glob ${srcdir}/examples] \
                ${destroot}${prefix}/share/libreduce/src



Mark Brethen
[email protected]



> On Oct 4, 2018, at 9:26 PM, Mark Brethen <[email protected]> wrote:
> 
> Here is the contents of src, after build:
> 
> brethen-air:src marbre$ ls -al
> total 496
> drwxr-xr-x  22 macports  admin     748 Oct  4 20:06 .
> drwxr-xr-x   5 macports  admin     170 Oct  4 20:06 ..
> -rw-r--r--   1 macports  admin    3750 Feb 25  2016 Makefile.in
> -rw-r--r--   1 macports  admin    7737 Mar 20  2013 RedAns.c
> -rw-r--r--   1 macports  admin    2065 Feb 28  2009 RedAns.h
> -rw-r--r--   1 macports  admin    2261 Feb 28  2009 RedMsg.c
> -rw-r--r--   1 macports  admin    1757 Feb 28  2009 RedMsg.h
> -rw-r--r--   1 macports  admin    7476 Jan  1  2010 RedProc.c
> -rw-r--r--   1 macports  admin    2114 Feb 28  2009 RedProc.h
> -rw-r--r--   1 macports  admin    2083 Feb 25  2016 RedPy.c
> -rw-r--r--   1 macports  admin    3497 Jan  1  2010 StrBuf.c
> -rw-r--r--   1 macports  admin    1960 Jan  1  2010 StrBuf.h
> -rw-r--r--   1 macports  admin    9281 Jan  2  2010 ac_python_devel.m4
> drwxr-xr-x   7 macports  admin     238 Oct  4 20:06 autom4te.cache
> lrwxr-xr-x   1 macports  admin      21 Sep 20 04:46 config.guess -> 
> ../../../config.guess
> -rw-r--r--   1 macports  admin    2630 Oct  4 20:06 config.h.in
> lrwxr-xr-x   1 macports  admin      19 Sep 20 04:46 config.sub -> 
> ../../../config.sub
> -rwxr-xr-x   1 macports  admin  159697 Oct  4 20:06 configure
> -rw-r--r--   1 macports  admin    7254 Jan  2  2010 configure.ac
> drwxr-xr-x   5 macports  admin     170 Sep 20 04:46 examples
> lrwxr-xr-x   1 macports  admin      19 Sep 20 04:46 install-sh -> 
> ../../../install-sh
> -rw-r--r--   1 macports  admin    4225 Dec  2  2010 reduce.h
> 
> There is currently no written documentation yet. Instead, the developer 
> suggests looking at “src/examples/lrtest.c” and "src/reduce.h”. I thought it 
> would be good to copy the source into $destroot/$prefix/share/libreduce. 
> Anything with today’s date isn’t necessary. Configure and makefile, as well 
> as links aren’t necessary either.
> 
> 
> 
> Mark Brethen
> [email protected] <mailto:[email protected]>
> 
> 
> 
>> On Oct 4, 2018, at 9:11 PM, Ryan Schmidt <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> 
>> 
>> On Oct 4, 2018, at 21:07, Mark Brethen wrote:
>> 
>>> This worked:
>>> 
>>>   use_autoreconf yes
>>>   autoreconf.dir ${worksrcpath}/generic/libreduce/src
>>> 
>>>   pre-configure {
>>>       set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec 
>>> ${worksrcpath}/config.guess]]
>>>       set redbin 
>>> ${prefix}/libexec/${name}/csl/reduce.app/Contents/MacOS/reduce
>>> 
>>>       configure.dir ${worksrcpath}/generic/libreduce/${builddir}
>>>       configure.cmd ${autoreconf.dir}/configure
>>>       configure.args-append \
>>>           --disable-universal \
>>>           --with-reduce=${redbin}
>>> 
>>>       xinstall -d ${configure.dir}
>>>   }
>>> 
>>>   pre-build {
>>>       set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec 
>>> ${worksrcpath}/config.guess]]
>>>       build.dir ${worksrcpath}/generic/libreduce/${builddir}
>>>   }
>>> 
>>> 
>>> Since the documentation is nonexistent, I’d like to copy the source to the 
>>> share directory. Can you use the copy macro to copy directories to 
>>> destroot, indicating individual files within to ignore?
>> 
>> copy installs everything you tell it to. copy doesn't have any feature for 
>> excluding items, so if you don't want to copy certain items, you'll have to 
>> somehow arrange to only call copy on the items you do want it to copy. For 
>> example, you could fs-traverse the source directory and examine the name (or 
>> other attributes) of each file to determine whether to copy it. If you tell 
>> me more about how you want to distinguish which files to copy and which 
>> files not to copy, maybe I can be more specific in my recommendation.
> 

Reply via email to