Index: mknetrel
===================================================================
RCS file: /cvs/cygwin-apps/mknetrel/bin/mknetrel,v
retrieving revision 1.17
diff -u -p -2 -r1.17 mknetrel
--- mknetrel	20 May 2002 03:43:28 -0000	1.17
+++ mknetrel	20 May 2002 12:08:02 -0000
@@ -1,4 +1,18 @@
 #!/bin/sh
 
+read_user_config() {
+     [ -r "$HOME/.mknetrel" ] && . "$HOME/.mknetrel"
+     if [ -z ${build_cxx+set} ]; then build_cxx='i686-pc-cygwin-g++'; fi
+     if [ -z ${build_cc+set} ]; then build_cc='i686-pc-cygwin-gcc'; fi
+     if [ -z ${build_ranlib+set} ]; then build_ranlib='i686-pc-cygwin-ranlib'; fi
+     if [ -z ${build_dllwrap+set} ]; then build_dllwrap='i686-pc-cygwin-dllwrap'; fi
+     if [ -z ${build_ar+set} ]; then build_ar='i686-pc-cygwin-ar'; fi
+     if [ -z ${build_nm+set} ]; then build_nm='i686-pc-cygwin-nm'; fi
+     if [ -z ${build_strip+set} ]; then build_strip='i686-pc-cygwin-strip'; fi
+     if [ -z ${build_config_opts+set} ]; then
+          build_config_opts='--build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin';
+     fi
+}       
+
 mygetopt() {
      getopt 'itbcCgNnxS' ${@+"$@"}
@@ -6,5 +20,5 @@ mygetopt() {
 
 setvars() {
-    cd /cygnus/netrel || exit 1
+    cd $netrel_root || exit 1
     here=`pwd`
     if newest; then
@@ -61,4 +75,5 @@ setup() {
     verbose() { :; }
     mkdist() { domkdist; }
+    read_user_config
     clean=false
     opt="-O2"
@@ -121,12 +136,12 @@ sedit() {
 
 mystrip() {
-    stripbins && i686-pc-cygwin-strip ${@+"$@"} 2>/dev/null
+    stripbins && "${build_strip}" ${@+"$@"} 2>/dev/null
     return 0
 }
 
 doconfig() {
-    CONFIGOPTS='--build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin --disable-version-specific-runtime-libs'
+    CONFIGOPTS="${build_config_opts} --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin --disable-version-specific-runtime-libs"
     preconfig || exit 1
-    CXX='ccache i686-pc-cygwin-g++' CC='ccache i686-pc-cygwin-gcc' RANLIB=i686-pc-cygwin-ranlib DLLWRAP=i686-pc-cygwin-dllwrap AR=i686-pc-cygwin-ar NM=i686-pc-cygwin-nm $src/configure $CONFIGOPTS || exit 1
+    CC="${build_cc}" CXX="${build_cxx}" RANLIB="${build_ranlib}" DLLWRAP="${build_dllwrap}" AR="${build_ar}" NM="${build_nm}" $src/configure $CONFIGOPTS || exit 1
     postconfig || exit 1
 }
@@ -201,5 +216,5 @@ dousrstuff() {
     for f in bin/*; do
 	case "$f" in
-	    *.exe) continue ;;
+	    *.exe | bin/\*) continue ;;
 	esac
 	ln="`readlink $f`"
@@ -221,4 +236,5 @@ dousrstuff() {
 	    *.o) ;;
 	    *.a) ;;
+	    *bin/\*) ;;
 	    *) a=`file $f | fgrep "MS Windows PE"`
 	       [ -n "$a" ] && mv $f $f.exe
