Ralf Wildenhues wrote: > Hi Michael, Tom, Hi,
thanks for you help so far. > * tom fogal wrote on Mon, Mar 27, 2006 at 10:38:27PM CEST: >> <[EMAIL PROTECTED]>Michael Biebl writes: >> <snip> >>> ngcs_marshal.c: ngcs_marshal.ngci idef.py >>> $(srcdir)/idef.py ngcs_marshal >>> >>> ngcs_marshal.h: ngcs_marshal.ngci idef.py >>> $(srcdir)/idef.py ngcs_marshal >> Not sure if it will work, but perhaps you could just use the .ngci file >> without copying it? > > Yes, that was my thinking as well. Copying is a bad idea, if that file > ends up in the distribution tarball some make implementations will > behave "interestingly" and subtly different when both source and build > tree have different versions of this (described in the Autoconf manual). 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 @ 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: make: idef.py: Command not found or IOError: [Errno 2] No such file or directory: 'ngcs_marshal.ngci' 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. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature