On Tue, Sep 24, 2013 at 2:44 PM, Jose A. Lopes <[email protected]> wrote:
> 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... > HS_GENERATED_FILES is only used as dependency for the bash_completion target. I don't see why a source file wouldn't be allowed as such a dependency... And it's named ..._FILES, not ..._PROGS or ..._BINARIES, so even the name doesn't prevent a source file from being listed in there, right? > > > 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'. > My point is just that this functionality is a bit hidden in this filtering/readding step. Having a huge comment explaining what is going on helps, but just proves that it needs explanation ;-). Adding a HS_GENERATED_SRCS variable which always contains src/mon-collector.hs (and the other file) is just more verbose, IMHO. And adding HS_GENERATED_SRCS then to HS_PROG_SRCS makes somehow sense... BTW, would it be a problem to have src/mon-collector.hs twice in HS_PROG_SRCS? If not, then it boils down to skip the filtering and extract the two added files to a new, aptly named, variable. > > '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 > -- 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
