On 07/25/2012 03:40 PM, Eric Blake wrote: > On 07/24/2012 10:32 PM, James Smith wrote: >> Hello, >> >> I've found two spots where DESTDIR support is omitted. I tried to track >> down where the problem is in the autoconf source without success, so I >> present to you a diff on git OpenVPN's Makefile.in (see attached). I >> *think* the bug is in lib/autoconf/programs.m4 from my grepping but I >> really am not sure. > > Thanks for the report, however, you are blaming the wrong culprit. > >> --- openvpn/Makefile.in 2012-07-25 12:13:24.000000000 +1000 >> +++ openvpn/Makefile.in.new 2012-07-25 12:32:06.000000000 +1000 >> @@ -430,8 +430,8 @@ >> -rm -f libtool config.lt >> install-dist_docDATA: $(dist_doc_DATA) >> @$(NORMAL_INSTALL) >> - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" >> - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ >> + test -z "$(DESTDIR)$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" >> + @list='$(dist_doc_DATA)'; test -n "$(DESTDIR)$(docdir)" || list=; \ >> for p in $$list; do \ >> if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ >> echo "$$d$$p"; \ > > Autoconf does not create 'Makefile.in'; it only converts it into > 'Makefile'. If openVPN is using Automake, then either the bug exists in > automake or in the openVPN 'Makefile.am' file; > The above is indeed generated by automake, but it is perfectly correct. We don't want to install anything in $(docdir) it that expands to the empty string; that holds even if $(DESTDIR) is non-empty. So a 'test -z "$(DESTDIR)$(docdir)"' would be incorrect.
Regards, Stefano