automake
[Top][All Lists]
Advanced

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

RE: make distclean fails for conditional nested package with VPATH build


From: Daily, Jeff A
Subject: RE: make distclean fails for conditional nested package with VPATH build
Date: Mon, 29 Nov 2010 14:42:51 -0800

> -----Original Message-----
> From: Ralf Wildenhues [mailto:address@hidden
> Sent: Monday, November 29, 2010 2:33 PM
> To: Daily, Jeff A
> Cc: address@hidden
> Subject: Re: make distclean fails for conditional nested package with VPATH
> build
> 
> Hello Jeff,
> 
> * Daily, Jeff A wrote on Mon, Nov 29, 2010 at 11:04:04PM CET:
> > I had a user point out that "make distclean" from within their VPATH
> > build failed due to a missing, optional nested package.  The nested
> > package is called "tascel".  I have in configure.ac:
> >
> > AC_ARG_ENABLE([tascel], [omit for brevity], [], [enable_tascel=no])
> > AM_CONDITIONAL([ENABLE_TASCEL], [test "x$enable_tascel" = xyes])
> > ...
> > AS_IF([test "x$enable_tascel" = xyes], [AC_CONFIG_SUBDIRS([tascel])])
> >
> > Then in Makefile.am:
> >
> > SUBDIRS = armci .
> > If ENABLE_TASCEL
> > SUBDIRS += tascel
> > endif
> >
> > I'm sure the Makefile is correct because we want to distributed tascel
> > whether or not it's been configured.
> > SUBDIRS = armci .
> > DIST_SUBDIRS = armci . tascel
> 
> Wait, but how can you distribute it if it hasn't been configured?
> make dist will surely fail then, no?

For starters, I don't know why one of my users wants to make distclean instead 
of one of the other clean targets.  You're right that the nested project has 
not been configured, so there's no way to "make dist" or "make distclean".  But 
if this weren't a VPATH build, the "tascel" subdirectory would exist and then 
"make distclean" would move on.

OTOH, won't "make distcheck" will fail since this nested project is not 
configured by default?

> > Do I tell this user "don't do that" or did I do something wrong?

I'm leaning towards telling my user "don't do that" and point them towards 
"make clean" or "make mostlyclean".

> Does it work to set
>   DIST_SUBDIRS = $(SUBDIRS)
> 
> in Makefile.am?  Am I missing something (it's late here ...)

This is a strange case.  I don't think you're missing anything.  Any target 
having to do with distribution is adversely affected if you don't configure all 
nested projects.

> Thanks,
> Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]