-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/08/16 03:14, Selva Nair wrote: > > > On Thu, Aug 11, 2016 at 2:50 PM, David Sommerseth > <[email protected] > <mailto:[email protected]>> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > > Hi, > > I noticed a few errors today when building OpenVPN on Fedora 23. > The attached patch resolves this. But it breaks 'make' when it > reaches ./src/openvpnserv: > > > The patch is obviously useless as it breaks configuring. > > > > Makefile:505: ../../src/openvpn/.deps/openvpnserv-block_dns.Po: No > such file or directory > > > It is indeed caused by a bug in automake (bug#13928) because of > which variables in foo_SOURCES do not get expanded when > subdir-objects is specfied. Thus $(top_srcdir) in > $(top_srcdir)/src/openvpn/block_dns.c, for example, causes a > folder literally named $(top_srcdir) created inside > src/openvpnserv/. But make wont find any files there and leads to > the missing file issues.
Just thinking a bit around this and avoiding code duplication. This might be a bit more hackish alternative, but bear with me :) If the Makefile.am in src/openvpnsrv has a build-target for the block_dns.c file which would just copy the source file to the openvpnserv/ directory ... would that work? Rough (not really tested) example is attached. - -- kind regards, David Sommerseth OpenVPN Technologies, Inc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAletpUcACgkQDC186MBRfrrUjACcCfCMTD3Xp8LlFRiLhaBGjVU1 PtMAoI2VL2nBzYzk5krtIQQ38Q3dZSqC =hk2k -----END PGP SIGNATURE-----
diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am
index 3c757d6..04a0dd4 100644
--- a/src/openvpnserv/Makefile.am
+++ b/src/openvpnserv/Makefile.am
@@ -29,11 +29,20 @@ openvpnserv_CFLAGS = \
openvpnserv_LDADD = -ladvapi32 -luserenv -liphlpapi -lfwpuclnt -lrpcrt4 -lshlwapi -lnetapi32 -lws2_32
endif
+CLEANFILES = block_dns.c block_dns.h
+.PHONY = block_dns.c block_dns.h
+BUILT_SOURCES = block_dns.c block_dns.h
+
+block_dns.c :
+ cp $(top_srcdir)/src/openvpn/block_dns.c .
+
+block_dns.h :
+ cp $(top_srcdir)/src/openvpn/block_dns.h .
+
openvpnserv_SOURCES = \
common.c \
automatic.c \
interactive.c \
service.c service.h \
validate.c validate.h \
- $(top_srcdir)/src/openvpn/block_dns.c $(top_srcdir)/src/openvpn/block_dns.h \
openvpnserv_resources.rc
openserv-build-hack.patch.sig
Description: PGP signature
