head	1.11;
access;
symbols
	rel_1_1_0:1.10
	rel_1_0_1:1.9;
locks; strict;
comment	@# @;


1.11
date	2004.06.01.15.00.37;	author pynoos;	state Exp;
branches;
next	1.10;

1.10
date	2004.05.29.04.36.19;	author pynoos;	state Exp;
branches;
next	1.9;

1.9
date	2004.03.28.02.46.05;	author pynoos;	state Exp;
branches;
next	1.8;

1.8
date	2004.03.28.02.44.13;	author pynoos;	state Exp;
branches;
next	1.7;

1.7
date	2004.03.22.14.29.27;	author pynoos;	state Exp;
branches;
next	1.6;

1.6
date	2004.03.19.17.08.14;	author pynoos;	state Exp;
branches;
next	1.5;

1.5
date	2004.03.18.18.32.39;	author pynoos;	state Exp;
branches;
next	1.4;

1.4
date	2004.03.17.16.16.02;	author pynoos;	state Exp;
branches;
next	1.3;

1.3
date	2004.03.17.15.40.56;	author pynoos;	state Exp;
branches;
next	1.2;

1.2
date	2004.03.15.22.53.48;	author pynoos;	state Exp;
branches;
next	1.1;

1.1
date	2004.03.15.22.46.00;	author pynoos;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Bug fix
@
text
@####################################################################
# CVS Activity Notifying Tool
# Author     : Hojin Choi <pynoos@@users.kldp.net>
# $Id: Makefile,v 1.10 2004/05/29 04:36:19 pynoos Exp $
# Copyright (C) 2004 by Hojin Choi <pynoos@@users.kldp.net>
# You can redistribute this software under GPL.
####################################################################

PACKAGE=cvsnotify
VERSION=1.1.0
PACKAGE_STRING=$(PACKAGE)-$(VERSION)
UNINSTALL = cvsnotify-uninstall.sh
BARECVSROOT=`echo $$CVSROOT | awk -F: '{print $$NF}'`

FILES = \
	.indent.pro \
	cvsnotify-commitinfo.pl \
	cvsnotify-lang-en.tpl \
	cvsnotify-lang-ko.tpl \
	cvsnotify-loginfo.pl \
	cvsnotify.cf \
	cvsnotify.pm \
	cvsnotify-filenamechk.pl \
	cvsnotify-contentsend.pl \
	cvsnotify-doxygenchk.pl \
	cvsnotify-indent.pl \
	cvsnotify-logsend.pl \
	cvsnotify-lock.pl \
	$(UNINSTALL)

help:
	@@echo "make install		install cvsnotify to your cvs repository (local, remote)"
	@@echo "make uninstall		uninstall cvsnotify from your cvs repository"
	@@echo "make check		check system environment, run in server side!"
	@@echo ""
	@@echo "Current: CVSROOT=$(CVSROOT)"
	@@echo ""

.PHONY: help install clean-checkout save-revisions install-commit copy-files uninstall modify-infoes
install: clean-checkout save-revisions copy-files modify-infoes install-commit
	
clean-checkout:
	@@echo "work-$$CVSROOT" | tr -c '0-9a-zA-Z' '-' | sed -e 's/^-//' -e 's/--/-/g' -e 's/-$$//' > LASTCVSROOT
	@@echo ""
	@@if test -z "$(CVSROOT)"; then echo "Set your environment CVSROOT" && exit 1; fi
	@@if test -d `cat LASTCVSROOT`; then \
		echo "Cleaning working copy of `cat LASTCVSROOT`" && rm -rf `cat LASTCVSROOT` ; \
	fi
	@@echo "Check out CVSROOT from $(CVSROOT)"
	@@cvs -d$(CVSROOT) co -d `cat LASTCVSROOT` CVSROOT
	@@rm -f CVSROOT && ln -sf `cat LASTCVSROOT` CVSROOT
	@@rm -f LASTCVSROOT

save-revisions:
	@@echo ""
	@@echo "Make uninstall script.."
	-@@( cd CVSROOT; cvs status ) | grep "Repository" | grep $(BARECVSROOT) | grep -v "cvsnotify-" | sed -e "s:$(BARECVSROOT)/CVSROOT/::" -e "s:,v$$::" | awk '{print "cvs up -p -r", $$3, $$4, ">", $$4 }' > $(UNINSTALL)
	@@for file in $(FILES); do \
		files="`echo $$files` $$file"; \
	done; echo "cvs remove -f $$files" >> $(UNINSTALL)
	@@echo "cvs commit -m Removed" >> $(UNINSTALL)
	@@chmod +x $(UNINSTALL)

modify-infoes:
	@@echo "New checkout list..."
	@@echo "#cvsnotify checkout list" > checkoutlist
	@@echo 	".indent.pro			.indent.pro checkout failure" >> checkoutlist
	@@echo 	"cvsnotify.pm			cvsnotify.pm checkout failure" >> checkoutlist
	@@echo 	"cvsnotify.cf			cvsnotify.cf checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-lang-ko.tpl		cvsnotify-lang-ko.tpl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-lang-en.tpl		cvsnotify-lang-en.tpl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-commitinfo.pl	cvsnotify-commitinfo.pl	checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-loginfo.pl		cvsnotify-loginfo.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-filenamechk.pl		cvsnotify-indent.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-indent.pl		cvsnotify-indent.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-doxygenchk.pl	cvsnotify-doxygenchk.pl	checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-logsend.pl		cvsnotify-logsend.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-contentsend.pl	cvsnotify-contentsend.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-lock.pl		cvsnotify-lock.pl checkout failure" >> checkoutlist
	@@echo 	"cvsnotify-name.pl		cvsnotify-name.pl checkout failure" >> checkoutlist

	@@echo "New commitinfo..."
	@@echo "CVSROOT echo Skip cvsnotify-checking.. " > commitinfo
	@@echo "DEFAULT \$$CVSROOT/CVSROOT/cvsnotify-commitinfo.pl" >> commitinfo
	@@echo "New loginfo..."
	@@echo "CVSROOT echo Skip cvsnotify-checking.. $$s" > loginfo
	@@echo "DEFAULT \$$CVSROOT/CVSROOT/cvsnotify-loginfo.pl %{sVv}" >> loginfo

