# @(#)$Mu: tools/GNUmakefile,v 1.33 $

##
## GNmakefile
##	GNU Makefile for the mu's makefile build tools.
##
## Copyright (C) 1996  Eric A. Howe
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program 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.
##
##   Authors:	Matthew D. Francey
##		Eric A. Howe (mu@trends.net)
##

##
## This Makefile requires GNU Make
##

##
## get the system dependent definitions
##
include	../make/top.mk
include ../make/sys.mk

generated = yanksect mkresm4 sgmlpp adpp p4 txt2swh mkstrdefs txt2man
all:: $(generated)

##
## and a couple little pattern rules
##
%: %.pl
	sed 's;@@PERL@@;$(perl);' < $< > $@ \
		&& chmod u+rx $@ \
		|| (rm -f $@; exit 1)

%: %.m4
	sed 's;@@M4@@;$(m4);' < $< > $@ \
		&& chmod u+rx $@ \
		|| (rm -f $@; exit 1)

rclean += $(generated)

##
## get the rules so we can do something
##
include ../make/rules.mk
