===================================================================
RCS file: /home/cvs/OpenXM/rc/Makefile,v
retrieving revision 1.7
retrieving revision 1.19
diff -u -p -r1.7 -r1.19
--- OpenXM/rc/Makefile	2000/02/01 12:01:31	1.7
+++ OpenXM/rc/Makefile	2004/02/26 09:24:25	1.19
@@ -1,30 +1,36 @@
-# $OpenXM: OpenXM/rc/Makefile,v 1.6 2000/01/31 07:46:14 noro Exp $
+# $OpenXM: OpenXM/rc/Makefile,v 1.18 2003/02/03 07:14:38 ohara Exp $
 # make repl
 # make all
-# make install  [ INSTALL_DIR=/home/hoge/bin ]  ; Default is /usr/local/bin
+# make install  [ PREFIX=/home/hoge ]  ; Default is /usr/local
 CC=gcc
-SHELL_SCRIPTS=asir sm1 gp k0 oxmath oxMathematica ox
-INSTALL_DIR=/usr/local/bin
+# SHELL_SCRIPTS=asir sm1 oxgp k0 oxmath oxMathematica ox
+SHELL_SCRIPTS=asir sm1 oxgp oxmath oxMathematica ox openxm webasir
+PREFIX=/usr/local
+INSTALL_DIR=${PREFIX}/bin
+MAN_DIR=../man/man1
+KDE_MENU_DIR=/usr/lib/menu
 
 all :  dot.bashrc  dot.cshrc  openxm  .done_gen-shell-scripts
 
 dot.bashrc : bashrc repl 
 	rm -f dot.bashrc 
 	echo "# DO NOT EDIT THIS FILE" >dot.bashrc
-	./repl <bashrc >>dot.bashrc
+	./repl bash <bashrc >>dot.bashrc
 
 dot.cshrc : cshrc repl
 	rm -f dot.cshrc 
 	echo "# DO NOT EDIT THIS FILE" >dot.cshrc
-	./repl <cshrc >>dot.cshrc
+	./repl csh <cshrc >>dot.cshrc
 
-repl : repl.c
-	${CC} -static -o repl repl.c
+repl : repl.c 
+	rm -f repl
+	${CC} -static -o ../bin/rc.repl repl.c
+	ln -s ../bin/rc.repl repl
 
-openxm : dot.cshrc
+openxm : dot.bashrc
 	rm -f openxm
-	echo "#!/bin/csh" >openxm
-	cat dot.cshrc >>openxm
+	echo "#!/bin/sh" >openxm
+	cat dot.bashrc >>openxm
 	echo 'exec $$*' >>openxm
 	chmod +x openxm
 	cp -f openxm ../bin
@@ -33,9 +39,23 @@ openxm : dot.cshrc
 	./gen-shell-scripts
 	touch .done_gen-shell-scripts
 
-install : all
-	cp -f $(SHELL_SCRIPTS) ${INSTALL_DIR}
+install : install-usr-bin install-kde-menu
+install-usr-bin: all
+	-cp -f $(SHELL_SCRIPTS) ${INSTALL_DIR}
+install-kde-menu:
+	-cp kde/asir-knoppix ${KDE_MENU_DIR}
+	-cp kde/asir-openxm-knoppix ${KDE_MENU_DIR}
+	-cp kde/asir-openxm  ${KDE_MENU_DIR}
+	-cp kde/sm1 ${KDE_MENU_DIR}
+install.man :
+	-cp openxm.1 ${MAN_DIR}
 
+install.asir_key:
+	-../bin/sm1 -f fetch_asir_key.sm1
+
+install-bin :
+	cp -f webasir ../bin
+
 clean :
-	rm -f dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .gen-shell-scripts
+	rm -rf dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .done_gen-shell-scripts work