Hi Michael, * Michael Biebl wrote on Tue, Mar 28, 2006 at 12:16:18PM CEST: > This is the solution I came up with: > > 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 @
Do you mean `$@' instead of `@' here? If not: what is the `@' supposed to do? > ngcs_marshal.h: ngcs_marshal.ngci idef.py > $(srcdir)/idef.py $(srcdir)/ngcs_marshal @ > > This way idef.py and ngcs_marshal.ngci are not copied to the builddir > and whenever they change one of them in the srcdir the header and c file > are regenerated. > I don't need srcdir in the dependency line, but if I omit them in the > build rule I either get: [errors] Well, yes, you do need it in the rule. Were they inference rules, could you use `$<', but in an explicit rule like above that is not portable. > I also had to change idef.py to take an additional parameter (@) where I > can tell the location of the output file. Otherwise the file is created > in the srcdir. I wanted to avoid changing idef.py first (that's why the > copying) but it seemed not to be possible. That's definitely the better way. Cheers, Ralf