Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·134 lines (108 loc) · 3.46 KB
/
Copy pathMakefile
File metadata and controls
executable file
·134 lines (108 loc) · 3.46 KB
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
#
# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
#
# This file is part of the SEED Toolkit.
#
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License.
#
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.
#
#
# seed_running_perl.fragement is the piece of perl code that
# checks to see if the seed server is up, and prints a message and returns
# if it is not.
#
PKGNAME=WebApplication
PERLCGISCRIPTS := $(subst .pl,,$(wildcard *.cgi))
PERL_LIB = $(wildcard *.pm) \
$(wildcard WebPage/*.pm) \
$(wildcard WebComponent/*.pm) \
$(wildcard WebComponent/FormWizard/*.pm) \
$(wildcard DataHandler/*.pm) \
$(wildcard WebLayout/*.pm) \
$(wildcard WebServerBackend/*.pm) \
$(wildcard WebComments/*.pm) \
$(wildcard JSON/*.pm)
WEBPAGES := $(wildcard templates/*.tmpl) \
$(wildcard images/*.png) \
$(wildcard images/*.gif) \
$(wildcard images/*.jpg) \
$(wildcard images/*.jpeg) \
$(wildcard WebComponent/images/*.png) \
$(wildcard WebComponent/images/*.gif) \
$(wildcard WebComponent/images/*.jpg) \
$(wildcard WebComponent/images/*.jpeg) \
$(wildcard WebComponent/templates/*.html) \
$(wildcard WebComponent/templates/*.tmpl) \
$(wildcard WebComponent/js/*.js) \
$(wildcard WebComponent/js/*.swf) \
$(wildcard WebComponent/js/*.css) \
$(wildcard WebComponent/js/*.htc)
CSS_FILES := \
$(wildcard css/*.css) \
$(wildcard WebComponent/css/*.css)
INST_PERL_LIB = $(foreach var, $(PERL_LIB), $(libdir)/$(PKGNAME)/$(var))
INST_WEBPAGES = $(foreach var, $(WEBPAGES), $(cgidir)/Html/$(var))
INST_CSS_FILES = $(foreach var, $(CSS_FILE), $(cgidir)/Html/$(var))
all: lib
show:
@echo cgis $(foreach var, $(PERLCGISCRIPTS), $(cgidir)/$(var))
@echo top $(TOPDIR)
@echo pkg $(PKGNAME)
@echo toolhdr $(TOOL_HDR)
bin:
lib: $(foreach var, $(PERLCGISCRIPTS), $(cgidir)/$(var)) copy_htaccess $(INST_PERL_LIB) $(INST_WEBPAGES) copy_css fix_web_perms
fix_web_perms:
ifneq (,$(findstring public_html, $(cgidir)))
chmod go-w $(cgidir)
endif
#
# Gross hack.
#
copy_css: $(CSS_FILES)
for css in $(CSS_FILES); do \
f=`basename $$css`; \
cp $$css $(cgidir)/Html/$$f; \
done
htaccess_src = $(RTROOT)/config/all.htaccess
htaccess_dst = $(cgidir)/.htaccess
copy_htaccess: force
if test -f $(htaccess_src); then \
cp $(htaccess_src) $(htaccess_dst) ; \
fi
force:
schematools:
stDeclFiles:
stGeneratedFiles:
test:
clean:
$(cgidir)/%: $(TOPDIR)/src/$(PKGNAME)/% $(TOOL_HDR)
( cat $(TOOL_HDR) $< > $@; chmod +x $@ )
ifneq (,$(findstring public_html, $(cgidir)))
chmod go-w $@
endif
$(cgidir)/Html/%: $(TOPDIR)/src/$(PKGNAME)/%
cp $< $(cgidir)/Html/.
#
# We have a config problem at the moment. I do not want to depend
# upon explicit calls to other packages, as done here nor do I want
# to assume that package was built first. For now, we live with this.
#$(TOOL_HDR):
# cd $(workdir); $(TOPDIR)/FigCommon/configure-env $(RTARCH) $(TOPDIR)
#
# Since our lib files have directories, need to create the target
# directory if it doesn't yet exist.
#
$(libdir)/$(PKGNAME)/%.pm: $(TOPDIR)/src/$(PKGNAME)/%.pm
tgt_dir=`dirname $@`; \
if [ ! -d $$tgt_dir ] ; then \
mkdir $$tgt_dir; \
fi
cp $< $@