Package: ocserv / 0.11.6-2

allow-parallel-build-of-autogen-files.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Description: use stamp files to allow parallel build of autogen files
 Autogen seems to output on the creates files gradually, something that
 makes 'make' believe that the command is complete prior to the output
 file being fully populated. The current approach uses stamp files to
 ensure that no incomplete files are used for compilation.
Author: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Origin: upstream, https://gitlab.com/ocserv/ocserv/commit/7fea131d006e11584566fb8233a87a71b8a4ca9f
Bug: https://gitlab.com/ocserv/ocserv/issues/74
Bug-Debian: https://bugs.debian.org/844882
Reviewed-by: Mike Miller <mtmiller@debian.org>
Last-Update: 2016-12-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,7 @@ bin_SCRIPTS = ocserv-fw
 noinst_LIBRARIES = libcmd-ocserv.a libipc.a
 libcmd_ocserv_a_SOURCES = ocserv-args.def ocserv-args.c ocserv-args.h
 
-ocserv-args.c: $(srcdir)/ocserv-args.def $(builddir)/version.inc
+ocserv-args.stamp: $(srcdir)/ocserv-args.def $(builddir)/version.inc
 	if test "$(AUTOGEN)" = ":";then \
 		rm -f $(builddir)/ocserv-args.c; \
 		rm -f $(builddir)/ocserv-args.h; \
@@ -35,7 +35,9 @@ ocserv-args.c: $(srcdir)/ocserv-args.def
 			cp $(builddir)/ocserv-args.h $(srcdir)/autogen; \
 		fi; \
 	fi
-ocserv-args.h: ocserv-args.c
+	touch $@
+ocserv-args.h: ocserv-args.stamp
+ocserv-args.c: ocserv-args.stamp
 
 # Authentication module sources
 AUTH_SOURCES=auth/pam.c auth/pam.h auth/plain.c auth/plain.h auth/radius.c auth/radius.h \
@@ -127,3 +129,6 @@ common/libcommon.a:
 	cd common && $(MAKE) $(AM_MAKEFLAGS) libcommon.a
 
 .PHONY: ccan/libccan.a common/libcommon.a
+
+clean-local:
+	rm -f *.stamp
--- a/src/ocpasswd/Makefile.am
+++ b/src/ocpasswd/Makefile.am
@@ -20,7 +20,7 @@ ocpasswd_LDADD = ../../gl/libgnu.a $(NEE
 ocpasswd_LDADD += $(LIBGNUTLS_LIBS) $(LIBCRYPT) $(CODE_COVERAGE_LDFLAGS) \
 	$(LIBNETTLE_LIBS)
 
-args.c: $(srcdir)/args.def $(builddir)/../version.inc
+args.stamp: $(srcdir)/args.def $(builddir)/../version.inc
 	if test "$(AUTOGEN)" = ":";then \
 		rm -f $(builddir)/args.c; \
 		rm -f $(builddir)/args.h; \
@@ -33,5 +33,9 @@ args.c: $(srcdir)/args.def $(builddir)/.
 			cp $(builddir)/args.h $(srcdir)/../autogen/ocpasswd-args.h; \
 		fi; \
 	fi
-args.h: args.c
+	touch $@
+args.h: args.stamp
+args.c: args.stamp
 
+clean-local:
+	rm -f args.stamp