| version 1.16, 2001/09/18 05:30:55 |
version 1.26, 2004/06/21 06:06:15 |
|
|
| # $OpenXM: OpenXM/rc/Makefile,v 1.15 2001/08/29 11:18:58 takayama Exp $ |
# $OpenXM: OpenXM/rc/Makefile,v 1.25 2004/06/20 07:55:28 takayama Exp $ |
| # make repl |
# make install-under-prefix [ prefix=/home/hoge ] ; Default is /usr/local |
| # make all |
prefix=/usr/local |
| # make install [ PREFIX=/home/hoge ] ; Default is /usr/local |
|
| CC=gcc |
CC=gcc |
| # SHELL_SCRIPTS=asir sm1 oxgp k0 oxmath oxMathematica ox |
# SHELL_SCRIPTS=asir sm1 oxgp k0 oxmath oxMathematica ox |
| SHELL_SCRIPTS=asir sm1 oxgp oxmath oxMathematica ox openxm |
SHELL_SCRIPTS=asir sm1 oxmath oxMathematica ox openxm webasir |
| PREFIX=/usr/local |
SHELL_SCRIPTS_FREE= sm1 oxmath oxMathematica ox openxm webasir |
| INSTALL_DIR=${PREFIX}/bin |
INSTALL_DIR=${prefix}/bin |
| MAN_DIR=../man/man1 |
MAN_DIR=../man/man1 |
| |
KDE_MENU_DIR=/usr/lib/menu |
| |
|
| all : dot.bashrc dot.cshrc openxm .done_gen-shell-scripts |
all-scripts : dot.bashrc dot.cshrc .done_gen-shell-scripts |
| |
|
| dot.bashrc : bashrc repl |
dot.bashrc : bashrc repl |
| rm -f dot.bashrc |
rm -f dot.bashrc |
| Line 23 dot.cshrc : cshrc repl |
|
| Line 23 dot.cshrc : cshrc repl |
|
| |
|
| repl : repl.c |
repl : repl.c |
| rm -f repl |
rm -f repl |
| ${CC} -static -o ../bin/rc.repl repl.c |
${CC} -o ../bin/rc.repl repl.c |
| ln -s ../bin/rc.repl repl |
ln -s ../bin/rc.repl repl |
| |
|
| openxm : dot.cshrc |
|
| rm -f openxm |
|
| echo "#!/bin/sh" >openxm |
|
| cat dot.bashrc >>openxm |
|
| echo 'exec $$*' >>openxm |
|
| chmod +x openxm |
|
| cp -f openxm ../bin |
|
| |
|
| .done_gen-shell-scripts : dot.cshrc Makefile gen-shell-scripts |
.done_gen-shell-scripts : dot.cshrc Makefile gen-shell-scripts |
| ./gen-shell-scripts |
./gen-shell-scripts |
| |
-install openxm ../bin |
| touch .done_gen-shell-scripts |
touch .done_gen-shell-scripts |
| |
|
| install : all |
#For the backword compatibility. |
| cp -f $(SHELL_SCRIPTS) ${INSTALL_DIR} |
install: install-scripts |
| |
install-scripts : all-scripts install-man |
| |
-install -d ${INSTALL_DIR} |
| |
-install $(SHELL_SCRIPTS) ${INSTALL_DIR} |
| |
install-man : |
| |
-install openxm.1 ${MAN_DIR} |
| |
install-kde-menu-knoppix: |
| |
install kde/openxm-binary-knoppix ${KDE_MENU_DIR}/openxm-binary |
| |
|
| install.man : |
clean : |
| -cp openxm.1 ${MAN_DIR} |
rm -rf dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .done_gen-shell-scripts work global .done_global |
| |
|
| install.asir_key: |
## New targets. Relocate OpenXM under ${prefix} |
| -../bin/sm1 -f fetch_asir_key.sm1 |
## They are designed to be a top level Makefile |
| |
all: |
| |
(cd ../src ; make all) |
| |
all-non-free: |
| |
(cd ../src ; make all-asir) |
| |
all-global-shell-scripts: repl |
| |
@if [ ! -f .done_global ] ; then \ |
| |
echo "Generating shell scripts in global" ; \ |
| |
rm -rf global ; mkdir global ; \ |
| |
(cd global ; ../repl bash --prefix ${prefix} <../bashrc >dot.bashrc); \ |
| |
(cd global ; ../repl csh --prefix ${prefix} <../cshrc >dot.cshrc); \ |
| |
(cd global ; ../gen-shell-scripts) ; \ |
| |
touch .done_global ; \ |
| |
fi |
| |
install-non-free: |
| |
(cd ../src ; make install-asir) |
| |
install-free: |
| |
(cd ../src ; make install) |
| |
install-under-prefix: all-global-shell-scripts install-free |
| |
make copy-free |
| |
make copy-non-free |
| |
install-global-scripts: all-global-shell-scripts |
| |
(cd global ; install ${SHELL_SCRIPTS} ${INSTALL_DIR}) |
| |
install-global-scripts-non-free: all-global-shell-scripts |
| |
(cd global ; install asir ${INSTALL_DIR}) |
| |
install-global-scripts-free: all-global-shell-scripts |
| |
(cd global ; install ${SHELL_SCRIPTS_FREE} ${INSTALL_DIR}) |
| |
|
| clean : |
clean-under-prefix: |
| rm -rf dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .gen-shell-scripts work |
-(cd ${prefix} ; rm -rf ${prefix}/OpenXM ) |
| |
# Relocate only asir |
| |
# make install-non-free ; make clean-under-prefix ; |
| |
# make install-global-scripts-non-free ; make copy-non-free |
| |
# Relocate only free |
| |
# make install-free ; make clean-under-prefix ; |
| |
# make install-global-scripts-free ; make copy-free |
| |
# |
| |
# junk-list is not a collection of real junk files. |
| |
# Files in it are not necessary for the binary package. They are important. |
| |
copy-free: all-global-shell-scripts |
| |
-mkdir ${prefix} |
| |
-(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 -) |
| |
# During installation OpenXM/bin/openxm must be overridden by global/openxm |
| |
install global/openxm ${prefix}/OpenXM/bin |
| |
|
| |
copy-non-free: all-global-shell-scripts |
| |
-mkdir ${prefix} |
| |
-(cd ../.. ; tar czf - --exclude-from OpenXM/rc/junk-list `cat OpenXM/rc/non-free-list`) | (cd ${prefix} ; tar xvzf -) |
| |
|