Hi,

In my attempt to reduce duplication of effort, I'm looking to
deprecate my cygwin-cross tools, and add functionality that's missing
to build Guile, to mknetrel.

I've broken down my patch of last Sunday, like you requested.  I've
left out the 'download and untar latest' stuff for now.

Patches should be applied in order.

Greetings,
Jan.


    - add README
    - a few init fixes to get mknetrel going


diff -purNX .cvsignore ../mknetrel.jcn0.cvs/.cvsignore ./.cvsignore
--- ../mknetrel.jcn0.cvs/.cvsignore     Thu Jan  1 01:00:00 1970
+++ ./.cvsignore        Mon Jul  8 15:42:06 2002
@@ -0,0 +1,4 @@
+CVS
+*~
+#*
+.#*
diff -purNX .cvsignore ../mknetrel.jcn0.cvs/ChangeLog ./ChangeLog
--- ../mknetrel.jcn0.cvs/ChangeLog      Sun Jul  7 04:49:09 2002
+++ ./ChangeLog Tue Jul  9 01:17:39 2002
@@ -1,3 +1,18 @@
+2002-07-08  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
+
+       * VERSION mknetrel.jcn1.init
+
+       * .cvsignore: New file.
+
+       * README: New file.
+
+       * bin/mknetrel:
+       (read_user_config): Add cygwin_root as configurable var.
+       (setvars): Bugfix: $extra lives in mknetrel source dir.
+       (setup): Use $cygwin_root (previously: /cygwin).
+       Add -h option to display usage.
+       (usage): More standardized.
+
 2002-07-06  Christopher Faylor  <[EMAIL PROTECTED]>
 
        * mknetrel (doconfig): Export CC_FOR_TARGET and CXX_FOR_TARGET.
