[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automake and intermediate files generated by yacc, lex, valac

On Tue, 29 Dec 2009, Ansgar Burchardt wrote:
> there are several tools that generate C source code that is later
> complied in object code, e.g. yacc, lex or valac.  automake defaults to
> distribute these built intermediate files, so they are usually not
> regenerated during a build.


> 1. What is Debian's policy about this,

You have to rebuilt the entire stack from source, and the debian/rules
"clean" target is your friend if the upstream build system doesn't help you.

It is normal to have these intermetidate files in the tarball to ease the
life of the 'download source and build' user, and the distros are used to
dealing with it.

> 2. How to stop automake from including intermediate files,

Sorry, I don't have the canned reply, but you can tweak what automake things
should go into the dist target, and use make distclean and make dist.

> 3. How to make sure the intermediate files are regenerated during the
> build.  Is there a nicer way than removing them?

Frankly, the easiest and least error-prone solution is to have custom clean
rules that nuke these autogenerated files, and use the usual makefile
machinery to make sure they get rebuilt when missing.

> Note: I did send this mail to debian-mentors@l.d.o [1] some time ago,
> but did not get any reply.  Also I think the topic might be of interest
> to others as well.

You might get even better help from the autotools mailinglists, since none
of your questions are really Debian-sepecific.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: