Bladeren bron

* Added EXCLUDES to Makefile.in (distro)
* Removed TCLDIR from build/conf.h, changed to build option -t


svn: 212

Bryan Drewery 22 jaren geleden
bovenliggende
commit
8fd1dd6cbc
3 gewijzigde bestanden met toevoegingen van 18 en 15 verwijderingen
  1. 5 0
      Makefile.in
  2. 13 11
      build
  3. 0 4
      pack/conf.h

+ 5 - 0
Makefile.in

@@ -15,6 +15,7 @@ PACKNAME = @PACKNAME@
 LEAFEXEC = leaf
 HUBEXEC = hub
 DISTROFILES = config.h.in doc/ misc/ scripts/ ChangeLog Makefile.in build configure pack/ src/
+EXCLUDES = pack/salt.h pack/pack.cfg misc/ind doc/DEVEL
 
 # defaults
 CC = @CC@
@@ -98,6 +99,10 @@ distrib: distclean
 distro: distrib
 	@mkdir wraith-$(VERSION); \
 	cp -r $(DISTROFILES) wraith-$(VERSION); \
+	for s in $(EXCLUDES); \
+	do \
+	 rm -rf wraith-$(VERSION)/$$s; \
+	done; \
 	tar -czvf wraith-$(VERSION).tgz wraith-$(VERSION)/; \
 	rm -rf wraith-$(VERSION)/
 

+ 13 - 11
build

@@ -11,9 +11,10 @@ echo "*** wraith v${ver}/${numver} builder ***"
 
 usage() 
 {
-    echo "Usage: $0 [-d] [-c] type"
-    echo "	-c	   - Cleans up old binaries/files before compile (default: off)"
-    echo "	-d	   - Builds a debug package. (default: off)"
+    echo "Usage: $0 [-d] [-c] [-t dir] type"
+    echo "	-c	   - Cleans up old binaries/files before compile 	(default: off)"
+    echo "	-d	   - Builds a debug package. 				(default: off)"
+    echo "	-t dir	   - Where to search for TCL libraries. 		(usually not needed)"
     echo "	type	   - One of the following: all, leaf, hub."
 }
 
@@ -23,12 +24,13 @@ hub=0
 leaf=0
 clean=0
 type=
+tcldir=
 
-while getopts cdh opt ; do
+while getopts t:cdh opt ; do
         case "$opt" in
-#        m) mode="$OPTARG" ;;
 	c) clean=1 ;;
         d) debug=1 ;;
+	t) tcldir="$OPTARG" ;;
 	h) usage; exit 0 ;;
         *) usage; exit 1 ;;
 
@@ -92,16 +94,16 @@ echo "[*] Building ${PACKNAME}::${type} for $os"
 # Run ./configure, then verify it's ok
 echo "[*] Configuring..."
 umask 077 >/dev/null
-TCLDIR=`cat pack/conf.h 2>&1 | grep "//" | awk '/TCLDIR/ {print $2}' |  sed -e 's/\"//g'`
-if test -z ${TCLDIR}
-then
-  echo "[*] Searching for TCL in default dirs (edit ${PACKNAME} to change)"
+
+if test -z "$tcldir"; then
+  echo "[*] Searching for TCL in default paths (use '-t dir' to change)"
   ./configure --silent --disable-tcl-threads
 else
-  echo "[*] Searching for TCL in: $TCLDIR"
-  ./configure --silent --disable-tcl-threads --with-tcllib=${TCLDIR}/lib/libtcl8.4.a --with-tclinc=${TCLDIR}/include/tcl.h
+  echo "[*] Searching for TCL in: $tcldir"
+  ./configure --silent --disable-tcl-threads --with-tcllib=${tcldir}/lib/libtcl8.4.a --with-tclinc=${tcldir}/include/tcl.h
 fi
 
+
 # make clean, just in case
 if [ $clean = "1" ]; then
  echo "[*] Cleaning up old binaries/files..."

+ 0 - 4
pack/conf.h

@@ -3,10 +3,6 @@
 
  */
 
-/* The next line defines where the custom TCL build's prefix is.. */
-/* It MUST stay in the provided syntax. */
-//TCLDIR "/home/wheel/bryan"
-
 
 /* Change "define" to "undef" to disable a feature
  * Change "undef" to "define" to enable a feature