############################### ## JCRWeb Makefile ## ####$########################## # $Id: makefile,v 1.41 2006/09/12 19:41:22 pfoley Exp $ # $Name: JCR_4_5_BETA_5 $ # PATH TO PERL ############## PERL=/prod3/work/JCR/perl/bin/perl ############## # DIRECTORIES ############## # Desired name of JCR Directory JCR=JCR # Desired name of the JCR Log Directory LOGS=logs # Desired name of the JCR Cache Directory CACHE=cache # Absolute location of the CDM shared/ Directory SHARED=/prod/products/QA/integration/wok3_admin/current/shared # Absolute location of the CDM lib/ Directory LIB=/prod/products/QA/integration/wok3_admin/current/lib ############## # MISC VARS ############## VERSION=HEAD PREFIX=$(VERSION) DISTRIBUTION=$(VERSION) ############## # CVS TAG of Common Components to pull ############## # Common tag for shared components that WE tag SHAREVER=JCR_3_0_DEVEL_HEAD # LinkOut.cgi Version tag LOVER=HEAD # LinkBack.cgi Version tag LBVER=HEAD ############## # Use the VERSION macro by saying (if omitted HEAD will be used): # # [root@newdevel] make VERSION="JCR_3_0_ALPHA_1" # # Use the TAGOPT macro to tag by saying: # # [root@newdevel] make tag TAGOPT="JCR_3_0_ALPHA_2" all: shared unstick log_end distribution: shared package log_end wki_distribution: wki_shared wki_package log_end shared: log_start clean dirs co_jcr wki_shared: log_start clean dirs co_jcr log_start: @echo "[`date`] *** Start of Build ***" ; \ echo "Building Version:" $(VERSION) "of JCRWeb." log_end: @echo "Completing Build for Version:" $(VERSION) "of JCRWeb." ; \ echo "[`date`] *** End of Build ***" # If no tag is given, we check out HEAD - which does make a sticky tag. So we have to remove # that from the JCR code! unstick: if [ $(VERSION) = 'HEAD' ]; then \ cd $(PREFIX) ; \ cvs update -A ; \ cd ../ ; \ mv $(PREFIX) JCR ; \ fi dirs: umask 002 ; \ mkdir $(PREFIX) $(PREFIX)/JCR $(PREFIX)/JCR/$(CACHE) $(PREFIX)/JCR/$(CACHE)/sessions $(PREFIX)/JCR/$(CACHE)/journals $(PREFIX)/JCR/$(LOGS) co_jcr: cd $(PREFIX) ; \ cvs co -r $(VERSION) -d JCR products/JCRWeb ; \ cd ../ configure: echo "Configuring Version:" $(VERSION) "of JCRWeb." ; \ if [ $(VERSION) = 'HEAD' ]; then \ make do_configure VERSION="JCR" ; \ else \ make do_configure VERSION="$(VERSION)" ; \ fi ; \ echo "Configure Complete." do_configure: cd .. ; \ ln -s $(SHARED) shared ; \ ln -s $(LIB) lib ; \ cd JCR ; \ cd bin ; \ ln -s $(PERL) perl ; \ ln -s ../JCR_CF.pm JCR_CF.pm ; \ cd ../ ; \ mkdir $(LOGS) ; \ chmod 770 $(LOGS) ; \ ln -s $(SHARED)/common.js common.js package: cleancvs # Package everything tar -cvf $(DISTRIBUTION).tar $(PREFIX) ; \ gzip $(DISTRIBUTION).tar ; \ rm -rf $(PREFIX) wki_package: cleancvs cd $(PREFIX); \ tar -cvf WKI_jcr_$(DISTRIBUTION).tar *;\ gzip WKI_jcr_$(DISTRIBUTION).tar; \ cp WKI_jcr_$(DISTRIBUTION).tar.gz ../. ; \ cd ..; \ rm -rf $(PREFIX) tag: if [ $(VERSION) = 'HEAD' ]; then \ make do_tag VERSION="JCR" TAGOPT=$(TAGOPT) ; \ else \ make do_tag VERSION="$(VERSION)" TAGOPT=$(TAGOPT) ; \ fi do_tag: cd $(VERSION)/JCR ; \ cvs tag $(TAGOPT) *.pm makefile *.css; \ cd templates ; \ cvs tag $(TAGOPT) ; \ cd ../bin ; \ cvs tag $(TAGOPT) ; \ cd ../db ; \ cvs tag $(TAGOPT) ; \ cd ../docs ; \ cvs tag $(TAGOPT) ; \ cd ../help ; \ cvs tag $(TAGOPT); \ cd ../images ; \ cvs tag $(TAGOPT); \ cd ../utils ; \ cvs tag $(TAGOPT); \ cd ../wki ; \ cvs tag $(TAGOPT); \ cd ../ branchtag: # Paths are relative from $(PREFIX); this should be executed from the main directory. cvs rtag -r $(BRANCH) $(TAGOPT) cleancvs: # For packaging before production release. cd $(VERSION) ; \ rm -rf `find . -name CVS` clean: rm -rf $(PREFIX)