forked from adaptivecomputing/torque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
221 lines (191 loc) · 6.41 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
include $(top_srcdir)/buildutils/config.mk
ACLOCAL_AMFLAGS = -I buildutils
SUBDIRS = src doc contrib/blcr contrib/init.d contrib/systemd
EXTRA_DIST = acinclude.m4 \
CHANGELOG \
configure.ac \
cov_file_results.py \
current_hash \
Doxyfile \
INSTALL \
INSTALL.GNU \
Makefile.am \
parse_cov_results.py \
PBS_License.txt \
README.array_changes \
README.coding_notes \
README.configure \
README.cygwin \
README.NUMA \
README.torque \
README.trqauthd \
README.building_40 \
README.new_in_51 \
Release_Notes \
run_report.py \
torque.setup \
torque.spec \
buildutils/config.mk \
buildutils/modulefiles.in \
buildutils/modulefiles.vers.in \
buildutils/pbs_mach_type \
buildutils/pbs_mkdirs.in \
buildutils/self-extract-head-sh.in \
buildutils/torque.spec.in \
contrib/AddPrivileges \
contrib/hwloc_install.sh \
contrib/mom_gencfg \
contrib/pam_authuser.tar.gz \
contrib/pbstop \
contrib/pbsweb-lite-0.95.tar.gz \
contrib/pestat-1.0/Makefile \
contrib/pestat-1.0/pestat.c \
contrib/pestat-1.0/README \
contrib/qpeek \
contrib/qpool.gz \
contrib/PBS_License_2.3.txt \
contrib/README.pam_authuser \
contrib/README.pbs_ganglia_jobmonarch \
contrib/README.pbs_python \
contrib/README.pbstools \
contrib/README.pbstop \
contrib/README.pbs_weblite \
contrib/README.pestat \
contrib/README.qpeek \
contrib/resource_plugin_kit/plugin_driver.cpp \
contrib/resource_plugin_kit/README \
contrib/resource_plugin_kit/resource_plugin.cpp \
contrib/showjobs \
contrib/diag/tdiag.sh \
contrib/use_jobs_subdirs_setup \
src/test \
src/tools/test \
src/resmom/linux/test \
src/drmaa/test
bin_SCRIPTS = pbs-config
DISTCLEANFILES = pbs-config current_hash
MOSTLYCLEANFILES = *.gcda *.gcno *.gcov
DISTCHECK_CONFIGURE_FLAGS=--with-server-home=$$dc_install_base/spool
LIBTOOL_DEPS = @LIBTOOL_DEPS@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
snap:
$(MAKE) VERSION=$(VERSION)-snap.$${snapstamp:-`date +%Y%m%d%H%M`} dist
dist-hook:
case $(VERSION) in *-snap.*) \
for SPEC in torque.spec buildutils/torque.spec.in ; do \
chmod u+w $(distdir)/$$SPEC ; \
sed -e 's/^.define snap .*/%define snap 1/;' \
-e 's/^.define tarversion .*/%define tarversion $(VERSION)/' \
$(srcdir)/$$SPEC > $(distdir)/$$SPEC ; \
done ; \
chmod u+wx $(distdir)/configure ; \
sed -e 's/VERSION=.*/VERSION=$(VERSION)/' $(srcdir)/configure > $(distdir)/configure ;; \
esac
chmod u+w $(distdir)/README.torque
sed -e 's/TORQUE .* README .*/TORQUE $(VERSION) README (released '"`date '+%b, %d %Y'`"')/' $(srcdir)/README.torque > $(distdir)/README.torque
srpm: dist
rpmbuild $(RPMOPTS) -ts $(distdir).tar.gz
rpm: dist
rpmbuild $(RPM_AC_OPTS) $(RPMOPTS) -tb $(distdir).tar.gz
#
# Used by the 'packages' target below
#
# Additional package name, should be redefined to something meaningful to
# the user.
PKGNAME = package
# Directory with files that override the packaged files.
# Can be redefined on the make cmdline to a permanent location
PKGOVERRIDE = $(PWD)/pkgoverride
# temp dir for the packaged files and tarballs
PKGROOT = $(PWD)/tpackages
if INCLUDE_SERVER
SERVER_PKG = server
endif
if INCLUDE_MOM
MOM_PKG = mom
endif
if INCLUDE_CLIENTS
CLIENTS_PKG = clients
endif
if INCLUDE_GUI
GUI_PKG = gui
endif
if INCLUDE_PAM
PAM_PKG = pam
endif
if INCLUDE_DRMAA
DRMAA_PKG = drmaa
endif
ALL_PKGS = $(SERVER_PKG) $(MOM_PKG) $(CLIENTS_PKG) $(GUI_PKG) $(PAM_PKG) $(DRMAA_PKG) devel doc
install_server install_mom install_clients install_gui install_lib install_pam install_drmaa:
(cd src && $(MAKE) $@)
install_doc:
(cd doc && $(MAKE) $@)
install_devel: install-binSCRIPTS
(cd src && $(MAKE) $@)
packages:
@if `echo $(PKGROOT) | grep ^/ >/dev/null`;then \
echo "Building packages from $(PKGROOT)"; \
else \
echo "Error: PKGROOT must be an absolute path"; \
exit 1; \
fi
rm -rf $(PKGROOT)
mkdir $(PKGROOT)
@for d in $(ALL_PKGS);do \
proot=$(PKGROOT)/$$d; \
pname=$(PKGNAME); \
phost=$(PBS_MACH)-@host_cpu@; \
tarball=$(PKGROOT)/$(PACKAGE_NAME)-$$pname-$$d-$$phost.tar.gz; \
pkgfile=./$(PACKAGE_NAME)-$$pname-$$d-$$phost.sh; \
echo "Building $$pkgfile ..."; \
$(MAKE) DESTDIR=$$proot install_$$d >/dev/null || exit 1; \
case $$d in \
devel) :;; \
*) rm -f $$proot/$(libdir)/*a $$proot/$(libdir)/*.so;; \
esac; \
if test -d $(PKGOVERRIDE)/$$d ;then \
echo "Using override dir $(PKGOVERRIDE)/$$d"; \
( cd $(PKGOVERRIDE)/$$d && tar cf - . | (cd $$proot; tar xvf - ) ); \
fi; \
test $$d = gui && echo dummy > $$proot/regen-tclIndex; \
( cd $$proot; tar cf - * ) | gzip > $$tarball && \
( cd $$proot; tar cf - \
`test -f ./post-install && echo ./post-install` \
`test -f ./regen-tclIndex && echo ./regen-tclIndex` \
`test -d .$(sbindir) && echo .$(sbindir)/*` \
`test -d .$(bindir) && echo .$(bindir)/*` \
`test -d .$(libdir) && echo .$(libdir)/*` \
`test -d .$(mandir) && echo .$(mandir)/*/*` \
`test -d .$(includedir) && echo .$(includedir)/*` \
`test -d .$(pammoddir) && echo .$(pammoddir)/*` \
`test -d .$(PBS_SERVER_HOME) && echo .$(PBS_SERVER_HOME)/*` ) \
| gzip > $$tarball && \
cat ./buildutils/self-extract-head-sh > $$pkgfile && \
cat $$tarball >> $$pkgfile && \
chmod 755 $$pkgfile; \
done
@echo "Done."
@echo ""
@echo "The package files are self-extracting packages that can be copied"; \
echo "and executed on your production machines. Use --help for options.";
if INSTALL_MODULEFILES
install-data-hook:
$(INSTALL_DATA) -D ./buildutils/modulefiles $(DESTDIR)$(MODULEFILES_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)
$(INSTALL_DATA) ./buildutils/modulefiles.vers $(DESTDIR)$(MODULEFILES_DIR)/$(PACKAGE_NAME)/.version
uninstall-hook:
rm -f $(DESTDIR)$(MODULEFILES_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)
rm -f $(DESTDIR)$(MODULEFILES_DIR)/$(PACKAGE_NAME)/.version
rmdir $(DESTDIR)$(MODULEFILES_DIR)/$(PACKAGE_NAME)
endif
if HAVE_CHECK
CHECK_DIRS = src
else
check-recursive:
endif
.PHONY: cleancheck
cleancheck:
$(MAKE) -C $(CHECK_DIRS) $(MAKECMDGOALS)
doxygen:
doxygen Doxyfile