diff -purNX .cvsignore ../mknetrel.jcn0.cvs/README ./README
--- ../mknetrel.jcn0.cvs/README Thu Jan  1 01:00:00 1970
+++ ./README    Mon Jul  8 23:59:00 2002
@@ -0,0 +1,67 @@
+This is mknetrel, a collection of shell scripts to build Cygwin
+packages.  Mknetrel can be used natively on Cygwin, or in a cross
+build environment (the default is cross building on GNU/Linux).
+
+Get the latest version here:
+   cvs -d:pserver:[EMAIL PROTECTED]:/cvs/cygwin-apps co mknetrel
+
+To use mknetrel, you must setup a cross build environment.  See the
+Cygwin mailing list archives for more info on this.  When porting a
+new package to Cygwin, it is advisable to install latest CVS versions
+of autoconf, automake and libtool.
+
+You also need Cygnus' Cygwin package, 1.3.10 or newer, and w32api from
+a mirror of:
+
+     ftp://cygwin.com/pub/cygwin/release
+     http://cygwin.com/mirrors.html
+
+and, depending on which package you want to build, other library and
+development packages from Cygwin, such as: zlib gettext libintl2
+libiconv2 jpeg libpng10 libpng10-devel python tetex tiff zlib.
+
+This can be automated by running the cygwin-cross tools from:
+
+   http://lilypond.org/cygwin/cygwin-cross.tar.gz
+
+[doco how to do this from cygwin cvs, deprecate cygwin-cross tools.]
+
+Mknetrel reads config vars from your `~/.mknetrel'.  Here's what I
+use:
+
+    cygwin_root=/home/cygwin
+    netrel_root=$cygwin_root/netrel
+
+Then, you run mknetrel as:
+
+   wget -P/tmp ftp://sunsite.auc.dk/mirrors/cygwin/release/ed/ed-*-1-src.*bz2
+   rm -rf /home/cygwin/netrel/src/ed-*
+   mkdir -p /home/cygwin/netrel/src && cd /home/cygwin/netrel/src
+   tar xjf /tmp/ed*bz2
+   cd -
+   ./bin/mknetrel ed
+
+to build the ed package, or do
+
+   ./bin/mknetrel -h
+
+for a short help summary.
+
+
+If you are not using mknetrel on GNU/Linux, you'll want to add:
+something like this in your ~/.mknetrel:
+
+    build_cxx='g++'
+    build_cc='gcc'
+    build_ranlib='ranlib'
+    build_dllwrap='dllwrap'
+    build_ar='ar'
+    build_nm='nm'
+    build_strip='strip'
+    build_config_opts=''
+
+(this will probably be fixed in a later version).
+
+Send bug reports and comments on mknetrel to: [EMAIL PROTECTED]
+This is a subscribers-only mailing list, so you'll need to subscribe
+first.  Please do not email the authors directly.
diff -purNX .cvsignore ../mknetrel.jcn0.cvs/bin/mknetrel ./bin/mknetrel
--- ../mknetrel.jcn0.cvs/bin/mknetrel   Sun Jul  7 04:49:10 2002
+++ ./bin/mknetrel      Tue Jul  9 01:06:32 2002
@@ -3,6 +3,7 @@
 read_user_config() {
     [ -r "$HOME/.mknetrel" ] && . "$HOME/.mknetrel"
     : ${netrel_root=/netrel}
+    : ${cygwin_root=/cygwin}
     : ${build_cxx='i686-pc-cygwin-g++'}
     : ${build_cc='i686-pc-cygwin-gcc'}
     : ${build_ranlib='i686-pc-cygwin-ranlib'}
@@ -14,6 +15,7 @@ read_user_config() {
 }
 
 setvars() {
+    mknetrel=$(cd $(dirname $0)/..; pwd)
     cd $netrel_root || exit 1
     here=`pwd`
     if newest; then
@@ -42,7 +44,7 @@ setvars() {
     build=$here/build/$package
     inst=$here/inst/$package
     uploads=$here/uploads
-    extra=$here/extra
+    extra=$mknetrel/extra
     tarstem=$uploads/$package
     src_exclude='>>>InExPlIbAbLe<<<'
 }
@@ -74,8 +76,8 @@ setup() {
     read_user_config
     clean=false
     opt="-O2"
-    export knownpath='/cygwin/bin:'
-    while getopts 'itbcCgNnxSoB' o; do
+    export knownpath="$cygwin_root/bin:"
+    while getopts 'itbcCghNnxSoB' o; do
        case "$o" in
            't') tag() { dotag; } ;;
            'b') rebuild() { dorebuild; } ;;
@@ -83,6 +85,7 @@ setup() {
            'c') config() { doconfig; }; rebuild() { dorebuild; } ;;
            'C') clean=: ;;
            'g') opt="-O2 -g"; rebuild() { dorebuild; } ;;
+           'h') (usage); exit 0 ;;
            'i') knownpath= ;;
            'n') mkdist() { :; } ;;
            'N') newest() { return 1; } ;;
@@ -311,16 +314,21 @@ dotag() {
 
 usage() {
     echo "mknetrel: $*
-usage:
-mknetrel -t what       Tag sourceware with release info
-mknetrel -b what       Do a rebuild/install
-mknetrel -c what       Do a configure prior to rebuild
-mknetrel -C what       Do a clean prior to rebuild/install
-mknetrel -g what       Add -g option when compiling with gcc
-mknetrel -n what       Don't build the distribution tar files
-mknetrel -x what       Verbose shell output
+Usage: mknetrel [OPTION]... [PACKAGE]
 
-what = the name of something in $here/src, like 'gdb'" 1>&2
+Options:
+  -t    Tag sourceware with release info
+  -b    Rebuild/install
+  -c    Configure prior to rebuild
+  -C    Clean prior to rebuild/install
+  -f    Force download of latest version
+  -g    Add -g option when compiling with gcc
+  -n    Don't build the distribution tar files
+  -x    Verbose shell output
+
+Available packages:
+  $(cd $(dirname $0)/../extra && echo *[a-z])
+" 1>&2
     exit 1
 }
 


-- 
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org

Reply via email to