1 | # |
---|
2 | # NERC Data Grid Project |
---|
3 | # |
---|
4 | # @author P J Kershaw 15/03/07 |
---|
5 | # |
---|
6 | # Make all eggs |
---|
7 | # |
---|
8 | # @copyright: (C) 2007 STFC |
---|
9 | # |
---|
10 | # @license: This software may be distributed under the terms of the Q Public |
---|
11 | # License, version 1.0 or later. |
---|
12 | # |
---|
13 | # $Id$ |
---|
14 | EGG_DIRS=ndg.security.common ndg.security.client ndg.security.server \ |
---|
15 | ndg.security.test ndg.security |
---|
16 | |
---|
17 | # Override on the command line for alternative path |
---|
18 | PYTHON=python |
---|
19 | |
---|
20 | eggs: |
---|
21 | @-for dir in ${EGG_DIRS}; do \ |
---|
22 | cd $$dir; \ |
---|
23 | ${PYTHON} setup.py bdist_egg; \ |
---|
24 | cd ..; \ |
---|
25 | done; |
---|
26 | |
---|
27 | clean: |
---|
28 | @-for dir in ${EGG_DIRS}; do \ |
---|
29 | cd $$dir; \ |
---|
30 | rm -f dist/*.egg; \ |
---|
31 | rm -rf *.egg-info; \ |
---|
32 | rm -rf build; \ |
---|
33 | cd ..; \ |
---|
34 | done; |
---|
35 | |
---|
36 | replace: clean eggs |
---|
37 | |
---|
38 | # Convenient alias |
---|
39 | force: replace |
---|
40 | |
---|
41 | NDG_EGG_DIST_USER= |
---|
42 | NDG_EGG_DIST_HOST= |
---|
43 | NDG_EGG_DIST_DIR= |
---|
44 | |
---|
45 | install_eggs: eggs |
---|
46 | scp ndg-security-install.py ndg.*/dist/*.egg \ |
---|
47 | ${NDG_EGG_DIST_USER}@${NDG_EGG_DIST_HOST}:${NDG_EGG_DIST_DIR} |
---|
48 | |
---|
49 | # Make ZSI stubs from Session Manager WSDL |
---|
50 | SM_ZSI_STUB_DIRS=./ndg.security.server/ndg/security/server/zsi/sessionmanager \ |
---|
51 | ./ndg.security.common/ndg/security/common/zsi/sessionmanager |
---|
52 | |
---|
53 | sm_zsi_wsdl_stubs: |
---|
54 | @-for dir in ${SM_ZSI_STUB_DIRS}; do \ |
---|
55 | cd $$dir && make && cd ../../../../../..; \ |
---|
56 | done; |
---|
57 | |
---|
58 | # Make ZSI stubs from Attribute Authority WSDL |
---|
59 | AA_ZSI_STUB_DIRS=./ndg.security.server/ndg/security/server/zsi/attributeauthority \ |
---|
60 | ./ndg.security.common/ndg/security/common/zsi/attributeauthority |
---|
61 | |
---|
62 | aa_zsi_wsdl_stubs: |
---|
63 | @-for dir in ${AA_ZSI_STUB_DIRS}; do \ |
---|
64 | cd $$dir && make && cd ../../../../../..; \ |
---|
65 | done; |
---|
66 | |
---|
67 | # Make all ZSI stubs for NDG security |
---|
68 | zsi_wsdl_stubs: sm_zsi_wsdl_stubs aa_zsi_wsdl_stubs |
---|
69 | |
---|
70 | |
---|
71 | # Generate HTML from embedded epydoc text in source code. |
---|
72 | EPYDOC=epydoc |
---|
73 | EPYDOC_OUTDIR=../documentation/epydoc |
---|
74 | EPYDOC_NAME='NDG Security' |
---|
75 | EPYDOC_LOGFILE=epydoc.log |
---|
76 | EPYDOC_FRAMES_OPT=--no-frames |
---|
77 | epydoc: |
---|
78 | ${EPYDOC} ./ndg.security.*/ndg -o ${EPYDOC_OUTDIR} \ |
---|
79 | --name ${EPYDOC_NAME} ${EPYDOC_FRAMES_OPT} --include-log --graph=all -v \ |
---|
80 | > ${EPYDOC_LOGFILE} |
---|
81 | |
---|
82 | # Install epydoc on web server - set environment variables in a setup script |
---|
83 | # or one the command line and use the -e option for make |
---|
84 | NDG_EPYDOC_USER= |
---|
85 | NDG_EPYDOC_HOST= |
---|
86 | NDG_EPYDOC_DIR= |
---|
87 | install_epydoc: |
---|
88 | scp -r ${EPYDOC_OUTDIR} \ |
---|
89 | ${NDG_EPYDOC_USER}@${NDG_EPYDOC_HOST}:${NDG_EPYDOC_DIR} |
---|
90 | |
---|
91 | # Generate SysV init scripts for Twisted based services |
---|
92 | init_scripts: |
---|
93 | cd ./ndg.security.server/ndg/security/server/share && make generateScripts |
---|
94 | |
---|