gecko-dev/webtools/tinderbox2/Makefile.in
2004-07-18 18:39:21 +00:00

159 lines
4.5 KiB
Makefile

# 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.
#
# complete rewrite by Ken Estes for contact info see the
# mozilla/webtools/tinderbox2/Contact file.
# 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
# how to run xargs to print only one argument on a line
xargs_single=@xargs_single@
#------------------------------------------------------------
@CONFIGURE_ARGS@
# 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
find $(builddir)/test/vcsim -type f | xargs chmod 555
find $(builddir)/test -type f -name '*tst' | xargs chmod 555
find $(builddir)/clientbin -type f | xargs chmod 555
compile_all_code: build
@echo
@echo "----- Testing if perl can compile code -----"
find $(builddir) -type f | \
egrep -v -i "readme|\.gif|/test/|addimage.cgi|images.pm|bustagestats.cgi|Storable.pm" | \
egrep -v -i "initrc|ignore_waitstatus|data" | \
xargs $(xargs_single) perl -T -w -c
compile_bin_code: build
@echo
@echo "----- Testing if perl can compile all files in the bin directory -----"
find $(builddir)/bin -type f | \
egrep -v -i "readme|\.gif|/test/|addimage.cgi|images.pm|bustagestats.cgi|initrc|Storable.pm" | \
xargs $(xargs_single) perl -T -w -c
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\: .* \$$'
popup_test: compile_bin_code
rm -rf $(html_prefix)/popup
mkdir -p $(html_prefix)/popup
perl $(builddir)/test/popup.tst
vcdisplay_test: compile_bin_code
perl $(builddir)/test/vcdisplay.tst
gen_test: compile_bin_code
rm -rf $(html_prefix)
perl $(builddir)/test/genbuilds.tst
perl $(builddir)/test/gennotices.tst
perl $(builddir)/test/genbugs.tst
perl -T -w $(builddir)/bin/tinder.cgi --daemon-mode
link_test:
find $(builddir) -type f -print | \
egrep -v -i "test|mage|clientbin" | \
xargs egrep -i "<a +href"
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
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
#------------------------------------------------------------