summaryrefslogtreecommitdiff
blob: 41918d9244da4416c0e8383a4da4d755ec2b7fc5 (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
68
69
70
71
72
73
74
75
76
77
78
http://bugs.gentoo.org/207148

patch by Kevin Pyle to fix parallel build issues

--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -42,9 +42,12 @@
 makemsg:
 	$(BUILD_CC) -o makemsg makemsg.c
 
-msg.c gripedefs.h: ../msgs/mess.en makemsg
+gripedefs.h: ../msgs/mess.en makemsg
 	./makemsg ../msgs/mess.en gripedefs.h msg.c
 
+# avoid parallel build issues with makemsg
+msg.c: gripedefs.h
+
 # glob.c does not have prototypes
 glob.o: glob.c ndir.h
 	$(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c

http://bugs.gentoo.org/258916

avoid:
	make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -3,7 +3,7 @@
 MAN5 = man.conf
 MAN8 = makewhatis
 ALL = man.1 whatis.1 apropos.1 man.conf.5
-MAYBE8 = makewhatis
+MAYBE8 = $(wildcard makewhatis.man)
 
 .SUFFIXES: .man .1 .5 .8
 
@@ -21,9 +21,7 @@
 # Where to put the manual pages.
 mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
 
-all:	$(ALL)
-	for i in $(MAYBE8); \
-		do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
+all:	$(ALL) $(MAYBE8:.man=.8)
 
 install: $(ALL)
 	mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
@@ -39,18 +37,17 @@
 
 spotless:
 
-subdirs:
-	@for i in @languages@; do if test -d $$i; then echo; \
-		echo "==== Making the `cat $$i.txt` man pages. ===="; \
-		cd $$i; make -f ../Makefile; cd ..; \
-		else echo "==== No $$i man pages found. ===="; fi; done
-
-installsubdirs:
-	@for i in @languages@; do if test -d $$i; then echo; \
-		echo "==== Installing the `cat $$i.txt` man pages. ===="; \
-		cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
-		export SLANG; make -f ../Makefile install; cd ..; \
-		else echo "==== No $$i man pages found. ===="; fi; done
+MAN_LANGS = $(wildcard @languages@)
+subdirs: $(MAN_LANGS:=_lang_subdir)
+%_lang_subdir:
+	@echo "==== Making the `cat $(@:_lang_subdir=).txt` man pages. ===="
+	$(MAKE) -f ../Makefile -C $(@:_lang_subdir=)
+
+installsubdirs: $(MAN_LANGS:=_lang_installsubdir)
+%_lang_installsubdir:
+	@echo "==== Making the `cat $(@:_lang_installsubdir=).txt` man pages. ===="
+	$(MAKE) -f ../Makefile -C $(@:_lang_installsubdir=) install \
+		SLANG=`s=$(@:_lang_installsubdir=); test $$s = en || echo /$$s`
 
 cleansubdirs:
 	@for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done