## Process this file with automake to produce Makefile.in
## $Id: Makefile.am 1.9.1.28 Fri, 26 Apr 2002 08:06:23 -0700 jmacd $

SUBDIRS = src doc contrib emacs m4 be

EXTRA_DIST = \
	prcs.prj \
	FAQ \
	TODO \
	INSTALL \
	README.BE \
	config-be \
	prcs-1.3gcc3.diffs

#if GCC3PATCH
#PATCHFILE = prcs-1.3gcc3.diffs
#BUILT_SOURCES = patch-stamp
#patch-stamp:
#	patch -p1 < ${PATCHFILE} && touch patch-stamp
#clean-local:
#	if test -f patch-stamp; then patch -p1 --reverse < ${PATCHFILE} && rm -f patch-stamp; fi
#endif

## This doesn't work with gmake -j, but I can't figure it out.
all-local:
	@if src/prcs config -f; then :; else \
	  echo ""; \
	  echo "* Warning: prcs config reports a configuration error, probably"; \
	  echo "* indicating that one of the programs prcs uses is the wrong"; \
	  echo "* version.  You may set the RCS_PATH environment variable to"; \
	  echo "* correct this problem."; \
	  echo ""; \
	fi

bindist: all
	strip src/prcs
	tar -cf - INSTALL NEWS README TODO FAQ -C src prcs | \
	  gzip > prcs-@VERSION@-`uname`.tar.gz

## I think this is a neat use of execute.  It shows one reason to make
## prcs operations on project D/P work as if files had D prepended instead
## of changing into D and using the same filenames.

develdist:
	@rm -rf prcs-@VERSION@
	@ln -s . prcs-@VERSION@
	@rm -rf prcs-@VERSION@-devel.tar.gz
	@rm -rf prcs-@VERSION@-devel.tar
	tar -cf prcs-@VERSION@-devel.tar `prcs execute -f --not :.*directory prcs-@VERSION@`
	gzip prcs-@VERSION@-devel.tar
	@rm -rf prcs-@VERSION@

acinclude.m4: m4/jmmmap.m4 m4/prcsbuild.m4 m4/prcsenv.m4 doc/prcs.texi doc/make-docs.el
	(cd m4; $(MAKE) m4)


syntax highlighted by Code2HTML, v. 0.9.1