Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/x86info/files: x86info-1.25-parallel-make-cleanup.patch
Date: Wed, 04 Nov 2009 05:21:21
Message-Id: E1N5YJ5-0001z0-IT@stork.gentoo.org
1 robbat2 09/11/04 05:21:19
2
3 Added: x86info-1.25-parallel-make-cleanup.patch
4 Log:
5 Version bump per bug #291446, also more parallel make fixes.
6 (Portage version: 2.2_rc48/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sys-apps/x86info/files/x86info-1.25-parallel-make-cleanup.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/x86info/files/x86info-1.25-parallel-make-cleanup.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/x86info/files/x86info-1.25-parallel-make-cleanup.patch?rev=1.1&content-type=text/plain
13
14 Index: x86info-1.25-parallel-make-cleanup.patch
15 ===================================================================
16 diff -Nuar --exclude '*.rej' --exclude '*.orig' x86info-1.25.orig/Makefile x86info-1.25/Makefile
17 --- x86info-1.25.orig/Makefile 2009-10-30 15:59:46.000000000 +0000
18 +++ x86info-1.25/Makefile 2009-11-04 05:16:10.983250367 +0000
19 @@ -2,15 +2,25 @@
20 # -Wstrict-overflow=5
21 CC = gcc
22
23 +.PRECIOUS: %.d
24 +
25 SHELL = /bin/sh
26
27
28 -.c.o:
29 - $(CC) $(CFLAGS) -MMD -o $@ -c $<
30 - @cp $*.d $*.P; \
31 +%.d: %.c
32 + $(CC) $(CFLAGS) -E -MMD -MF $@ $< >/dev/null
33 +
34 +%.d: %.h
35 + $(CC) $(CFLAGS) -E -MMD -MF $@ $< >/dev/null
36 +
37 +%.P: %.d
38 + cat $< >$@.tmp ; \
39 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
40 - -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
41 - rm -f $*.d
42 + -e '/^$$/ d' -e 's/$$/ :/' < $@.tmp >> $@.tmp ; \
43 + mv $@.tmp $@
44 +
45 +.c.o:
46 + $(CC) $(CFLAGS) -o $@ -c $<
47
48 .S.o:
49 $(CC) $(CFLAGS) -o $@ -c $<
50 @@ -22,7 +32,8 @@
51 LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h
52
53 %.h: %.regs scripts/createheader.py
54 - python scripts/createheader.py $< `basename $< .regs` >$@
55 + python scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \
56 + mv $@.tmp $@
57
58 LSMSR_SRC =\
59 lsmsr.c\
60 @@ -30,11 +41,12 @@
61 havecpuid.c
62
63 LSMSR_OBJS = $(LSMSR_SRC:%.c=%.o)
64 +LSMSR_DEPS = $(patsubst %.h,%.P,$(patsubst %.c,%.P,$(LSMSR_SRC))) $(patsubst %.h,%.P,$(LSMSR_TMP_HEADERS))
65
66 -lsmsr: $(LSMSR_TMP_HEADERS) $(LSMSR_OBJS)
67 - $(CC) $(CFLAGS) -o lsmsr $(LSMSR_OBJS)
68 +lsmsr: $(LSMSR_TMP_HEADERS) $(LSMSR_OBJS) $(LSMSR_DEPS)
69 + $(CC) $(LDFLAGS) $(CFLAGS) -o lsmsr $(LSMSR_OBJS)
70
71 --include $(LSMSR_SRC:%.c=%.P)
72 +-include $(LSMSR_DEPS)
73
74 X86INFO_SRC =\
75 AMD/identify.c\
76 @@ -89,12 +101,12 @@
77 bench/MHz.c
78
79 X86INFO_OBJS = $(X86INFO_SRC:%.c=%.o)
80 +X86INFO_DEPS = $(patsubst %.h,%.P,$(patsubst %.c,%.P,$(X86INFO_SRC))) $(patsubst %.h,%.P,$(LSMSR_TMP_HEADERS))
81
82 -x86info: $(X86INFO_OBJS)
83 - $(CC) $(CFLAGS) -o x86info $(X86INFO_OBJS)
84 -
85 --include $(X86INFO_SRC:%.c=%.P)
86 +x86info: $(X86INFO_OBJS) $(X86INFO_DEPS)
87 + $(CC) $(LDFLAGS) $(CFLAGS) -o x86info $(X86INFO_OBJS)
88
89 +-include $(X86INFO_DEPS)
90
91 nodes:
92 scripts/makenodes
93 @@ -113,6 +125,7 @@
94 @find . -name "*.o" -exec rm {} \;
95 @find . -name "*~" -exec rm {} \;
96 @find . -name "*.P" -exec rm {} \;
97 + @find . -name "*.d" -exec rm {} \;
98 @rm -f x86info x86info.exe
99 @rm -f lsmsr $(LSMSR_TMP_HEADERS)
100
101 @@ -121,3 +134,6 @@
102
103 sparse:
104 sparse $(X86INFO_SRC)
105 +
106 +deps-headers: $(LSMSR_TMP_HEADERS)
107 +deps: deps-headers $(LSMSR_DEPS) $(X86INFO_DEPS)