Index: trunk/magic/Makefile
===================================================================
--- trunk/magic/Makefile	(revision 26256)
+++ trunk/magic/Makefile	(revision 26256)
@@ -0,0 +1,40 @@
+
+default: all
+
+all: ssa-core-cpp magic remove
+
+install: magic.install remove.install
+
+clean:
+	if [ -d magic ]; then (cd magic && make -f Makefile.magic clean); fi
+	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && make clean); fi
+	cd $(REMOVE) && make -f Makefile.simple clean
+
+update:
+# get the source code (replace this with SVN interactions)
+	tar xvzf ~/magic.tgz
+	tar xvzf ~/ssa-core-cpp.tgz
+	cp Makefile.magic magic/Makefile.magic
+
+ssa-core-cpp: ssa-core-cpp/build/libSSA.a
+
+ssa-core-cpp/build/libSSA.a:
+	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && ./configure && make); fi
+
+magic: magic/DetectStreaks
+
+magic/DetectStreaks:
+	if [ -d magic ]; then (cd magic && make -f Makefile.magic); fi
+
+magic.install:	ssa-core-cpp
+	if [ -d magic ]; then (cd magic && make -f Makefile.magic install); fi
+
+REMOVE = remove/src
+
+remove: FORCE
+	@cd $(REMOVE) && make -f Makefile.simple all
+
+remove.install: remove
+	@cd $(REMOVE) && make -f Makefile.simple install
+
+FORCE:
Index: trunk/magic/Makefile.in
===================================================================
--- trunk/magic/Makefile.in	(revision 26041)
+++ 	(revision )
@@ -1,47 +1,0 @@
-
-default: all
-
-all: ssa-core-cpp magic remove
-
-install: magic.install remove.install
-
-clean:
-	if [ -d magic ]; then (cd magic && make -f Makefile.magic clean); fi
-	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && make clean); fi
-	cd $(REMOVE) && make -f Makefile.simple clean
-
-update:
-# get the source code (replace this with SVN interactions)
-	tar xvzf ~/magic.tgz
-	tar xvzf ~/ssa-core-cpp.tgz
-	cp Makefile.magic magic/Makefile.magic
-
-ssa-core-cpp: ssa-core-cpp/build/libSSA.a
-
-ssa-core-cpp/build/libSSA.a:
-	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && ./configure && make); fi
-
-magic: magic/DetectStreaks
-
-magic/DetectStreaks:
-	if [ -d magic ]; then (cd magic && make -f Makefile.magic); fi
-
-magic.install:	ssa-core-cpp
-	if [ -d magic ]; then (cd magic && make -f Makefile.magic install); fi
-
-REMOVE = remove/src
-
-REMOVE_PROGRAMS = \
-$(REMOVE)/isdestreaked \
-$(REMOVE)/streakscompare \
-$(REMOVE)/streaksrelease \
-$(REMOVE)/streaksremove \
-$(REMOVE)/streaksreplace 
-
-remove: $(REMOVE_PROGRAMS)
-
- $(REMOVE_PROGRAMS):
-	@cd $(REMOVE) && make -f Makefile.simple all
-
-remove.install: remove
-	@cd $(REMOVE) && make -f Makefile.simple install
Index: trunk/magic/autogen.sh
===================================================================
--- trunk/magic/autogen.sh	(revision 26041)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#!/bin/sh
-
-for arg in $*; do
-    case $arg in
-        --no-configure)
-	    exit 0
-            ;;
-        *)
-            ;;
-    esac
-done
-
-./configure.tcsh $*
Index: trunk/magic/config.tools
===================================================================
--- trunk/magic/config.tools	(revision 26041)
+++ 	(revision )
@@ -1,47 +1,0 @@
-#!/bin/csh -f
-
-if ($#argv == 0) then
-  echo "USAGE: config.tools [fixpath | fixconf]"
-  exit 2
-endif
-
-if ("$argv[1]" == "fixpath") goto fixpath
-if ("$argv[1]" == "fixconf") goto fixconf
-
-echo "unknown option $argv[1]"
-exit 1
-
-#######
-fixpath:
-
-if ($#argv != 2) then
-  echo "USAGE: config.tools fixpath (path)"
-  exit 2
-endif
-
-set indir = $argv[2]
-
-# convert // to / in pathnames
-echo $indir | grep "\/\/" > /dev/null
-set success = $status
-while ($success == 0) 
-  set indir = `echo $indir | sed 's|\/\/|\/|g'`
-  echo $indir | grep "\/\/" > /dev/null
-  set success = $status
-end
-
-set indir = `echo $indir | sed 's|\/$||'`
-echo $indir
-exit 0
-
-#######
-fixconf:
-
-if ($#argv != 3) then
-  echo "USAGE: config.tools fixconf (NAME) (value)"
-  exit 2
-endif
-
-cat Makefile | sed "s|$argv[2]|$argv[3]|" > Makefile.tmp
-mv -f Makefile.tmp Makefile
-exit 0;
Index: trunk/magic/configure
===================================================================
--- trunk/magic/configure	(revision 26041)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#!/bin/sh
-
-# strip out CC, CFLAGS, CPPFLAGS, LDFLAGS and set env vars
-while ( test $# -gt 0 ); do
-
-  skip=0
-
-  # strip out CC, set as env variable
-  echo $1 | grep "^CC=" > /dev/null
-  if ( test $? -eq 0 ) ; then
-    val=`echo $1 | sed "s|^CC=||"`
-    export CC=$val
-    skip=1
-  fi
-  # strip out CFLAGS, set as env variable
-  echo $1 | grep "^CFLAGS=" > /dev/null
-  if ( test $? -eq 0 ) ; then
-    val=`echo $1 | sed "s|^CFLAGS=||"`
-    export CFLAGS=$val
-    skip=1
-  fi
-  # strip out CPPFLAGS, set as env variable
-  echo $1 | grep "^CPPFLAGS=" > /dev/null
-  if ( test $? -eq 0 ) ; then
-    val=`echo $1 | sed "s|^CPPFLAGS=||"`
-    export CPPFLAGS=$val
-    skip=1
-  fi
-  # strip out LDFLAGS, set as env variable
-  echo $1 | grep "^LDFLAGS=" > /dev/null
-  if ( test $? -eq 0 ) ; then
-    val=`echo $1 | sed "s|^LDFLAGS=||"`
-    export LDFLAGS=$val
-    skip=1
-  fi
-  if ( test $skip -eq 0 ) ; then
-    args="$args $1"
-  fi
-  shift
-done
-
-./configure.tcsh $args
Index: trunk/magic/configure.tcsh
===================================================================
--- trunk/magic/configure.tcsh	(revision 26041)
+++ 	(revision )
@@ -1,178 +1,0 @@
-#!/bin/csh -f
-
-# this is a very low-tech version of configure, not built by autoconf.
-# we check for the following libraries:
-
-# we need to be able to list the required libraries for a given distribution
-
-# evaluate command-line options
-set prefix  = ""
-set bindir  = ""
-set libdir  = ""
-set incdir  = ""
-set mandir  = ""
-set datadir  = ""
-set sysconfdir  = ""
-set exec_prefix = ""
-set defines = ""
-set profile = 0
-
-set root    = ""
-set args    = ""
-
-while ("$1" != "") 
- switch ("$1")
-  # switch options passed by build systems which we ignore
-  case --enable-maintainer-mode
-  case --no-create
-  case --no-recursion
-  case --enable-optimize
-  case --disable-shared
-  case --enable-shared
-  case --disable-static
-  case --enable-static
-  case --enable-profile
-  case --pedantic
-   breaksw;
-  # key/value options passed by build systems which we ignore
-  case --sbindir*
-  case --libexecdir*
-  case --sharedstatedir*
-  case --localstatedir*
-  case --oldincludedir*
-  case --infodir*
-  case --exec-prefix*
-  case --libdir*
-  case --includedir*
-  case --sysconfdir*
-  case --datadir*
-   # we need to strip the --opt word and --opt=word versions
-   set word = `echo $1 | tr = ' '`
-   if ($#word == 1) then
-     if ($#argv > 1) then
-      shift
-     endif
-   endif
-   breaksw;
-  case --prefix*
-   if ("$1" == "--prefix") then
-     shift
-     set prefix = $1
-   else
-     set prefix = `echo $1 | tr = ' ' | awk '{print $2}'`
-   endif
-   breaksw;
-  case --bindir*
-   if ("$1" == "--bindir") then
-     shift
-     set bindir = $1
-   else
-     set bindir = `echo $1 | tr = ' ' | awk '{print $2}'`
-   endif
-   breaksw;
-  case --mandir*
-   if ("$1" == "--mandir") then
-     shift
-     set mandir = $1
-   else
-     set mandir = `echo $1 | tr = ' ' | awk '{print $2}'`
-   endif
-   breaksw;
-  case --help:
-   goto usage
-  case -*: 
-   echo ""
-   echo "Unknown option: $1"
-   goto usage
-  default:
-   set args=($args $1);
-   breaksw;
- endsw
- shift
-end
-if ($#args != 1) goto usage
-
-# gpc build ignores CC, CFLAGS, CPPFLAGS, LDFLAGS
-
-# set up the basic directory names:
-set root = `pwd`
-if ($prefix == "") set prefix = $root
-
-echo 
-echo "install destinations:"
-echo "ROOT: $root"
-echo "PREFIX: $prefix"
-echo 
-
-# the config.tools fixconf operations below interpolate values in Makefile
-if (-e Makefile) mv Makefile Makefile.bak
-cp -f Makefile.in Makefile
-
-# BINDIR holds the output binary files
-if ("$bindir" == "") then
-  set subdir = bin
-  set bindir = $prefix/$subdir
-endif
-set bindir = `./config.tools fixpath $bindir`
-./config.tools fixconf @BINDIR@ $bindir
-echo BINDIR $bindir
-
-# MANDIR (DESTMAN) holds the output man pages
-if ("$mandir" == "") then
-  set mandir = $prefix/man
-endif
-set mandir = `./config.tools fixpath $mandir`
-./config.tools fixconf @MANDIR@ $mandir
-echo DESTMAN $mandir
-
-echo ""
-echo "include $bindir in your path"
-
-exit 0
-
-usage:
-cat <<EOF
-USAGE: configure [OPTION]
-
-echo remaining args: $args
-
-set the installation directory root with --prefix
-if you define the environment variable ARCH, you can set --vararch
- 
-Configuration:
-  -h, --help              display this help and exit
-  --enable-optimize       enable compiler optimization (-O2)
-  --enable-memcheck       enable ohana memory tests
-  --pedantic              include -Wall -Werror on compilation
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-  --vararch               install with ARCH suffixes for variable architectures
-
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [PREFIX/bin/$ARCH] 
-  --libdir=DIR           object code libraries [PREFIX/lib/$ARCH]
-  --includedir=DIR       C header files [PREFIX/include]
-  --mandir=DIR           man documentation [PREFIX/man]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-
-Makefile flags:
-  CC=options
-  CFLAGS=options
-  CPPFLAGS=options
-  LDFLAGS=options
-
-The following options are silently ignored for compatibility:
-  --enable-maintainer-mode
-  --no-create
-  --no-recursion
-  --sbindir
-  --libexecdir
-  --sharedstatedir
-  --localstatedir
-  --oldincludedir
-  --infodir
-
-EOF
- exit 2;
Index: trunk/magic/remove/src/Makefile.simple
===================================================================
--- trunk/magic/remove/src/Makefile.simple	(revision 26041)
+++ trunk/magic/remove/src/Makefile.simple	(revision 26256)
@@ -10,5 +10,4 @@
 
 REMOVE_OBJECTS=    \
-    ${COMMON_OBJECTS} \
     streaksremove.o \
     streaksextern.o \
@@ -17,17 +16,13 @@
 
 REPLACE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streaksreplace.o
 
 COMPARE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streakscompare.o
 
 RELEASE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streaksrelease.o
 
 ISDESTREAKED_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     isdestreaked.o
 
@@ -45,16 +40,27 @@
 HEADERS=Line.h streaksastrom.h streaksextern.h streaksio.h streaksremove.h
 
-all:	${PROGRAMS}
+all: ${PROGRAMS}
 
-${REMOVE_OBJECTS}:	${HEADERS}
-streaksremove:  ${REMOVE_OBJECTS}
+# programs all depend on the common objects and the common headers
+PROGRAM_OBJECTS = \
+ ${REMOVE_OBJECTS} \
+ ${REPLACE_OBJECTS} \
+ ${COMPARE_OBJECTS} \
+ ${RELEASE_OBJECTS} \
+ ${ISDESTREAKED_OBJECTS}
 
-streaksreplace:  ${REPLACE_OBJECTS}
+${COMMON_OBJECTS}: ${HEADERS}
 
-streakscompare:  ${COMPARE_OBJECTS}
+${PROGRAM_OBJECTS}: ${HEADERS} ${COMMON_OBJECTS}
 
-streaksrelease:  ${RELEASE_OBJECTS}
+streaksremove:  ${REMOVE_OBJECTS} ${COMMON_OBJECTS}
 
-isdestreaked:	${ISDESTREAKED_OBJECTS}
+streaksreplace:  ${REPLACE_OBJECTS} ${COMMON_OBJECTS}
+
+streakscompare:  ${COMPARE_OBJECTS} ${COMMON_OBJECTS}
+
+streaksrelease:  ${RELEASE_OBJECTS} ${COMMON_OBJECTS}
+
+isdestreaked:	${ISDESTREAKED_OBJECTS} ${COMMON_OBJECTS}
 
 
