File man-makefile-parallel.diff of Package dba-net-snmp-5721-static

diff -Naur net-snmp-5.7.2.1.orig/man/Makefile.in net-snmp-5.7.2.1/man/Makefile.in
--- net-snmp-5.7.2.1.orig/man/Makefile.in	2014-02-20 01:36:42.000000000 +0100
+++ net-snmp-5.7.2.1/man/Makefile.in	2016-09-08 11:23:47.825127062 +0200
@@ -54,11 +54,13 @@
 ALARM_ALIASES   = snmp_alarm_register.3 snmp_alarm_register_hr.3 snmp_alarm_unregister.3
 SESSION_ALIASES = snmp_api_errstring.3 snmp_close.3 snmp_error.3    \
 	snmp_open.3 snmp_perror.3 snmp_read.3 snmp_select_info.3    \
-	snmp_send.3 snmp_sess_perror.3 snmp_timeout.3
+	snmp_send.3 snmp_sess_perror.3 snmp_timeout.3               \
+	snmp_async_send.3 snmp_synch_response.3
 SSESS_ALIASES   = snmp_sess_async_send.3 snmp_sess_close.3 snmp_sess_error.3 \
 	snmp_sess_init.3 snmp_sess_open.3 snmp_sess_read.3		     \
 	snmp_sess_select_info.3 snmp_sess_send.3			     \
-	snmp_sess_session.3 snmp_sess_timeout.3
+	snmp_sess_session.3 snmp_sess_timeout.3                              \
+	snmp_sess_synch_response.3
 TRAP_ALIASES    = send_easy_trap.3 send_trap_vars.3 send_v2trap.3 
 VARBIND_ALIASES = fprint_value.3 fprint_variable.3	\
 	print_value.3 print_variable.3			\
@@ -81,14 +83,24 @@
 
 all: $(TARGETS) standardall manaliases
 
-manaliases: Makefile
+manaliases: Makefile $(MAN3_API)
 	touch manaliases
-	@for i in $(MAN3_API) ; do				  \
-            for j in `sed -n '/^.SH NAME/,/^.SH SYNOPSIS/p' $$i  | sed -e 's/.- .*//' | sed 's/,.*//'  | @EGREP@ -v '^.SH ' `; do \
+	@result=0 ; \
+        for i in $(MAN3_API) ; do				  \
+            for j in `sed -n '/^.SH NAME/,/^.SH SYNOPSIS/p' $$i  | sed -e 's/.- .*//' | sed 's/,.*//'  | /bin/grep -E -v '^.SH ' `; do \
 		echo "making man page alias $$j -> $$i APIs" ;    \
 		echo ".so man3/$$i" > $$j.3 ; 		  \
+		if ! expr match "$(MANALIASES)" ".*$$j\\.3" > /dev/null ; \
+		then \
+		    var=`echo $$i | sed -e 's/^netsnmp_//' -e 's/_api.3//' | tr '[a-z]' '[A-Z]'` ; \
+		    echo "You must add $$j.3 to the $${var}_ALIASES variable in the Makefile.in" ; \
+		    result=1 ; \
+	        fi; \
 	    done                                                  \
-	done
+	done ; \
+	exit $$result
+
+$(MANALIASES): manaliases
 
 agentxtrap.1: $(srcdir)/agentxtrap.1.def ../sedscript
 	$(SED) -f ../sedscript < $(srcdir)/agentxtrap.1.def > agentxtrap.1
@@ -238,8 +250,8 @@
 	else \
 	  touch mib2c.conf.5 ; \
 	fi
-
-maninstall:  maninstalldirs $(MAN1) $(MAN1G) $(MAN3) $(MAN5G) $(MAN8) $(MANALIASES)
+ 
+maninstall:  maninstalldirs $(MAN1) $(MAN1G) $(MAN3) $(MAN3_API) $(MAN3G) $(MAN5G) $(MAN8G) $(MANALIASES)
 	@for i in $(MAN1) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man1dir) ; echo "install:  installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done
 	@$(INSTALL_DATA) $(MAN1G) $(INSTALL_PREFIX)$(man1dir)
 	@for i in $(MAN1G) ; do echo "install:  installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done