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

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

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