This is the mail archive of the cygwin-apps@cygwin.com 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: [PATCH]: mknetrel builds Guile #5: split


On Tue, Jul 09, 2002 at 02:14:54AM +0200, Jan Nieuwenhuizen wrote:
>
>   - add funtionality to split into and build sub packages

I suspect that this functionality could also be handled with judicious
use of extra/whatever files.

Also, why should build_prefix ever be anything but /usr?

cgf

Content-Description: mknetrel.jcn5.split
>diff -purNX .cvsignore ../mknetrel.jcn4.genscript/ChangeLog ./ChangeLog
>--- ../mknetrel.jcn4.genscript/ChangeLog	Tue Jul  9 01:16:46 2002
>+++ ./ChangeLog	Tue Jul  9 01:19:07 2002
>@@ -1,5 +1,23 @@
> 2002-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>
> 
>+	* VERSION mknetrel.jcn5.split
>+
>+	* bin/mknetrel (read_user_config): Add build_prefix as
>+	configurable var.
>+	(lib_name):
>+	(devel_name):
>+	(doc_name): New function: Return name of subpackage.
>+	(lib_split):
>+	(devel_split):
>+	(doc_split): New function: Attempt at splitting a subpackage by
>+	name.
>+	(domkdist): Support for packaging subpackages.  Splitting of a
>+	package is controlled by a new variable $subpackages.  To create
>+	subpackages, it should contain the symbolic names of the
>+	subpackages.  Currently, the symbolic packages 'lib doc devel' are
>+	supported.
>+	(setup): Add empty presplit () implementation.
>+
> 	* VERSION mknetrel.jcn4.genscript
> 
> 	* bin/mknetrel: Delay `main' for autobuild.
>diff -purNX .cvsignore ../mknetrel.jcn4.genscript/bin/mknetrel ./bin/mknetrel
>--- ../mknetrel.jcn4.genscript/bin/mknetrel	Tue Jul  9 01:13:17 2002
>+++ ./bin/mknetrel	Tue Jul  9 01:05:42 2002
>@@ -14,6 +14,7 @@ read_user_config() {
>     : ${build_nm='i686-pc-cygwin-nm'}
>     : ${build_strip='i686-pc-cygwin-strip'}
>     : ${build_config_opts='--build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin'}
>+    : ${build_prefix=/usr}
> }
> 
> # Interactive shell with state of bash at exit upon failure
>@@ -356,6 +357,41 @@ EOS3
>     chmod 755 $script
> }
> 
>+lib_name () {
>+    echo lib$base$sover
>+}
>+
>+devel_name () {
>+    echo $base-devel
>+}
>+
>+doc_name () {
>+    echo $base-doc
>+}
>+
>+lib_split () {
>+    mkdir -p ./$build_prefix/bin || exit 1
>+    mv $inst/$build_prefix/bin/*.dll ./$build_prefix/bin
>+    mkdir -p ./$build_prefix/share || exit 1
>+    mv $inst/$build_prefix/share/$base ./$build_prefix/share
>+}
>+   
>+devel_split () {
>+    mkdir -p ./$build_prefix/bin || exit 1
>+    mv $inst/$build_prefix/bin/guile-* ./$build_prefix/bin
>+    mv $inst/$build_prefix/include ./$build_prefix/include
>+    mkdir -p ./$build_prefix/lib || exit 1
>+    mv $inst/$build_prefix/lib/*.a ./$build_prefix/lib
>+    mv $inst/$build_prefix/lib/*.la ./$build_prefix/lib
>+    mkdir -p ./$build_prefix/share || exit 1
>+    mv $inst/$build_prefix/share/aclocal ./$build_prefix/share
>+}
>+
>+doc_split () {
>+    mkdir -p ./$build_prefix || exit 1
>+    mv $inst/$build_prefix/info ./$build_prefix
>+}
>+
> domkdist() {
>     #
>     # Fix up installation slightly
>@@ -365,15 +401,49 @@ domkdist() {
>     cd usr 2>/dev/null && dousrstuff
> 
>     cd $inst || exit 1
>-    prepackage
>-    cd $inst || exit 1
>+    presplit
> 
>+    for i in $subpackages; do
>+	subname=$(${i}_name)
>+        rm -rf $inst-$i
>+	mkdir -p $inst-$i || exit 1
>+  	cd $inst-$i
>+	${i}_split || exit 1
>+    done
>+    
>     #
>     # Make tar balls
>     #
>+
>+    cd $inst || exit 1
>+    prepackage
>+
>+    # The base package
>     echo creating $tarstem.tar.bz2
>+    cd $inst || exit 1
>+
>+    # We need som standardization for these hint file names,
>+    # and we'll certainly will never get a directory named
>+    # CYGWIN-PATCHES merged upstream.
>+    # What about checking for `./cygwin/changelog', or something that
>+    # should most probably be unique?
>+    f=$src/CYGWIN-PATCHES/setup.hint test -r $f && cp $f $uploads/$base || true
>+    f=$src/CYGWIN-PATCHES/$base.hint test -r $f && cp $f $uploads/$base/setup.hint  || true
>     find * -print | sort | tar -T - --no-recursion -cjf $tarstem.tar.bz2
> 
>+    # The sub packages
>+    for i in $subpackages; do
>+	subname=$(${i}_name)
>+	subload=$uploads/$subname
>+	subtarstem=$subload/$subname-$ver
>+	mkdir -p $subload || exit 1
>+	echo creating $subtarstem.tar.bz2
>+	f=$src/CYGWIN-PATCHES/$subname.hint test -r $f && cp $f $subload/setup.hint || true
>+  	cd $inst-$i
>+	find * -print | sort | tar -T - --no-recursion -cjf $subtarstem.tar.bz2
>+    done
>+
>+    # The source package
>     cd $src/.. || exit 1
>     echo creating "$tarstem"-src.tar.bz2
> 

>
>-- 
>Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
>http://www.xs4all.nl/~jantien       | http://www.lilypond.org


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