[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Remove all conditionals from Makefile; non-GNU make sho...



Update of /home/minion/cvsroot/src/minion
In directory moria.mit.edu:/tmp/cvs-serv7384

Modified Files:
	Makefile 
Log Message:
Remove all conditionals from Makefile; non-GNU make should now be happy

Index: Makefile
===================================================================
RCS file: /home/minion/cvsroot/src/minion/Makefile,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- Makefile	16 Dec 2002 19:18:24 -0000	1.20
+++ Makefile	29 Dec 2002 22:47:33 -0000	1.21
@@ -12,12 +12,10 @@
 
 # XXXX This fails when PYTHON is set to a version of Python earlier than 1.3
 
-ifdef PYTHON
-FINDPYTHON = PYTHON="$(PYTHON)"
-else
 PYTHON_CANDIDATES = python2.2 python2.2x python2.1 python2.1x python2.0      \
 	python2.0x python2 python
 FINDPYTHON = \
+   if [ 'x' = "x$$PYTHON" ]; then                                            \
 	for n in $(PYTHON_CANDIDATES) ; do                                   \
 	  if [ 'x' = "x$$PYTHON" ]; then                                     \
             if [ -x "`which $$n 2>&1`" ]; then                               \
@@ -34,8 +32,8 @@
 	if [ 'x' = "`$$PYTHON -V 2>&1 | grep 'Python [23456789]'`x" ]; then  \
 	   echo "WARNING: $$PYTHON doesn't seem to be version 2 or later.";  \
 	   echo ' If this fails, please set the PYTHON environment variable.';\
-	fi
-endif
+	fi                                                                   \
+   fi 
 
 #
 # Here are the real make targets.
@@ -77,21 +75,18 @@
 #======================================================================
 # Install target (minimal.)
 
-ifdef PREFIX
-PREFIXARG = --prefix="$(PREFIX)"
-export PREFIXARG
-export PREFIX
-else
-PREFIXARG=
-PREFIX=""
-export PREFIXARG
-export PREFIX
-endif
 
 install: do_build
 	@$(FINDPYTHON); \
-	echo $$PYTHON setup.py install $(PREFIXARG) --compile --optimize=1; \
-	$$PYTHON setup.py install $(PREFIXARG) --compile --optimize=1
+	if [ 'x' = "x$(PREFIX)" ] ; then                                     \
+	  echo $$PYTHON setup.py install --compile --optimize=1;             \
+	  $$PYTHON setup.py install --compile --optimize=1;                  \
+	else                                                                 \
+	  PREFIX=$(PREFIX);                                                  \
+	  export PREFIX;                                                     \
+	  echo $$PYTHON setup.py install --prefix=$(PREFIX) --compile --optimize=1; \
+	  $$PYTHON setup.py install --prefix=$(PREFIX) --compile --optimize=1;\
+	fi
 
 #======================================================================
 # Source dist target