| version 1.2, 2000/01/18 09:42:17 |
version 1.30, 2019/09/30 06:11:05 |
|
|
| # $OpenXM: OpenXM/rc/Makefile,v 1.1 2000/01/18 09:38:58 takayama Exp $ |
# $OpenXM: OpenXM/rc/Makefile,v 1.29 2019/09/30 02:42:57 takayama Exp $ |
| |
# make install-under-prefix [ prefix=/home/hoge ] ; Default is /usr/local |
| |
prefix=/usr/local |
| CC=gcc |
CC=gcc |
| all : dot.bashrc dot.cshrc openxm |
# SHELL_SCRIPTS=asir sm1 oxgp k0 oxmath oxMathematica ox |
| |
SHELL_SCRIPTS=asir asir2000 sm1 oxmath oxMathematica ox openxm webasir |
| |
SHELL_SCRIPTS_FREE= sm1 oxmath oxMathematica ox openxm webasir |
| |
INSTALL_DIR=${prefix}/bin |
| |
MAN_DIR=../man/man1 |
| |
KDE_MENU_DIR=/usr/lib/menu |
| |
|
| dot.bashrc : bashrc repl |
# SHELL_SCRIPTS are generated by "gen-shell-scripts" |
| |
all-scripts : dot.bashrc dot.cshrc .done_gen-shell-scripts |
| |
|
| |
dot.bashrc : bashrc repl |
| rm -f dot.bashrc |
rm -f dot.bashrc |
| echo "# DO NOT EDIT THIS FILE" >dot.bashrc |
echo "# DO NOT EDIT THIS FILE" >dot.bashrc |
| ./repl <bashrc >>dot.bashrc |
./repl bash <bashrc >>dot.bashrc |
| |
|
| dot.cshrc : cshrc repl |
dot.cshrc : cshrc repl |
| rm -f dot.cshrc |
rm -f dot.cshrc |
| echo "# DO NOT EDIT THIS FILE" >dot.cshrc |
echo "# DO NOT EDIT THIS FILE" >dot.cshrc |
| ./repl <cshrc >>dot.cshrc |
./repl csh <cshrc >>dot.cshrc |
| |
|
| repl : repl.c |
repl : repl.c |
| ${CC} -o repl repl.c |
rm -f repl |
| |
${CC} -o ../bin/rc.repl repl.c |
| |
ln -s ../bin/rc.repl repl |
| |
|
| openxm : dot.cshrc |
.done_gen-shell-scripts : dot.cshrc Makefile gen-shell-scripts |
| rm -f openxm |
./gen-shell-scripts |
| echo "#!/bin/csh" >openxm |
-install openxm ../bin |
| cat dot.cshrc >>openxm |
touch .done_gen-shell-scripts |
| echo '$$*' >>openxm |
|
| chmod +x openxm |
|
| |
|
| |
#For the backword compatibility. |
| |
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 |
| |
|
| clean : |
clean : |
| rm -f dot.bashrc dot.cshrc repl openxm |
rm -rf dot.bashrc dot.cshrc repl openxm $(SHELL_SCRIPTS) .done_gen-shell-scripts work global .done_global |
| |
|
| |
## New targets. Relocate OpenXM under ${prefix} |
| |
## 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-under-prefix: |
| |
-(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 -) |
| |
|
| |
install-emacs-asir-on-mac: all-scripts |
| |
-mkdir -p ~/bin |
| |
cp ../bin/openxm ~/bin |
| |
if type "openxm" >/dev/null 2>&1; then \ |
| |
echo "openxm is already in the path."; \ |
| |
else \ |
| |
echo "export PATH=~/bin:$$PATH" >>~/.bash_profile ; \ |
| |
echo "~/bin is added to the path."; \ |
| |
fi |
| |
~/bin/openxm use-asir-mode.sh --local-yes |
| |
@echo "Installation completed. Login again or do source ./dot.bashrc to start emacs/asir" |
| |
|
| |
norc-fix: |
| |
pushd ../bin ; mv openxm openxm.orig ; sed -e 's/ASIR_CONFIG/#ASIR_CONFIG/g' openxm.orig >openxm ; chmod +x openxm ; popd |
| |
|