#
# This test case succeeds with GNU make 3.76.1
# (the file foo.gencat is generated)
# and fails with 3.77 - 3.80
# (*** No rule to make target `foo.gencat', needed by `all'.  Stop.)
#

SRCDIR=..

.SUFFIXES:
.SUFFIXES: .c .h .gencat

all: foo.h foo.gencat
	echo "Done."

vpath %.c   $(SRCDIR)
vpath %.msg $(SRCDIR)

-include bar.d

# .d files are normally created by gcc -MM, which generates full paths for
# dependencies. Hence the `pwd` below.
%.d: %.c foo.h
	echo $< ": " `pwd`/foo.h > $@

%.gencat: %.msg
	touch $@

%.h: %.msg
	touch $@

clean:
	rm -f *.d foo.h foo.gencat
