]> git.draconx.ca Git - gentoo-fixes.git/blob - sys-apps/man/files/man-1.6f-parallel-build.patch
sys-apps/man: Fix borken Gentoo man-1.6g-echo-escape.patch
[gentoo-fixes.git] / sys-apps / man / files / man-1.6f-parallel-build.patch
1 http://bugs.gentoo.org/207148
2
3 patch by Kevin Pyle to fix parallel build issues
4
5 --- a/src/Makefile.in
6 +++ b/src/Makefile.in
7 @@ -42,9 +42,12 @@
8  makemsg:
9         $(BUILD_CC) -o makemsg makemsg.c
10  
11 -msg.c gripedefs.h: ../msgs/mess.en makemsg
12 +gripedefs.h: ../msgs/mess.en makemsg
13         ./makemsg ../msgs/mess.en gripedefs.h msg.c
14  
15 +# avoid parallel build issues with makemsg
16 +msg.c: gripedefs.h
17 +
18  # glob.c does not have prototypes
19  glob.o: glob.c ndir.h
20         $(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c
21
22 http://bugs.gentoo.org/258916
23
24 avoid:
25         make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
26
27 --- a/man/Makefile.in
28 +++ b/man/Makefile.in
29 @@ -3,7 +3,7 @@
30  MAN5 = man.conf
31  MAN8 = makewhatis
32  ALL = man.1 whatis.1 apropos.1 man.conf.5
33 -MAYBE8 = makewhatis
34 +MAYBE8 = $(wildcard makewhatis.man)
35  
36  .SUFFIXES: .man .1 .5 .8
37  
38 @@ -21,9 +21,7 @@
39  # Where to put the manual pages.
40  mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
41  
42 -all:   $(ALL)
43 -       for i in $(MAYBE8); \
44 -               do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
45 +all:   $(ALL) $(MAYBE8:.man=.8)
46  
47  install: $(ALL)
48         mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
49 @@ -39,18 +37,17 @@
50  
51  spotless:
52  
53 -subdirs:
54 -       @for i in @languages@; do if test -d $$i; then echo; \
55 -               echo "==== Making the `cat $$i.txt` man pages. ===="; \
56 -               cd $$i; make -f ../Makefile; cd ..; \
57 -               else echo "==== No $$i man pages found. ===="; fi; done
58 -
59 -installsubdirs:
60 -       @for i in @languages@; do if test -d $$i; then echo; \
61 -               echo "==== Installing the `cat $$i.txt` man pages. ===="; \
62 -               cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
63 -               export SLANG; make -f ../Makefile install; cd ..; \
64 -               else echo "==== No $$i man pages found. ===="; fi; done
65 +MAN_LANGS = $(wildcard @languages@)
66 +subdirs: $(MAN_LANGS:=_lang_subdir)
67 +%_lang_subdir:
68 +       @echo "==== Making the `cat $(@:_lang_subdir=).txt` man pages. ===="
69 +       $(MAKE) -f ../Makefile -C $(@:_lang_subdir=)
70 +
71 +installsubdirs: $(MAN_LANGS:=_lang_installsubdir)
72 +%_lang_installsubdir:
73 +       @echo "==== Making the `cat $(@:_lang_installsubdir=).txt` man pages. ===="
74 +       $(MAKE) -f ../Makefile -C $(@:_lang_installsubdir=) install \
75 +               SLANG=`s=$(@:_lang_installsubdir=); test $$s = en || echo /$$s`
76  
77  cleansubdirs:
78         @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done