[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.16

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

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