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