[Bio] / FigWebServices / Makefile Repository:
ViewVC logotype

View of /FigWebServices/Makefile

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.22 - (download) (annotate)
Tue Sep 27 22:00:19 2011 UTC (8 years, 4 months ago) by olson
Branch: MAIN
CVS Tags: mgrast_version_3_2, mgrast_dev_12152011, mgrast_release_3_1_2, rast_rel_2011_0928, mgrast_dev_10262011
Changes since 1.21: +6 -0 lines
Move inline code out of anno_server.cgi to ANNO.pm (well the code was already moved; remove
the inline invocations).
Add tests.

# 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.

PERL = $(shell sed -ne 's/^RTPERL=\(.*\)/\1/p' $(RTROOT)/config/RTConfig)

SEED_RUNNING_PERL = seed_running_perl.fragment

PERLCGISCRIPTS := $(subst .pl,,$(wildcard *.cgi))

	SeedComponents.pm \
	SeedComponents/Basic.pm \
	SeedComponents/Framework.pm \
	SeedComponents/Protein.pm \
	SeedComponents/PubMed.pm \
	WebApplicationComponents.pm \
	WebApplicationComponents/List.pm \
	WebApplicationComponents/Menu.pm \
	WebApplicationComponents/Table.pm \
	WebApplicationComponents/Table2.pm \
	WebApplicationComponents/Table3.pm \

INST_PERL_LIB = $(foreach var, $(PERL_LIB), $(libdir)/$(PKGNAME)/$(var))

TEST_FILES = $(wildcard tests/*.t)

all: lib

	@echo cgis $(foreach var, $(PERLCGISCRIPTS), $(cgidir)/$(var))
	@echo top $(TOPDIR)
	@echo pkg $(PKGNAME)
	@echo toolhdr $(TOOL_HDR)

lib:	$(foreach var, $(PERLCGISCRIPTS), $(cgidir)/$(var)) copy_htaccess $(INST_PERL_LIB) fix_web_perms

ifneq (,$(findstring public_html, $(cgidir)))
	chmod go-w $(cgidir)

htaccess_src = $(RTROOT)/config/all.htaccess
htaccess_dst = $(cgidir)/.htaccess

copy_htaccess: force
	if test -f $(htaccess_src); then \
		 cp $(htaccess_src) $(htaccess_dst) ; \



	$(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)


# Explicitly build the seed-ctl cgi so that it doesn't include the running check;
# need to be able to run the control panel when the seed is down.

$(cgidir)/seed_ctl.cgi: $(TOPDIR)/$(PKGNAME)/seed_ctl.cgi $(TOOL_HDR)
	( cat $(TOOL_HDR) $< > $@; chmod +x $@ )
$(cgidir)/ncbi.cgi: $(TOPDIR)/$(PKGNAME)/ncbi.cgi $(TOOL_HDR)
	( cat $(TOOL_HDR) $< > $@; chmod +x $@ )

	( cat $(TOOL_HDR) $(SEED_RUNNING_PERL) $< > $@; chmod +x $@ )
ifneq (,$(findstring public_html, $(cgidir)))
	chmod go-w $@

# 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.

#	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)/$(PKGNAME)/%.pm
	tgt_dir=`dirname $@`;  \
	if [ ! -d $$tgt_dir ] ; then \
		mkdir $$tgt_dir; \
	cp  $< $@

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3