Hello, On Tue, Mar 28, 2006 at 12:16:18PM +0200, Michael Biebl meant to write: > EXTRA_DIST = ngcs_marshal.ngci idef.py ngcs.py > CLEANFILES = ngcs_marshal.h ngcs_marshal.c > > ngcs_marshal.c: ngcs_marshal.ngci idef.py > $(srcdir)/idef.py $(srcdir)/ngcs_marshal $@ > > ngcs_marshal.h: ngcs_marshal.ngci idef.py > $(srcdir)/idef.py $(srcdir)/ngcs_marshal $@
yes, this is a good solution. One question, though? Does `idef.py ... *.c' produce both files, or only the .c one? If it produces only one of the files, the makefile is correct. If it produces both of them, it may not work with parallel make. (See http://sourceware.org/automake/automake.html#Multiple-Outputs .) Alternatively, you might make use of the Automake's ability to use new extensions, something like: EXTRA_DIST = idef.py ngcs.py foobar_SOURCES = ngcs_marshal.ngci \ this.c \ that.c ... .ngci.c: $(srcdir)/idef.py $< $@ .ngci.h: $(srcdir)/idef.py $< $@ If the Python script produces both output files, the latter rule should be something like: ngcs_marshal.h: ngcs_marshal.c @if test -f $@; then :; else \ rm -f data.c; \ $(MAKE) $(AM_MAKEFLAGS) data.c; \ fi Have a nice day, Stepan