Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Fix a build error when building man.config.5 (a remnant of a long |
| 2 | ago previous patch). Optimized the manpages Makefile for parallel |
| 3 | builds. Also, fix compile warnings in a couple other files. |
| 4 | |
| 5 | Upstream-Status: Pending |
| 6 | |
| 7 | Signed-off-by: Bill Randle <william.c.randle@intel.com> |
| 8 | |
| 9 | --- man-1.6g/man/Makefile.in.orig 2016-03-28 17:31:08.723949180 -0700 |
| 10 | +++ man-1.6g/man/Makefile.in 2016-03-28 17:46:12.866910386 -0700 |
| 11 | @@ -5,6 +5,13 @@ |
| 12 | ALL = man.1 whatis.1 apropos.1 man.config.5 |
| 13 | MAYBE8 = makewhatis |
| 14 | |
| 15 | +SUBDIRS := $(shell echo @languages@) |
| 16 | + |
| 17 | +.PHONY: subdirs $(SUBDIRS) |
| 18 | + |
| 19 | +man.config.man: man.conf.man |
| 20 | + @cp $< $@ |
| 21 | + |
| 22 | .SUFFIXES: .man .1 .5 .8 |
| 23 | |
| 24 | .man.1: |
| 25 | @@ -19,11 +26,11 @@ |
| 26 | INSTALL = @INSTALL@ -c -m 644 |
| 27 | |
| 28 | # Where to put the manual pages. |
| 29 | -mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG) |
| 30 | +mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG) |
| 31 | |
| 32 | all: $(ALL) |
| 33 | for i in $(MAYBE8); \ |
| 34 | - do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done |
| 35 | + do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done |
| 36 | |
| 37 | install: $(ALL) |
| 38 | mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8 |
| 39 | @@ -38,24 +45,27 @@ |
| 40 | rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~ |
| 41 | |
| 42 | spotless: |
| 43 | + rm -f man.config.man |
| 44 | |
| 45 | subdirs: |
| 46 | - @for i in @languages@; do if test -d $$i; then echo; \ |
| 47 | - echo "==== Making the `cat $$i.txt` man pages. ===="; \ |
| 48 | - cd $$i; make -f ../Makefile; cd ..; \ |
| 49 | - else echo "==== No $$i man pages found. ===="; fi; done |
| 50 | +subdirs: $(SUBDIRS) |
| 51 | +$(SUBDIRS): |
| 52 | + if test -d $@; then echo; \ |
| 53 | + echo "==== Making the `cat $@.txt` man pages. ===="; \ |
| 54 | + $(MAKE) -C $@ -f ../Makefile all; \ |
| 55 | + else echo "==== No $@ man pages found. ===="; fi |
| 56 | |
| 57 | installsubdirs: |
| 58 | @for i in @languages@; do if test -d $$i; then echo; \ |
| 59 | echo "==== Installing the `cat $$i.txt` man pages. ===="; \ |
| 60 | cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \ |
| 61 | - export SLANG; make -f ../Makefile install; cd ..; \ |
| 62 | + export SLANG; $(MAKE) -f ../Makefile install; cd ..; \ |
| 63 | else echo "==== No $$i man pages found. ===="; fi; done |
| 64 | |
| 65 | cleansubdirs: |
| 66 | - @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done |
| 67 | + @for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done |
| 68 | rm -f core *~ |
| 69 | |
| 70 | spotlesssubdirs: |
| 71 | - for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done |
| 72 | + for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done |
| 73 | rm -f Makefile |
| 74 | |
| 75 | --- man-1.6g/src/gripes.c.orig 2006-11-21 11:53:44.000000000 -0800 |
| 76 | +++ man-1.6g/src/gripes.c 2016-03-30 16:32:31.601103487 -0700 |
| 77 | @@ -7,8 +7,6 @@ |
| 78 | |
| 79 | extern char *msg[]; |
| 80 | |
| 81 | -static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */ |
| 82 | - |
| 83 | #ifdef NONLS |
| 84 | |
| 85 | static char * |
| 86 | @@ -30,6 +28,8 @@ |
| 87 | #include <nl_types.h> |
| 88 | #include "../catopen/catopen.c" |
| 89 | |
| 90 | +static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */ |
| 91 | + |
| 92 | nl_catd catfd = (nl_catd) -1; |
| 93 | int cat_is_open = 0; |
| 94 | |
| 95 | --- man-1.6g/src/manfile.c.orig 2005-08-20 16:26:06.000000000 -0700 |
| 96 | +++ man-1.6g/src/manfile.c 2016-03-29 09:10:21.527841285 -0700 |
| 97 | @@ -299,7 +299,7 @@ |
| 98 | const char *((*tocat)(const char *man_filename, const char *ext, |
| 99 | int flags))) { |
| 100 | char **sl; |
| 101 | - struct manpage *res; |
| 102 | + struct manpage *res = 0; |
| 103 | |
| 104 | standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX)); |
| 105 | to_cat_filename = tocat; |