summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix_race_condition_with_multithreaded_make.patch
blob: 40175b8ffa863d9bb1e237e459f635baa765069f (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
Upstream-Status: Pending

Fix makefile for multithreaded (make -j ) building.

btrfsctl.c
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/intel/poky/builds/world/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfsctl.o.d,-MT,btrfsctl.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfsctl.c
| btrfsctl.c:37:21: fatal error: version.h: No such file or directory
| compilation terminated.
| btrfslabel.c:40:21: fatal error: version.h: No such file or directory
| compilation terminated.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/01/02

Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -26,14 +26,13 @@ else
 	check = ls
 endif
 
-.c.o:
+%.o: %.c version.h
 	$(check) $<
 	$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $<
 
+all: $(progs) manpages
 
-all: version $(progs) manpages
-
-version:
+version.h: version.sh
 	bash version.sh
 
 btrfs: $(objects) btrfs.o btrfs_cmds.o scrub.o