File: Makefile

package info (click to toggle)
bugzilla 2.16.7-7sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,696 kB
  • ctags: 492
  • sloc: perl: 20,289; xml: 6,856; sh: 338; makefile: 211; python: 172
file content (206 lines) | stat: -rw-r--r-- 5,130 bytes parent folder | download
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
#$Id: Makefile,v 1.1.6.6 2002/09/04 22:22:49 jetto Exp $
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are

static= 1x1.gif \
bugwritinghelp.html \
bug_status.html \
confirmhelp.html \
helpemailquery.html \
help.html \
how_to_mail.html \
notargetmilestone.html \
votehelp.html \
quicksearch.html \
quicksearchhack.html \
robots.txt \
quicksearch.js \
localconfig.js \
ant.jpg \
bugzilla.dtd \
index.html

cgi= attachment.cgi \
buglist.cgi \
changepassword.cgi \
createaccount.cgi \
colchange.cgi \
describecomponents.cgi \
describekeywords.cgi \
doeditparams.cgi \
duplicates.cgi \
editattachstatuses.cgi \
editcomponents.cgi \
editgroups.cgi \
editkeywords.cgi \
editmilestones.cgi \
editparams.cgi \
editproducts.cgi \
editusers.cgi \
editversions.cgi \
enter_bug.cgi \
index.cgi \
long_list.cgi \
process_bug.cgi \
post_bug.cgi \
sanitycheck.cgi \
show_activity.cgi \
show_bug.cgi \
showattachment.cgi \
showdependencygraph.cgi \
showdependencytree.cgi \
sidebar.cgi \
query.cgi \
queryhelp.cgi \
quips.cgi \
relogin.cgi \
reports.cgi \
token.cgi \
userprefs.cgi \
votes.cgi \
xml.cgi 

lib_noexe=CGI.pl \
Bug.pm \
RelationSet.pm \
Token.pm \
Attachment.pm \
bug_form.pl \
defparams.pl \
debian-init.pl \
globals.pl

lib_exe=checksetup.pl \
collectstats.pl \
importxml.pl \
processmail \
syncshadowdb \
whineatnews.pl \
move.pl 

data_dir= shadow \
data

config_files= localconfig

other= README \
docs \
contrib


INSTALL=/usr/bin/install
PERL=/usr/bin/perl

DIR_MODE= 0755

DESTDIR =

#used for the substition of the dash bang string
TMP_INSTALL_DIR=/tmp/bugzilla

STATIC_DIR= 
STATIC_MODE= 0644
STATIC_GROUP=root
STATIC_OWNER=root

CGI_DIR= 
CGI_MODE= 0754
CGI_GROUP=root
CGI_OWNER=root

LIB_DIR=
LIB_EXE_MODE= 0755
LIB_NOEXE_MODE= 0644
LIB_GROUP=root
LIB_OWNER=root

DATA_DIR_PARENT= 
DATA_DIR_MODE= 0755
DATA_DIR_GROUP=www-data
DATA_DIR_OWNER=www-data

TEMPLATE_DIR=
TEMPLATE_DIR_MODE= 0755
TEMPLATE_MODE= 0644
TEMPLATE_GROUP=root
TEMPLATE_OWNER=root
TEMPLATE_FILES=$(shell find template -type f | sed -e 's!template/!!')


#install: sub_dashbang install_static install_cgi install_lib install_data_dir \
#         install_config_files install_other

install: sub_dashbang install_static install_cgi install_lib install_data_dir \
	 remove_tmp_install_dir install_template

list_files:
	@echo $(static) $(cgi) $(lib_noexe) $(lib_exe) $(TEMPLATE_FILES)

#substitute de the perl path in the #! string
sub_dashbang:
	$(INSTALL) -d $(TMP_INSTALL_DIR)
	for FIC in $(cgi) $(lib_exe) $(lib_noexe) ; do \
		sed -e '1s:#!.*perl:#!$(PERL):' $$FIC >$(TMP_INSTALL_DIR)/$$FIC; \
	done

remove_tmp_install_dir:
	-rm -rf $(TMP_INSTALL_DIR)

install_static:
	$(INSTALL) -d -m $(DIR_MODE) -o $(STATIC_OWNER)  -g $(STATIC_GROUP) $(DESTDIR)$(STATIC_DIR)
	for FIC in $(static) ; do \
		$(INSTALL) -m $(STATIC_MODE) -o $(STATIC_OWNER) -g $(STATIC_GROUP) $$FIC $(DESTDIR)$(STATIC_DIR) ;\
	done
	$(INSTALL) -d -m $(DIR_MODE) -o $(STATIC_OWNER)  -g $(STATIC_GROUP) $(DESTDIR)$(STATIC_DIR)/css
	$(INSTALL) -m $(STATIC_MODE) -o $(STATIC_OWNER) -g $(STATIC_GROUP) css/* $(DESTDIR)$(STATIC_DIR)/css
	
install_cgi:
	$(INSTALL) -d -m $(DIR_MODE) -o $(CGI_OWNER) -g $(CGI_GROUP) $(DESTDIR)$(CGI_DIR)
	for FIC in $(cgi) ; do \
		$(INSTALL) -m $(CGI_MODE) -o $(CGI_OWNER) -g $(CGI_GROUP) $(TMP_INSTALL_DIR)/$$FIC $(DESTDIR)$(CGI_DIR) ;\
	done

install_lib:
	$(INSTALL) -d -m $(DIR_MODE) -o $(LIB_OWNER) -g $(LIB_GROUP) $(DESTDIR)$(LIB_DIR)
	for FIC in $(lib_noexe) ; do \
		$(INSTALL) -m $(LIB_NOEXE_MODE) -o $(LIB_OWNER) -g $(LIB_GROUP) $(TMP_INSTALL_DIR)/$$FIC $(DESTDIR)$(LIB_DIR) ;\
	done ; \
	for FIC in $(lib_exe) ; do \
		$(INSTALL) -m $(LIB_EXE_MODE) -o $(LIB_OWNER) -g $(LIB_GROUP) $(TMP_INSTALL_DIR)/$$FIC $(DESTDIR)$(LIB_DIR) ;\
	done


install_data_dir:
	$(INSTALL) -d -m $(DIR_MODE) -o $(DATA_DIR_OWNER) -g $(DATA_DIR_GROUP) $(DESTDIR)$(DATA_DIR_PARENT)
	for FIC in $(data_dir) ; do \
		$(INSTALL) -d -m $(DATA_DIR_MODE) -o $(DATA_DIR_OWNER) -g $(DATA_DIR_GROUP) $(DESTDIR)$(DATA_DIR_PARENT)/$$FIC ;\
	done

install_template:
	for DIR in $(sort $(dir $(TEMPLATE_FILES) ) ) ; do \
		$(INSTALL) -d -m $(TEMPLATE_DIR_MODE) -o $(TEMPLATE_OWNER) -g $(TEMPLATE_GROUP) $(DESTDIR)$(TEMPLATE_DIR)/$$DIR ; \
	done
	for FIC in $(TEMPLATE_FILES) ; do \
		$(INSTALL) -m $(TEMPLATE_MODE) -o $(TEMPLATE_OWNER) -g $(TEMPLATE_GROUP) template/$$FIC $(DESTDIR)$(TEMPLATE_DIR)/`dirname $$FIC` ;\
	done
	
deb:
	fakeroot dpkg-buildpackage -us -uc

clean_cvs:
	find . -name CVS -type d -exec rm -rf {} \;
	find . -name .cvsignore -type f -exec rm -f {} \;