2002-04-24 07:26:09 +04:00
|
|
|
# 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/NPL/
|
|
|
|
#
|
|
|
|
# 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 Tinderbox build tool.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
|
|
|
# Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
|
2003-08-17 06:21:24 +04:00
|
|
|
# complete rewrite by Ken Estes for contact info see the
|
|
|
|
# mozilla/webtools/tinderbox2/Contact file.
|
2002-04-24 07:26:09 +04:00
|
|
|
# Contributor(s): Stephen Lamm (slamm@yahoo-inc.com)
|
|
|
|
|
|
|
|
# Files are processed by the perl script ./config.out as they are copied
|
|
|
|
# from the source tree to the build tree.
|
|
|
|
|
|
|
|
# Files are installed without change from the build directory into the
|
|
|
|
# tree rooted at prefix.
|
|
|
|
|
|
|
|
|
|
|
|
# Makefile Variables
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
# the prefix where most of the binaries will be install
|
|
|
|
prefix=@prefix@
|
|
|
|
|
|
|
|
# the directory where the cgibin files must go
|
|
|
|
cgibin_prefix=@cgibin_prefix@
|
|
|
|
|
|
|
|
# the root of the html directory
|
|
|
|
html_prefix=@html_prefix@
|
|
|
|
|
|
|
|
# where files will be built before they are installed
|
|
|
|
builddir=@builddir@
|
|
|
|
|
|
|
|
config_script=@config_script@
|
|
|
|
confdir=localconf
|
|
|
|
|
2002-12-09 21:01:13 +03:00
|
|
|
# how to run xargs to print only one argument on a line
|
|
|
|
xargs_single=@xargs_single@
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
@CONFIGURE_ARGS@
|
|
|
|
|
2002-04-24 07:26:09 +04:00
|
|
|
# Makefile Targets
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
all: build
|
|
|
|
ALL: all
|
|
|
|
|
|
|
|
build: make_build_dirs build_files set_build_permissions
|
|
|
|
|
|
|
|
install: build make_install_dirs install_files
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo
|
|
|
|
@echo "----- Cleaning Build Directory-----"
|
|
|
|
@echo
|
|
|
|
rm -rf $(builddir)
|
|
|
|
|
|
|
|
|
|
|
|
# We do not accidently wish to edit to the 'binary' version of these
|
|
|
|
# files so ensure the build dir copies are not writable.
|
|
|
|
|
|
|
|
set_build_permissions:
|
|
|
|
@echo
|
|
|
|
@echo "----- Setting Build directory permissions -----"
|
|
|
|
find $(builddir) -type f | xargs chmod 444
|
|
|
|
find $(builddir)/bin -type f | xargs chmod 555
|
2003-05-12 21:34:37 +04:00
|
|
|
find $(builddir)/test/vcsim -type f | xargs chmod 555
|
2003-05-26 18:31:37 +04:00
|
|
|
find $(builddir)/test -type f -name '*tst' | xargs chmod 555
|
2002-04-24 07:26:09 +04:00
|
|
|
find $(builddir)/clientbin -type f | xargs chmod 555
|
|
|
|
|
|
|
|
compile_all_code: build
|
|
|
|
@echo
|
|
|
|
@echo "----- Testing if perl can compile code -----"
|
|
|
|
find $(builddir) -type f | \
|
2002-04-25 04:12:56 +04:00
|
|
|
egrep -v -i "readme|\.gif|/test/|addimage.cgi|images.pm|bustagestats.cgi|initrc|Storable.pm" | \
|
2002-04-25 04:57:07 +04:00
|
|
|
egrep -v -i "initrc|ignore_waitstatus" | \
|
2002-12-09 21:01:13 +03:00
|
|
|
xargs $(xargs_single) perl -T -w -c
|
2002-04-24 07:26:09 +04:00
|
|
|
|
|
|
|
compile_bin_code: build
|
|
|
|
@echo
|
|
|
|
@echo "----- Testing if perl can compile all files in the bin directory -----"
|
|
|
|
find $(builddir)/bin -type f | \
|
2002-04-25 04:12:56 +04:00
|
|
|
egrep -v -i "readme|\.gif|/test/|addimage.cgi|images.pm|bustagestats.cgi|initrc|Storable.pm" | \
|
2002-12-09 21:01:13 +03:00
|
|
|
xargs $(xargs_single) perl -T -w -c
|
2002-05-10 02:37:06 +04:00
|
|
|
|
|
|
|
|
|
|
|
cvskeyword_test:
|
|
|
|
find $(builddir) -type f | egrep -v "gif" | xargs egrep -L '\$$Date\: .*\$$'
|
|
|
|
find $(builddir) -type f | egrep -v "gif" | xargs egrep -L '\$$Revision\: .* \$$'
|
|
|
|
find $(builddir) -type f | egrep -v "gif" | xargs egrep -L '\$$Author\: .* \$$'
|
2002-04-24 07:26:09 +04:00
|
|
|
|
2002-05-01 05:48:55 +04:00
|
|
|
|
|
|
|
popup_test: compile_bin_code
|
|
|
|
rm -rf $(html_prefix)/popup
|
|
|
|
mkdir -p $(html_prefix)/popup
|
|
|
|
perl $(builddir)/test/popup.tst
|
|
|
|
|
2002-12-10 22:22:18 +03:00
|
|
|
vcdisplay_test: compile_bin_code
|
|
|
|
perl $(builddir)/test/vcdisplay.tst
|
|
|
|
|
2002-04-24 07:26:09 +04:00
|
|
|
gen_test: compile_bin_code
|
|
|
|
rm -rf $(html_prefix)
|
|
|
|
perl $(builddir)/test/genbuilds.tst
|
|
|
|
perl $(builddir)/test/gennotices.tst
|
|
|
|
perl $(builddir)/test/genbugs.tst
|
2002-05-10 02:37:06 +04:00
|
|
|
perl -T -w $(builddir)/bin/tinder.cgi --daemon-mode
|
2002-04-24 07:26:09 +04:00
|
|
|
|
|
|
|
link_test:
|
|
|
|
find $(builddir) -type f -print | \
|
2002-04-25 04:12:56 +04:00
|
|
|
egrep -v -i "test|mage|clientbin" | \
|
2002-04-24 07:26:09 +04:00
|
|
|
xargs egrep -i "<a +href"
|
|
|
|
|
2002-12-09 21:01:13 +03:00
|
|
|
check_all_use_statements:
|
|
|
|
rm file
|
|
|
|
echo '#!perl' >> file
|
|
|
|
echo >> file
|
|
|
|
find $(builddir) \
|
|
|
|
| xargs egrep -h '^use ' | egrep ';$' \
|
|
|
|
| sort -r -u \
|
|
|
|
>> $(builddir)/bin/check_all_use_statements
|
|
|
|
echo >> file
|
|
|
|
echo '1;' >> file
|
|
|
|
|
2002-04-24 07:26:09 +04:00
|
|
|
STAGE_FILE := \
|
|
|
|
tb2StageFile() { \
|
|
|
|
source=$$1; \
|
|
|
|
target=$$2; \
|
|
|
|
if [ -f $$target ]; then chmod +w $$target; fi; \
|
|
|
|
perl $(config_script) < $$source > $$target; \
|
|
|
|
chmod -w $$target; \
|
|
|
|
echo "Staging $$source" 2>&1; \
|
|
|
|
}; tb2StageFile
|
|
|
|
|
|
|
|
INSTALL_FILE := \
|
|
|
|
tb2InstallFile() { \
|
|
|
|
source=$$1; \
|
|
|
|
target=$$2; \
|
|
|
|
if [ -f $$target ]; then chmod +w $$target; fi; \
|
|
|
|
echo "Install $$source -> $$target" 2>&1; \
|
|
|
|
cp -p $$source $$target; \
|
|
|
|
}; tb2InstallFile
|
|
|
|
|
|
|
|
# Automated file list is generated after this line
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|