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