summaryrefslogtreecommitdiff
blob: 3ef24ec3d2540aeb106a94ea7154dbbdf528ae8a (plain)
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
65
66
67
From 4ede74dd803ddbc4d0686bec0749459f54854495 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
Date: Sun, 13 May 2012 14:55:35 -0700
Subject: [PATCH] build: fix parallel install by creating directory in the
 rule
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Relying on the rule that creates the directory is a bad idea to be
parallel safe.

(Patch modified to use autoconf's MKDIR_P instead of automake's
deprecated mkdir_p, allowing use of automake 1.12).

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
---
 etc/Makefile.am        |    4 ++--
 src/pkcs11/Makefile.am |    7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/etc/Makefile.am b/etc/Makefile.am
index 0ef546f..3b75995 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -18,8 +18,8 @@ opensc.conf: opensc.conf.in force
 		-e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \
 		< $< > $@
 
-sysconf_DATA=#required in order to create dir
-install-exec-hook:	install-sysconfDATA opensc.conf
+install-exec-hook: opensc.conf
+	$(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
 	if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \
 		$(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \
 	else \
diff --git a/src/pkcs11/Makefile.am b/src/pkcs11/Makefile.am
index 8ff9abc..211055b 100644
--- a/src/pkcs11/Makefile.am
+++ b/src/pkcs11/Makefile.am
@@ -53,19 +53,20 @@ pkcs11-jar: jar-dir
 		 -k"testcert" jar-dir
 
 if WIN32
-install-exec-hook:	install-pkcs11DATA
+install-exec-hook:
+	$(MKDIR_P) "$(DESTDIR)$(libdir)"
 	for l in opensc-pkcs11.dll onepin-opensc-pkcs11.dll pkcs11-spy.dll; do \
 		mv "$(DESTDIR)$(libdir)/$$l" "$(DESTDIR)$(bindir)/$$l"; \
 	done
 else
 # see http://wiki.cacert.org/wiki/Pkcs11TaskForce
-pkcs11_DATA = #This will create the directory
 if CYGWIN
 PKCS11_SUFFIX=.dll
 else
 PKCS11_SUFFIX=.so
 endif
-install-exec-hook:	install-pkcs11DATA
+install-exec-hook:
+	$(MKDIR_P) "$(DESTDIR)$(pkcs11dir)"
 	for l in opensc-pkcs11$(PKCS11_SUFFIX) onepin-opensc-pkcs11$(PKCS11_SUFFIX) pkcs11-spy$(PKCS11_SUFFIX); do \
 		rm -f "$(DESTDIR)$(pkcs11dir)/$$l"; \
 		$(LN_S) ../$$l "$(DESTDIR)$(pkcs11dir)/$$l"; \
-- 
1.7.8.6