[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / rc

Annotation of OpenXM/rc/Makefile, Revision 1.25

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>