[libvirt] [PATCH 4/4] examples: Install under $(docdir)

Andrea Bolognani abologna at redhat.com
Mon May 13 12:04:59 UTC 2019


On Mon, 2019-05-13 at 12:03 +0100, Daniel P. Berrangé wrote:
> On Fri, May 10, 2019 at 08:51:20PM +0200, Andrea Bolognani wrote:
> >  install-data-local: $(INSTALL_DATA_LOCAL)
> > +	$(mkinstalldirs) $(DESTDIR)$(examplesdir)
> > +	for p in $(noinst_PROGRAMS); do \
> > +		d=$$(dirname $$p); \
> > +		$(mkinstalldirs) $(DESTDIR)$(examplesdir)/$$d; \
> > +		$(INSTALL_DATA) $(srcdir)/$${p}.c $(DESTDIR)$(examplesdir)/$$d/; \
> > +	done
> >  
> >  uninstall-local: $(UNINSTALL_LOCAL)
> > +	for p in $(noinst_PROGRAMS); do \
> > +		rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \
> > +	done
> 
> This breaks Windows builds, because the program names includes '.exe'
> suffix. Instead of copying/deleting  example.c, we try to copy/delete
> example.exe.c

I guess automake is changing $(noinst_PROGRAMS) behind our back,
since the code above would work otherwise. Pretty gross, but that's
the kind of nasty meddling you have to accept if you want portability
to work (mostly) out of the box (almost) all of the time, I suppose.

Anyway, thanks for bringing this to my attention. I'll take care of
it momentarily, and test it on MinGW before posting this time ;)

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list