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