Annotation of OpenXM/rc/Makefile, Revision 1.28
1.28 ! noro 1: # $OpenXM: OpenXM/rc/Makefile,v 1.27 2007/11/27 22:26:29 takayama Exp $
1.23 takayama 2: # make install-under-prefix [ prefix=/home/hoge ] ; Default is /usr/local
3: prefix=/usr/local
1.2 takayama 4: CC=gcc
1.10 takayama 5: # SHELL_SCRIPTS=asir sm1 oxgp k0 oxmath oxMathematica ox
1.28 ! noro 6: SHELL_SCRIPTS=asir asir2000 sm1 oxmath oxMathematica ox openxm webasir
1.25 takayama 7: SHELL_SCRIPTS_FREE= sm1 oxmath oxMathematica ox openxm webasir
1.23 takayama 8: INSTALL_DIR=${prefix}/bin
1.11 takayama 9: MAN_DIR=../man/man1
1.19 takayama 10: KDE_MENU_DIR=/usr/lib/menu
1.5 takayama 11:
1.27 takayama 12: # SHELL_SCRIPTS are generated by "gen-shell-scripts"
1.24 takayama 13: all-scripts : dot.bashrc dot.cshrc .done_gen-shell-scripts
1.1 takayama 14:
1.4 takayama 15: dot.bashrc : bashrc repl
1.1 takayama 16: rm -f dot.bashrc
17: echo "# DO NOT EDIT THIS FILE" >dot.bashrc
1.15 takayama 18: ./repl bash <bashrc >>dot.bashrc
1.1 takayama 19:
20: dot.cshrc : cshrc repl
21: rm -f dot.cshrc
22: echo "# DO NOT EDIT THIS FILE" >dot.cshrc
1.15 takayama 23: ./repl csh <cshrc >>dot.cshrc
1.1 takayama 24:
1.13 takayama 25: repl : repl.c
1.14 takayama 26: rm -f repl
1.22 takayama 27: ${CC} -o ../bin/rc.repl repl.c
1.14 takayama 28: ln -s ../bin/rc.repl repl
1.1 takayama 29:
1.4 takayama 30: .done_gen-shell-scripts : dot.cshrc Makefile gen-shell-scripts
31: ./gen-shell-scripts
1.23 takayama 32: -install openxm ../bin
1.4 takayama 33: touch .done_gen-shell-scripts
34:
1.23 takayama 35: #For the backword compatibility.
1.24 takayama 36: install: install-scripts
37: install-scripts : all-scripts install-man
38: -install -d ${INSTALL_DIR}
1.23 takayama 39: -install $(SHELL_SCRIPTS) ${INSTALL_DIR}
40: install-man :
41: -install openxm.1 ${MAN_DIR}
1.21 takayama 42: install-kde-menu-knoppix:
43: install kde/openxm-binary-knoppix ${KDE_MENU_DIR}/openxm-binary
1.5 takayama 44:
1.23 takayama 45: clean :
46: rm -rf dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .done_gen-shell-scripts work global .done_global
1.17 takayama 47:
1.23 takayama 48: ## New targets. Relocate OpenXM under ${prefix}
49: ## They are designed to be a top level Makefile
50: all:
51: (cd ../src ; make all)
52: all-non-free:
1.24 takayama 53: (cd ../src ; make all-asir)
1.23 takayama 54: all-global-shell-scripts: repl
55: @if [ ! -f .done_global ] ; then \
56: echo "Generating shell scripts in global" ; \
57: rm -rf global ; mkdir global ; \
58: (cd global ; ../repl bash --prefix ${prefix} <../bashrc >dot.bashrc); \
59: (cd global ; ../repl csh --prefix ${prefix} <../cshrc >dot.cshrc); \
60: (cd global ; ../gen-shell-scripts) ; \
61: touch .done_global ; \
62: fi
1.24 takayama 63: install-non-free:
64: (cd ../src ; make install-asir)
65: install-free:
1.23 takayama 66: (cd ../src ; make install)
1.24 takayama 67: install-under-prefix: all-global-shell-scripts install-free
1.23 takayama 68: make copy-free
69: make copy-non-free
1.24 takayama 70: install-global-scripts: all-global-shell-scripts
71: (cd global ; install ${SHELL_SCRIPTS} ${INSTALL_DIR})
1.25 takayama 72: install-global-scripts-non-free: all-global-shell-scripts
73: (cd global ; install asir ${INSTALL_DIR})
74: install-global-scripts-free: all-global-shell-scripts
75: (cd global ; install ${SHELL_SCRIPTS_FREE} ${INSTALL_DIR})
1.23 takayama 76:
77: clean-under-prefix:
78: -(cd ${prefix} ; rm -rf ${prefix}/OpenXM )
1.24 takayama 79: # Relocate only asir
80: # make install-non-free ; make clean-under-prefix ;
1.25 takayama 81: # make install-global-scripts-non-free ; make copy-non-free
1.24 takayama 82: # Relocate only free
83: # make install-free ; make clean-under-prefix ;
1.25 takayama 84: # make install-global-scripts-free ; make copy-free
1.24 takayama 85: #
1.23 takayama 86: # junk-list is not a collection of real junk files.
87: # Files in it are not necessary for the binary package. They are important.
88: copy-free: all-global-shell-scripts
89: -mkdir ${prefix}
1.26 takayama 90: -(cd ../.. ; tar czf - --exclude-from OpenXM/rc/non-free-list --exclude OpenXM/misc --exclude OpenXM/src --exclude-from OpenXM/rc/junk-list OpenXM) | (cd ${prefix} ; tar xvzf -)
1.23 takayama 91: # During installation OpenXM/bin/openxm must be overridden by global/openxm
92: install global/openxm ${prefix}/OpenXM/bin
93:
1.24 takayama 94: copy-non-free: all-global-shell-scripts
1.23 takayama 95: -mkdir ${prefix}
96: -(cd ../.. ; tar czf - --exclude-from OpenXM/rc/junk-list `cat OpenXM/rc/non-free-list`) | (cd ${prefix} ; tar xvzf -)
1.4 takayama 97:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>