[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / misc / packages / Generic / openxm

Annotation of OpenXM/misc/packages/Generic/openxm/Makefile, Revision 1.12

1.12    ! takayama    1: # $OpenXM: OpenXM/misc/packages/Generic/openxm/Makefile,v 1.11 2000/03/11 02:01:42 takayama Exp $
1.1       takayama    2: # This is a Makefile to generate source and binary distributions of
1.3       takayama    3: # the OpenXM package on various plathomes.
1.1       takayama    4:
1.8       takayama    5: # If you add new directory under OpenXM/lib, edit SHARED_FILES.
                      6:
1.4       takayama    7: ## For committers: prepare cvs-OpenXM under your search path
1.1       takayama    8: ## to access to CVS servers.
1.4       takayama    9: RCVS=cvs-OpenXM -d kerberos.math.sci.kobe-u.ac.jp:/usr/cvs
                     10: ### cvs-OpenXM is the following shell script
                     11: ## #!/bin/sh
                     12: ## CVS_RSH=ssh
                     13: ## export CVS_RSH
                     14: ## cvs $*
                     15:
1.7       takayama   16: ## Configurations.
1.3       takayama   17: ## OpenXM Version Number.
                     18: VERSION=1.1.2
1.12    ! takayama   19: TAG=HEAD
1.3       takayama   20:
1.1       takayama   21: RELEASE=
                     22: ## If you like to have a release name as a part of tar ball, then uncomment
                     23: ## the next line.
                     24: ##RELEASE=`uname -a`
                     25:
1.7       takayama   26: TYPE=`uname -s`-`uname -m`
                     27:
1.8       takayama   28: OpenXM_HOME=$(HOME)/OpenXM
                     29: TAR_WORK=$(HOME)/tmp
                     30: #TAR_WORK=${OpenXM_HOME}/misc/packages/Generic/openxm/work
                     31: INSTALL_WORK=${OpenXM_HOME}/misc/packages/Generic/openxm/work/openxm-install-dir
                     32:
                     33: ### Variables for the real Makefile
                     34: ### Variables should be set before the first target.
                     35: srcdir = .
                     36: prefix=${PREFIX}
                     37: MAN_DIR=${prefix}/man/man1
                     38: WORK=work/openxm-${VERSION}
                     39: ### End of variables for the real Makefile
                     40:
1.7       takayama   41: ### Common
                     42: SHARED_FILES = OpenXM/Copyright OpenXM/doc OpenXM/include OpenXM/man \
                     43:                OpenXM/lib/asir-contrib OpenXM/lib/java-support \
                     44:                OpenXM/lib/k097 OpenXM/lib/math OpenXM/lib/pari \
                     45:                OpenXM/lib/sm1 OpenXM/lib/asir
1.10      takayama   46: BINARY_FILES = OpenXM/bin OpenXM/lib/*.a OpenXM/lib/*.so* OpenXM/lib/*.a.* \
                     47:                OpenXM/rc
                     48:
1.8       takayama   49: EXECUTABLES=gnuplot4ox gnuplot_x11 k0 ox ox_sm1 oxlog oxweave sm1 tigers ox_math
1.2       takayama   50:
1.1       takayama   51: usage :
                     52:        @echo "Targets are "
1.8       takayama   53:        @echo "  fetch  :   get the sources from the cvs server under $(WORK)"
1.12    ! takayama   54:        @echo "  tar-ball : generate openxm-${VERSION}.tar.gz under $(TAR_WORK)"
        !            55:        @echo "  tar-ball-01 : generate openxm01-${VERSION}.tar.gz under $(TAR_WORK)"
1.8       takayama   56:        @echo "  binary-tar-ball : generate OpenXM-binary-OS-CPU.tgz under $(TAR_WORK)"
                     57:        @echo "  shared-tar-ball : generate OpenXM-shared.tgz under $(TAR_WORK)"
                     58:        @echo "  clean-work "
                     59:        @echo "  clean-for-make "
1.1       takayama   60:        @echo -n "Type is "
                     61:        @echo $(TYPE)
1.8       takayama   62:        @echo -n "INSTALL_WORK is "
                     63:        @echo  $(INSTALL_WORK)
                     64:        @echo -n "TAR_WORK is "
                     65:        @echo  $(TAR_WORK)
                     66:        @echo " "
1.1       takayama   67:
1.7       takayama   68: ### Start of Makefile  to work in the directory work/openxm-$(VERSION)
                     69: ### It does not work here.
                     70: ### Original version is in misc/packages/FreeBSD/openxm-1.1.2
                     71: ### Absolute path should be used for TAR_WORK
                     72:
                     73: usage-of-real-make:
                     74:        @echo "Targets are all, install, clean, distclean"
                     75:        @echo "You need to specify the PREFIX to install,"
                     76:        @echo "e.g., make install PREFIX=/usr/local"
                     77:
                     78: configure :
1.8       takayama   79:        @if [ ! -f .configure_done ] ; then \
                     80:                (cd $(srcdir)/OpenXM/src ;      make configure ) ; \
1.7       takayama   81:        fi
                     82:        @touch .configure_done
                     83:
                     84: all : configure
                     85:        @if [ ! -f .all_done ] ; then \
1.8       takayama   86:                (cd $(srcdir)/OpenXM/src ;      make binary-dist) ; \
                     87:        fi
                     88:        @touch .all_done
                     89:
                     90: all-ideal : configure
                     91:        @if [ ! -f .all_done ] ; then \
                     92:                (cd $(srcdir)/OpenXM/src ;      make ;  make install) ; \
1.7       takayama   93:        fi
                     94:        @touch .all_done
                     95:
                     96: install : install-binary-files install-shared-files
1.9       takayama   97:        make install-shell-scripts PREFIX=${prefix}
                     98:
                     99: install-shell-scripts:
1.7       takayama  100: # Install shell scripts to ${prefix}/bin, which is typically /usr/local/bin
                    101:        (cd ${prefix}/OpenXM/rc ; make ; make install PREFIX=${prefix})
                    102:
                    103: install-binary-files:  all
                    104:        @echo "install-binary-files with PREFIX= "
                    105:        @echo ${prefix}
                    106:        tar cf - ${BINARY_FILES} | (cd ${prefix} ; tar xf -)
1.8       takayama  107:        (cd ${prefix}/OpenXM/bin ; make clean-for-install)
                    108:        -for i in $(EXECUTABLES); do strip ${prefix}/OpenXM/bin/$$i ; done
1.7       takayama  109:
                    110: install-shared-files:  all
                    111:        @echo "install-binary-files with PREFIX= "
                    112:        @echo ${prefix}
                    113:        tar cf - ${SHARED_FILES} | (cd ${prefix} ; tar xf -)
                    114:
                    115: install.man : install
                    116:        -cp ${prefix}/OpenXM/man/man1/sm1.1 ${prefix}/OpenXM/man/man1/openxm.1 ${MAN_DIR}
                    117:        -gzip ${MAN_DIR}/sm1.1 ${MAN_DIR}/openxm.1
                    118:
                    119: clean :
                    120:        cd $(srcdir)/OpenXM/src ; make clean
                    121:        rm -f .*_done*
                    122:
                    123: distclean :
                    124:        cd $(srcdir)/OpenXM/src ; make distclean
                    125:        rm -f .*_done*
                    126:
                    127: clean-installed-openxm:
                    128:        /bin/rm -rf ${prefix}/OpenXM
                    129:
                    130: ########### end of the real Makefile
                    131:
                    132:
                    133:
1.1       takayama  134: fetch :
                    135:        @if [ ! -f ./.fetch_done ]; then \
1.8       takayama  136:                /bin/rm -rf work ; mkdir work ; mkdir ${WORK} ; \
1.12    ! takayama  137:                ( cd ${WORK} ; $(RCVS) export -r${TAG} OpenXM OpenXM_contrib OpenXM_contrib2) ; \
1.8       takayama  138:                cp Makefile ${WORK}/Makefile ; \
1.1       takayama  139:        fi
                    140:        @touch ./.fetch_done
                    141:
1.7       takayama  142: tar-ball: fetch
1.8       takayama  143:        cp Makefile ${WORK}/Makefile
                    144:        (cd ${WORK}/OpenXM/src ; make generate-source-distribution)
                    145:        (cd work ; tar czvf ${TAR_WORK}/openxm-${VERSION}.tar.gz openxm-${VERSION})
1.7       takayama  146:
                    147: tar-ball-01: fetch
                    148:        @if [ ! -f ./.tar-ball-01_done ]; then \
1.8       takayama  149:                cp Makefile ${WORK}/Makefile  ; \
                    150:                (cd ${WORK}/OpenXM/src ; make generate-source-distribution) ; \
                    151:                (cd work ; tar czvf ${TAR_WORK}/openxm01-${VERSION}.tar.gz openxm-${VERSION}/OpenXM openxm-${VERSION}/OpenXM_contrib ) ; \
1.1       takayama  152:        fi
1.7       takayama  153:        @touch ./.tar-ball-01_done
                    154:
                    155: binary-tar-ball : tar-ball-01
1.8       takayama  156:        cp Makefile ${WORK}/Makefile
                    157:        rm -rf ${INSTALL_WORK}
                    158:        mkdir ${INSTALL_WORK} ${INSTALL_WORK}/bin ${INSTALL_WORK}/man
                    159:        mkdir ${INSTALL_WORK}/man/man1
                    160:        (cd ${WORK} ; make install-binary-files PREFIX=${INSTALL_WORK})
                    161:        (cd ${INSTALL_WORK} ; tar czf ${TAR_WORK}/OpenXM-binary-$(TYPE)$(RELEASE).tgz ${BINARY_FILES})
                    162:
                    163: shared-tar-ball : tar-ball-01
                    164:        cp Makefile ${WORK}/Makefile
                    165:        rm -rf ${INSTALL_WORK}
                    166:        mkdir ${INSTALL_WORK} ${INSTALL_WORK}/bin ${INSTALL_WORK}/man
                    167:        mkdir ${INSTALL_WORK}/man/man1
                    168:        (cd ${WORK} ; make install-shared-files PREFIX=${INSTALL_WORK})
                    169:        (cd ${INSTALL_WORK} ; tar czf ${TAR_WORK}/OpenXM-shared-$(TYPE)$(RELEASE).tgz ${SHARED_FILES})
1.1       takayama  170:
                    171:
1.8       takayama  172: clean-work :
1.3       takayama  173:        /bin/rm -rf .*_done *~
1.11      takayama  174:        /bin/rm -rf work work-fake
1.8       takayama  175:
                    176: clean-for-make:
                    177:        (cd ${WORK} ; make distclean)
                    178:        rm -f .configure_done .all_done

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