File: Makefile.am

package info (click to toggle)
torque 2.4.8%2Bdfsg-9squeeze4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,400 kB
  • ctags: 12,712
  • sloc: ansic: 197,587; tcl: 17,887; sh: 10,698; yacc: 2,215; perl: 1,709; makefile: 1,151; lex: 749
file content (152 lines) | stat: -rw-r--r-- 5,465 bytes parent folder | download | duplicates (2)
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
include $(top_srcdir)/buildutils/config.mk

SUBDIRS = src doc

EXTRA_DIST = CHANGELOG INSTALL.GNU README.configure README.mpiexec \
             README.torque README.cygwin Release_Notes torque.setup buildutils/torque.spec.in \
             DEVELOPMENT PBS_License.txt torque.spec \
	     buildutils/self-extract-head-sh.in \
	     buildutils/pbs_mkdirs.in buildutils/pbs_mach_type \
	     buildutils/config.mk \
	     buildutils/modulefiles.in buildutils/modulefiles.vers.in \
	     contrib/README.pestat contrib/README.pbstop \
	     contrib/README.qpeek contrib/pestat-1.0/pestat.c \
	     contrib/pestat-1.0/README contrib/pestat-1.0/Makefile \
	     contrib/README.pbs_ganglia_jobmonarch contrib/pam_authuser.tar.gz \
	     contrib/README.pam_authuser contrib/pbstop \
	     contrib/README.pbs_python contrib/README.pbs_weblite \
	     contrib/qpeek contrib/init.d/pbs_mom contrib/init.d/pbs_server \
	     contrib/init.d/pbs_sched contrib/init.d/suse.pbs_mom \
	     contrib/init.d/suse.pbs_server contrib/init.d/suse.pbs_sched \
			 contrib/init.d/debian.pbs_mom contrib/init.d/debian.pbs_server \
			 contrib/init.d/debian.pbs_sched \
	     contrib/blcr/checkpoint_script contrib/blcr/restart_script

bin_SCRIPTS = pbs-config

DISTCLEANFILES = pbs-config

DISTCHECK_CONFIGURE_FLAGS=--with-server-home=$$dc_install_base/spool

snap:
	$(MAKE) VERSION=$(VERSION)-snap.$${snapstamp:-`date +%Y%m%d%H%M`} dist

dist-hook:
	chmod u+w $(distdir)/README.torque $(distdir)/configure $(distdir)/torque.spec
	sed -e 's/TORQUE .* README .*/TORQUE $(VERSION) README (released '"`date '+%b, %d %Y'`"')/' < $(srcdir)/README.torque > $(distdir)/README.torque
	sed -e 's/VERSION=.*/VERSION=$(VERSION)/' < $(srcdir)/configure > $(distdir)/configure

srpm: dist
	rpmbuild -ts $(distdir).tar.gz

rpm: dist
	rpmbuild $(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