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

Annotation of OpenXM/rc/Makefile, Revision 1.24

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

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