copy-files:
	@@echo ""
	@@echo "Copy cvsnotify files..."
	@@if test ! -f $(UNINSTALL); then \
		touch $(UNINSTALL); \
		chmod +x $(UNINSTALL); \
	fi
	@@for file in $(FILES) ; do \
		if test -f CVSROOT/$$file; then \
			cp $$file CVSROOT/ ; \
			echo "updating.. $$file" ; \
		else \
			cp $$file CVSROOT/ ; \
			echo "adding....  $$file" ; \
			files="`echo $$files` $$file"; \
		fi ; \
	done; cd CVSROOT; cvs add $$files 2>/dev/null
	@@for file in checkoutlist commitinfo loginfo; do \
		if test -f $$file; then \
			echo "updating.. $$file" ; \
			cp -p $$file CVSROOT/; \
		else \
			echo "oops.. $$file" ; \
		fi; \
	done

install-commit:
	@@cd CVSROOT; cvs commit -m "Installed"
	@@echo "Installed successfully..."
	@@echo "You must change cvsnotify.cf in CVSROOT directory in current directory"
	@@echo "especially, maildomain = {YOUR_MAIL_DOMAIN}, cvsurl = {YOUR_VIEWCVS_URL} should be replaced."
	@@echo "After modifying, you must commit via 'cvs commit' command"
	@@echo ""
	@@echo "Thank you for using!"

uninstall: clean-checkout
	@@if test -x CVSROOT/$(UNINSTALL); then \
		cd CVSROOT; ./$(UNINSTALL) ; \
	else \
		echo "There is no uninstall script: $(UNINSTALL)" ; \
	fi

dist:
	-@@rm -rf $(PACKAGE_STRING) $(PACKAGE_STRING).tar.gz
	@@mkdir $(PACKAGE_STRING)
	@@for file in History README.ko COPYING Makefile $(FILES); do \
		if test "cvsnotify.cf" = "$$file"; then \
			cp -p cvsnotify.cf.sample $(PACKAGE_STRING)/cvsnotify.cf ; \
			continue; \
		fi; \
		if test "cvsnotify-uninstall.sh" = "$$file"; then \
			continue; \
		fi; \
		echo "Copying.. $$file"; \
		cp -p $$file $(PACKAGE_STRING) ; \
	done
	tar cf - $(PACKAGE_STRING) | gzip > $(PACKAGE_STRING).tar.gz

clean:
	-test -L CVSROOT && test -d CVSROOT && cd CVSROOT && rm -rf `pwd -P`
	-rm -rf CVSROOT
@


1.10
log
@Release 1.1.0
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.9 2004/03/28 02:46:05 pynoos Exp $
d79 2
@


1.9
log
@Add history
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.8 2004/03/28 02:44:13 pynoos Exp $
d10 1
a10 1
VERSION=1.0.1
d28 1
@


1.8
log
@Add history
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.7 2004/03/22 14:29:27 pynoos Exp $
d131 1
a131 1
	@@for file in README.ko COPYING Makefile $(FILES); do \
@


1.7
log
@Remove
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.6 2004/03/19 17:08:14 pynoos Exp $
d10 1
a10 1
VERSION=1.0.0
@


1.6
log
@Added
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.5 2004/03/18 18:32:39 pynoos Exp $
d34 3
@


1.5
log
@Added message
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.4 2004/03/17 16:16:02 pynoos Exp $
d70 1
d77 1
a77 1
	@@echo "CVSROOT echo Skip.. " > commitinfo
d80 1
a80 1
	@@echo "CVSROOT echo Skip.. $$s" > loginfo
@


1.4
log
@Added message
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.3 2004/03/17 15:40:56 pynoos Exp $
d23 1
@


1.3
log
@Added distribute script
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.2 2004/03/15 22:53:48 pynoos Exp $
d52 1
a52 1
	-@@( cd CVSROOT; cvs status ) | grep "Repository" | grep $(BARECVSROOT) | grep -v cvsnotify | sed -e "s:$(BARECVSROOT)/CVSROOT/::" -e "s:,v$$::" | awk '{print "cvs up -p -r", $$3, $$4, ">", $$4 }' > $(UNINSTALL)
@


1.2
log
@Add message
@
text
@d4 1
a4 1
# $Id: Makefile,v 1.1 2004/03/15 22:46:00 pynoos Exp $
d9 3
a11 1
VERSION=1.0
d124 3
a126 4
	@@for file in $(FILES) ; do \
		if test ".indent.pro" = "$$file"; then \
			continue; \
		fi; \
d128 1
d135 1
a135 1
		cp -p /home/pynoos/work/CVSROOT/$$file ./ ; \
d137 1
a137 3
	rm -rf CVSROOT checkoutlist loginfo commitinfo
	rm -f ../cvsnotify-$(VERSION).tar.gz
	cd ../; tar cvf - cvsnotify-$(VERSION) | gzip > cvsnotify-$(VERSION).tar.gz
@


1.1
log
@First
@
text
@d4 1
a4 1
# $Id:$
d108 5
@

