On 11 July 2015 at 06:38, Harlan Stenn <st...@ntp.org> wrote: > I'm thinking I want to run a hook before the distdir target is run. > > What's a good way to do that? > > The reason for this is that I'm packaging at least 2 nested packages in > my distribution. We only want to configure these if we need them. The > "problem" is that folks who don't need either/both of these packages > don't want to spend the time configuring them, but in that case they > cannot run "make dist" either. To produce a distribution, one must > generally configure these sub-packages so the dist target(s) can see > these packages. > > So I figure a good answer is to have a pre-dist hook of some sort, so if > somebody wants to run 'dist' I can make sure that the needed > sub-packages have been built.
Could you do some trick with EXTRA_DIST? You could have a file that only exists when the nested packages are configured that has to be distributed.