dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
Blob Blame History Raw
From c7d45a90490c5f3337a6412a6ebe500e3a41a63b Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 12 Sep 2012 08:27:26 +0200
Subject: [PATCH 036/482] 	Don't require grub-mkconfig_lib to generate
 manpages for programs.

	* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
	dependencies, don't add grub-mkconfig_lib.
	(program): Pass empty adddeps.
	(script): Pass grub-mkconfig_lib as adddeps.
---
 ChangeLog | 9 +++++++++
 gentpl.py | 8 ++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

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