nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0036-Don-t-require-grub-mkconfig_lib-to-generate-manpages.patch

f96e0b
From c7d45a90490c5f3337a6412a6ebe500e3a41a63b Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Wed, 12 Sep 2012 08:27:26 +0200
f96e0b
Subject: [PATCH 036/482] 	Don't require grub-mkconfig_lib to generate
f96e0b
 manpages for programs.
f96e0b
f96e0b
	* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
f96e0b
	dependencies, don't add grub-mkconfig_lib.
f96e0b
	(program): Pass empty adddeps.
f96e0b
	(script): Pass grub-mkconfig_lib as adddeps.
f96e0b
---
f96e0b
 ChangeLog | 9 +++++++++
f96e0b
 gentpl.py | 8 ++++----
f96e0b
 2 files changed, 13 insertions(+), 4 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index c697e17..8576923 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,12 @@
f96e0b
+2012-09-12  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
+	Don't require grub-mkconfig_lib to generate manpages for programs.
f96e0b
+
f96e0b
+	* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
f96e0b
+	dependencies, don't add grub-mkconfig_lib.
f96e0b
+	(program): Pass empty adddeps.
f96e0b
+	(script): Pass grub-mkconfig_lib as adddeps.
f96e0b
+
f96e0b
 2012-09-11  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
 	* grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
f96e0b
diff --git a/gentpl.py b/gentpl.py
f96e0b
index bab4a8a..6d7f613 100644
f96e0b
--- a/gentpl.py
f96e0b
+++ b/gentpl.py
f96e0b
@@ -484,10 +484,10 @@ def library(platform):
f96e0b
 def installdir(default="bin"):
f96e0b
     return "[+ IF installdir +][+ installdir +][+ ELSE +]" + default + "[+ ENDIF +]"
f96e0b
 
f96e0b
-def manpage():
f96e0b
+def manpage(adddeps):
f96e0b
     r  = "if COND_MAN_PAGES\n"
f96e0b
     r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
f96e0b
-    r += rule("[+ name +].[+ mansection +]", "[+ name +] grub-mkconfig_lib", """
f96e0b
+    r += rule("[+ name +].[+ mansection +]", "[+ name +] " + adddeps, """
f96e0b
 chmod a+x [+ name +]
f96e0b
 PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
f96e0b
 """)
f96e0b
@@ -503,7 +503,7 @@ def program(platform, test=False):
f96e0b
     r += gvar_add("TESTS", "[+ name +]")
f96e0b
     r += "[+ ELSE +]"
f96e0b
     r += var_add(installdir() + "_PROGRAMS", "[+ name +]")
f96e0b
-    r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
f96e0b
+    r += "[+ IF mansection +]" + manpage("") + "[+ ENDIF +]"
f96e0b
     r += "[+ ENDIF +]"
f96e0b
 
f96e0b
     r += var_set(cname() + "_SOURCES", platform_sources(platform))
f96e0b
@@ -532,7 +532,7 @@ def script(platform):
f96e0b
     r += gvar_add ("TESTS", "[+ name +]")
f96e0b
     r += "[+ ELSE +]"
f96e0b
     r += var_add(installdir() + "_SCRIPTS", "[+ name +]")
f96e0b
-    r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
f96e0b
+    r += "[+ IF mansection +]" + manpage("grub-mkconfig_lib") + "[+ ENDIF +]"
f96e0b
     r += "[+ ENDIF +]"
f96e0b
 
f96e0b
     r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b