===================================================================
RCS file: /home/cvs/OpenXM/bin/Attic/Makefile,v
retrieving revision 1.1
retrieving revision 1.12
diff -u -p -r1.1 -r1.12
--- OpenXM/bin/Attic/Makefile	2000/01/09 20:19:39	1.1
+++ OpenXM/bin/Attic/Makefile	2000/10/31 05:42:45	1.12
@@ -1,28 +1,67 @@
-# $OpenXM$
+# $OpenXM: OpenXM/bin/Makefile,v 1.11 2000/09/04 03:17:22 takayama Exp $
 
+OPENXM_CONTRIB=../../OpenXM_contrib
+
 LIBDIR=../lib
+FEPLINUX=fep.linux
+FEPFBSD=fep.fbsd
+PHC=lin_phcv2p
+RM=rm
 
 configure:
-	@if [ -f lin_phcv2p.gz.uuencoded ]; then \
-		uudecode lin_phcv2p.gz.uuencoded | gzip -d ; \
-		chmod +x lin_phcv2p ; \
+	@if [ -f .configure_done ] ; then \
+		echo "OpenXM/bin is already configured." ; \
+	else \
+		rm -f fep phc ; \
+		if [ "`uname`" = "FreeBSD" ]; then \
+			make configure-freebsd ; \
+		fi ; \
+		if [ "`uname`" = "Linux" ]; then \
+			make configure-linux ; \
+		fi ; \
+		rm -f ox_asir ; \
+		ln -f -s ./asir ox_asir ; \
+		@touch ./configure_done ; \
 	fi
 
-	@if [ -f fep.linux.gz.uuencoded ]; then \
-		uudecode fep.linux.gz.uuencoded | gzip -d ; \
-		chmod +x fep.linux ; \
+clean-for-install:
+	$(RM) -f *uuencoded* 
+
+configure-freebsd:
+	(cd ${OPENXM_CONTRIB}/PHC/Objects/ ; make phc)
+	install /tmp/phc .
+	if [ -f ${FEPFBSD}.gz.uuencoded ]; then \
+		uudecode -p ${FEPFBSD}.gz.uuencoded | zcat - > fep ; \
+		chmod +x fep ; \
 	fi
 
-	@if [ "`uname`" = "Linux" ]; then \
-		rm -f fep phc ; \
-		ln -f -s fep.linux fep ; \
-		ln -f -s lin_phcv2p phc ; \
-	else \
-		echo "We have the binary of phc only for linux." ; \
+configure-linux:
+	if [ -f ${PHC}.gz.uuencoded ]; then \
+		uudecode -p ${PHC}.gz.uuencoded | zcat - > phc ; \
+		chmod +x phc ; \
 	fi
+	if [ -f ${FEPLINUX}.gz.uuencoded ]; then \
+		uudecode -p ${FEPLINUX}.gz.uuencoded | zcat - > fep ; \
+		chmod +x fep ; \
+	fi
 
-	rm -f asir
-	ln -f -s $(LIBDIR)/asir/ox_asir asir
-
 distclean:
-	rm -f asir fep fep.linux lin_phcv2p phc
+	if [ "`uname`" = "FreeBSD" ]; then \
+		(cd ${OPENXM_CONTRIB}/PHC/Objects/ ; make clean) \
+	fi
+	rm -f asir ox_asir fep phc
+	@rm -f .configure_done
+
+uuencode:
+	@if [ -f $(FEPLINUX) ]; then \
+		echo '$OpenXM: OpenXM/bin/Makefile,v 1.11 2000/09/04 03:17:22 takayama Exp $' > $(FEPLINUX).gz.uuencoded ; \
+		gzip -c $(FEPLINUX) | uuencode $(FEPLINUX).gz >> $(FEPLINUX).gz.uuencoded ; \
+	fi
+	@if [ -f $(FEPFBSD) ]; then \
+		echo '$OpenXM: OpenXM/bin/Makefile,v 1.11 2000/09/04 03:17:22 takayama Exp $' > $(FEPFBSD).gz.uuencoded ; \
+		gzip -c $(FEPFBSD) | uuencode $(FEPFBSD).gz >> $(FEPFBSD).gz.uuencoded ; \
+	fi
+	@if [ -f $(PHC) ]; then \
+		echo '$OpenXM: OpenXM/bin/Makefile,v 1.11 2000/09/04 03:17:22 takayama Exp $' > $(PHC).gz.uuencoded ; \
+		gzip -c $(PHC) | uuencode $(PHC).gz >> $(PHC).gz.uuencoded ; \
+	fi