Source

patcher / Makefile

### Makefile --- toplevel makefile for Patcher

## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007 Didier Verna.

## Author:        Didier Verna <didier@xemacs.org>
## Maintainer:    Didier Verna <didier@xemacs.org>
## Created:       Wed Mar  1 13:23:24 2000
## Last Revision: Wed May  2 10:43:09 2007

## This file is part of Patcher.

## Patcher is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License version 2,
## as published by the Free Software Foundation.

## Patcher is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


### Commentary:

## Contents management by FCM version 0.1-b2.

## #### WARNING: please use GNU make with this makefile


### TODO:


### Change Log:


### Code:

# You probably don't want to edit this file, but Makefile.defs instead ...
include Makefile.defs

DIST_FILES := NEWS INSTALL COPYING Makefile.defs Makefile
SUBDIRS    := lisp doc

VERSION    := 3.9


all:
	$(MAKE) gen TARGET=all

gen:
	@for i in $(SUBDIRS) ; do                 \
	   echo "making $(TARGET) in $${i} ..." ; \
	   ( cd $${i} && $(MAKE) $(TARGET) ) ;    \
	 done

dist:
	mkdir patcher-$(VERSION)
	cp $(DIST_FILES) patcher-$(VERSION)/
	$(MAKE) gen TARGET=sub-dist VERSION=$(VERSION)
	$(TAR) cvf patcher-$(VERSION).tar patcher-$(VERSION)
	$(GZIP) -c patcher-$(VERSION).tar > patcher-$(VERSION).tar.gz
	$(BZIP) -c patcher-$(VERSION).tar > patcher-$(VERSION).tar.bz2
	rm -fr patcher-$(VERSION) patcher-$(VERSION).tar

install-www: dist
	install -m 644 NEWS $(WWW_DIR)/patcher-news.txt
	echo "$(VERSION)" > $(WWW_DIR)/patcher-version.txt
	chmod 644 $(WWW_DIR)/patcher-version.txt
	install -m 644 patcher-$(VERSION).tar.gz $(WWW_DIR)/patcher.tar.gz
	install -m 644 patcher-$(VERSION).tar.bz2 $(WWW_DIR)/patcher.tar.bz2
	cd doc && $(MAKE) install-www

uninstall-www:
	-rm $(WWW_DIR)/patcher-version.txt
	-rm $(WWW_DIR)/patcher-news.txt
	-rm $(WWW_DIR)/patcher.tar.gz
	-rm $(WWW_DIR)/patcher.tar.bz2
	cd doc && $(MAKE) uninstall-www


# [un]install-pkg install-cvs-pkg install-www clean dist-clean
.DEFAULT:
	$(MAKE) gen TARGET=$@

.PHONY: all gen dist install-www uninstall-www checkin

### Makefile ends here