On Tue, Sep 24, 2013 at 02:31:16PM +0200, Thomas Thrainer wrote:
> Couldn't this have been fixed by adding src/mon-collector.hs to
> HS_GENERATED_FILES?

I'm not really seeing how this is possible, given that
'HS_GENERATED_FILES' contains binaries and 'src/mon-collector.hs' is a
source file. Maybe I'm missing something here...

> The filtering and readding feels strange somehow... It might be better to
> define HS_GENERATED_SRCS and add this list to HS_GENERATED_FILES (which
> does not contain src/mon-collector.hs anyway ATM, but should probably) and
> to HS_PROGS_SRCS, so we have a more general approach to generated Haskell
> files?

The filtering and adding is a way of saying that the file must always
be present.  It is not the case that 'HS_ALL_PROGS' will always
contain 'src/mon-collector'.

'HS_GENERATED_FILES' does not seem to be that important because it is
just used to build the bash completion, as far as I can tell.

The important variables are 'HS_ALL_PROGS', which is the target for
Haskell binaries, and 'HS_PROGS', which is used to build
'HS_ALL_PROGS' and is used also in 'live-test', although I am not
familiar with this target.

I'm not really sure what the best approach is...

> 
> 
> On Tue, Sep 24, 2013 at 1:11 PM, Jose A. Lopes <[email protected]> wrote:
> 
> > This patch fixes 'Makefile.am' to include the source file of
> > 'mon-collector' in the distribution tarball even if the monitoring
> > daemon has been disabled at configure time.  Fixes issue 587.
> >
> > Signed-off-by: Jose A. Lopes <[email protected]>
> > ---
> >  Makefile.am | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 609d956..33623cb 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -588,7 +588,16 @@ HS_ALL_PROGS = \
> >         test/hs/htest \
> >         $(HS_COMPILE_PROGS)
> >
> > -HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS)) src/hs2py-constants.hs
> > +# The program 'mon-collector' might be included in 'HS_ALL_PROGS'
> > +# (through 'HS_PROGS') depending on 'configure' variables.  However,
> > +# its source file must always be included in the distribution. Given
> > +# that the source files are computed by the following variable, we
> > +# need to make sure that 'src/mon-collector.hs' is always included by
> > +# filtering out the binary and adding the source manually
> > +HS_PROG_SRCS = $(patsubst %,%.hs, \
> > +              $(filter-out src/mon-collector,$(HS_ALL_PROGS))) \
> > +              src/mon-collector.hs \
> > +              src/hs2py-constants.hs
> >  HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/hs/%) test/hs/hail
> >
> >  HFLAGS = \
> > --
> > 1.8.4
> >
> >

Thanks,
Jose

> 
> 
> -- 
> Thomas Thrainer | Software Engineer | [email protected] |
> 
> Google Germany GmbH
> Dienerstr. 12
> 80331 München
> 
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschäftsführer: Graham Law, Christine Elizabeth Flores

-- 
Jose Antonio Lopes
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to