summaryrefslogtreecommitdiff
blob: 30c13e8c75fa5376735505f901bfffa39eb5cada (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
Forward port to 1.106 by Thilo Bangert <bangert@gentoo.org>
Fixes for parallel compile.

- Redirection straight to an output target that is later used for dependancies
  is not safe. The output file must be come into existence atomically.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Naur bglibs-1.106.orig/Makefile bglibs-1.106/Makefile
--- bglibs-1.106.orig/Makefile	2009-11-20 11:52:29.000000000 +0100
+++ bglibs-1.106/Makefile	2009-11-20 11:56:01.000000000 +0100
@@ -152,37 +152,43 @@
 	./compile crc-gentab.c
 
 crc/crc16_arc_table.c: crc-gentab
-	./crc-gentab crc16_arc 16 0x8005 reflected >$@
+	./crc-gentab crc16_arc 16 0x8005 reflected >$@.tmp
+	mv $@.tmp $@
 
 crc/crc16_arc_table.lo crc/crc16_arc_table.o: ltcompile crc/crc16_arc_table.c
 	./ltcompile crc/crc16_arc_table.c
 
 crc/crc16_ccitt_table.c: crc-gentab
-	./crc-gentab crc16_ccitt 16 0x1021 normal >$@
+	./crc-gentab crc16_ccitt 16 0x1021 normal >$@.tmp
+	mv $@.tmp $@
 
 crc/crc16_ccitt_table.lo crc/crc16_ccitt_table.o: ltcompile crc/crc16_ccitt_table.c
 	./ltcompile crc/crc16_ccitt_table.c
 
 crc/crc16_xmodem_table.c: crc-gentab
-	./crc-gentab crc16_xmodem 16 0x8408 reflected >$@
+	./crc-gentab crc16_xmodem 16 0x8408 reflected >$@.tmp
+	mv $@.tmp $@
 
 crc/crc16_xmodem_table.lo crc/crc16_xmodem_table.o: ltcompile crc/crc16_xmodem_table.c
 	./ltcompile crc/crc16_xmodem_table.c
 
 crc/crc32_table.c: crc-gentab
-	./crc-gentab crc32 32 0x04C11DB7 reflected >$@
+	./crc-gentab crc32 32 0x04C11DB7 reflected >$@.tmp
+	mv $@.tmp $@
 
 crc/crc32_table.lo crc/crc32_table.o: ltcompile crc/crc32_table.c
 	./ltcompile crc/crc32_table.c
 
 crc/crc32c_table.c: crc-gentab
-	./crc-gentab crc32c 32 0x1EDC6F41 reflected >$@
+	./crc-gentab crc32c 32 0x1EDC6F41 reflected >$@.tmp
+	mv $@.tmp $@
 
 crc/crc32c_table.lo crc/crc32c_table.o: ltcompile crc/crc32c_table.c
 	./ltcompile crc/crc32c_table.c
 
 crc/crc64_table.c: crc-gentab
-	./crc-gentab crc64 64 0x42F0E1EBA9EA3693 normal >$@
+	./crc-gentab crc64 64 0x42F0E1EBA9EA3693 normal >$@.tmp
+	mv $@.tmp $@
 
 crc/crc64_table.lo crc/crc64_table.o: ltcompile crc/crc64_table.c
 	./ltcompile crc/crc64_table.c