]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
remove per module lst files for creating fs.lst, command.lst, etc.
authorBVK Chaitanya <bvk@dbook>
Sun, 29 Aug 2010 05:08:46 +0000 (10:38 +0530)
committerBVK Chaitanya <bvk@dbook>
Sun, 29 Aug 2010 05:08:46 +0000 (10:38 +0530)
conf/Makefile.common
gentpl.py
grub-core/Makefile.am
grub-core/gencmdlist.sh [deleted file]
grub-core/genfslist.sh [deleted file]
grub-core/genhandlerlist.sh [deleted file]
grub-core/genpartmaplist.sh [deleted file]
grub-core/genparttoollist.sh [deleted file]
grub-core/genterminallist.sh [deleted file]
grub-core/genvideolist.sh [deleted file]

index eb70f7f770484306da79b123a964bc62deae3768..528fa418fa3b65914ea3893a65346d7457ad632a 100644 (file)
@@ -85,18 +85,12 @@ CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
 
 # Define these variables to calm down automake
 
-FS_FILES =
+PP_FILES =
 DEF_FILES =
 UND_FILES =
 IMG_FILES =
 MOD_FILES =
-VIDEO_FILES =
 MODULE_FILES =
-HANDLER_FILES =
-PARTMAP_FILES =
-COMMAND_FILES =
-PARTTOOL_FILES =
-TERMINAL_FILES =
 KERNEL_HEADER_FILES =
 
 man_MANS =
index 17bda02c6b90164f17ff764921fff9427e60e4e4..783a425fa0b4b064a78639c8f52550d41bafe510 100644 (file)
--- a/gentpl.py
+++ b/gentpl.py
@@ -290,17 +290,7 @@ def module(platform):
     r += gvar_add("platform_DATA", "[+ name +].mod")
     r += gvar_add("CLEANFILES", "def-[+ name +].lst und-[+ name +].lst mod-[+ name +].c mod-[+ name +].o [+ name +].mod")
 
-    r += gvar_add("COMMAND_FILES", "command-[+ name +].lst")
-    r += gvar_add("FS_FILES", "fs-[+ name +].lst")
-    r += gvar_add("VIDEO_FILES", "video-[+ name +].lst")
-    r += gvar_add("PARTMAP_FILES", "partmap-[+ name +].lst")
-    r += gvar_add("HANDLER_FILES", "handler-[+ name +].lst")
-    r += gvar_add("PARTTOOL_FILES", "parttool-[+ name +].lst")
-    r += gvar_add("TERMINAL_FILES", "terminal-[+ name +].lst")
-    r += gvar_add("CLEANFILES", "command-[+ name +].lst fs-[+ name +].lst")
-    r += gvar_add("CLEANFILES", "handler-[+ name +].lst terminal-[+ name +].lst")
-    r += gvar_add("CLEANFILES", "video-[+ name +].lst partmap-[+ name +].lst parttool-[+ name +].lst")
-
+    r += gvar_add("PP_FILES", "[+ name +].pp")
     r += gvar_add("CLEANFILES", "[+ name +].pp")
     r += """
 [+ name +].pp: $(""" + cname() + """_SOURCES) $(nodist_""" + cname() + """_SOURCES)
@@ -332,27 +322,6 @@ mod-[+ name +].o: mod-[+ name +].c
          if test ! -z '$(TARGET_OBJ2ELF)'; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
          $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@; \
        fi
-
-command-[+ name +].lst: [+ name +].pp $(srcdir)/gencmdlist.sh
-       cat $< | sh $(srcdir)/gencmdlist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-fs-[+ name +].lst: [+ name +].pp $(srcdir)/genfslist.sh
-       cat $< | sh $(srcdir)/genfslist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-video-[+ name +].lst: [+ name +].pp $(srcdir)/genvideolist.sh
-       cat $< | sh $(srcdir)/genvideolist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-partmap-[+ name +].lst: [+ name +].pp $(srcdir)/genpartmaplist.sh
-       cat $< | sh $(srcdir)/genpartmaplist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-parttool-[+ name +].lst: [+ name +].pp $(srcdir)/genparttoollist.sh
-       cat $< | sh $(srcdir)/genparttoollist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-handler-[+ name +].lst: [+ name +].pp $(srcdir)/genhandlerlist.sh
-       cat $< | sh $(srcdir)/genhandlerlist.sh [+ name +] > $@ || (rm -f $@; exit 1)
-
-terminal-[+ name +].lst: [+ name +].pp $(srcdir)/genterminallist.sh
-       cat $< | sh $(srcdir)/genterminallist.sh [+ name +] > $@ || (rm -f $@; exit 1)
 """
     return r
 
index 77380354463360f56b240401c681463098c234d3..33f5db46ea1474b97c0e9def8d7df88ba42406a0 100644 (file)
@@ -256,56 +256,87 @@ grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
 CLEANFILES += grub_emu_init.c
 endif
 
-# .lst files
-platform_DATA += moddep.lst
+# List files
+
+fs.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         if grep -v "^#" $$pp | grep '^ *grub_fs_register' >/dev/null 2>&1; then \
+           echo $$b; \
+         fi; \
+       done) | sort -u > $@
 platform_DATA += fs.lst
-platform_DATA += command.lst
-platform_DATA += partmap.lst
-platform_DATA += handler.lst
-platform_DATA += terminal.lst
-platform_DATA += parttool.lst
-platform_DATA += video.lst
-platform_DATA += crypto.lst
-CLEANFILES += moddep.lst
-CLEANFILES += handler.lst
-CLEANFILES += terminal.lst
-CLEANFILES += parttool.lst
-CLEANFILES += video.lst
-CLEANFILES += crypto.lst
-
-fs.lst: $(FS_FILES)
-       cat $^ /dev/null | sort | uniq > $@
 CLEANFILES += fs.lst
 
-command.lst: $(COMMAND_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+command.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         grep -v "^#" $$pp | sed -n \
+           -e "/grub_register_command *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" \
+           -e "/grub_register_extcmd *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
+           -e "/grub_register_command_p1 *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}"; \
+       done) | sort -u > $@
+platform_DATA += command.lst
 CLEANFILES += command.lst
 
-partmap.lst: $(PARTMAP_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+partmap.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         if grep -v "^#" $$pp | grep '^ *grub_partition_map_register' >/dev/null 2>&1; then \
+           echo $$b; \
+         fi; \
+       done) | sort -u > $@
+platform_DATA += partmap.lst
 CLEANFILES += partmap.lst
 
-handler.lst: $(HANDLER_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+handler.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         grep -v "^#" $$pp | sed -n \
+           -e "/grub_parser_register *( *\"/{s/.*( *\"\([^\"]*\)\".*/parser.\1: $$b/;p;}"; \
+       done) | sort -u > $@
+platform_DATA += handler.lst
 CLEANFILES += handler.lst
 
-terminal.lst: $(TERMINAL_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+terminal.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         grep -v "^#" $$pp | sed -n \
+           -e "/grub_term_register_input *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
+           -e "/grub_term_register_output *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}"; \
+       done) | sort -u > $@
+platform_DATA += terminal.lst
 CLEANFILES += terminal.lst
 
-parttool.lst: $(PARTTOOL_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+parttool.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         grep -v "^#" $$pp | sed -n \
+           -e "/grub_parttool_register *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}"; \
+       done) | sort -u > $@
+platform_DATA += parttool.lst
 CLEANFILES += parttool.lst
 
-video.lst: $(VIDEO_FILES)
-       cat $^ /dev/null | sort | uniq > $@
+video.lst: $(PP_FILES)
+       (for pp in $^; do \
+         b=`basename $$pp .pp`; \
+         if grep -v "^#" $$pp | grep '^ *grub_video_register' >/dev/null 2>&1; then \
+           echo $$b; \
+         fi; \
+       done) | sort -u > $@
+platform_DATA += video.lst
 CLEANFILES += video.lst
 
 # but, crypto.lst is simply copied
 crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
        cp $^ $@
+platform_DATA += crypto.lst
 CLEANFILES += crypto.lst
 
+# .lst files
+platform_DATA += moddep.lst
+CLEANFILES += moddep.lst
+
 # generate global module dependencies list
 moddep.lst: kernel_syms.lst genmoddep.awk $(DEF_FILES) $(UND_FILES)
        cat $(DEF_FILES) kernel_syms.lst /dev/null \
diff --git a/grub-core/gencmdlist.sh b/grub-core/gencmdlist.sh
deleted file mode 100644 (file)
index ed5965f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2005,2009  Free Software Foundation, Inc.
-#
-# This gensymlist.sh is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect command names.
-
-module=$1
-
-grep -v "^#" | sed -n \
- -e "/grub_register_command *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $module/;p;}" \
- -e "/grub_register_extcmd *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}" \
- -e "/grub_register_command_p1 *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}"
-
diff --git a/grub-core/genfslist.sh b/grub-core/genfslist.sh
deleted file mode 100644 (file)
index 6fa7e92..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2005,2008  Free Software Foundation, Inc.
-#
-# This gensymlist.sh is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect fs names.
-
-module=$1
-
-# Ignore kernel.mod.
-if test $module = kernel; then
-    exit
-fi
-
-# For now, this emits only a module name, if the module registers a filesystem.
-if grep -v "^#" | grep '^ *grub_fs_register' >/dev/null 2>&1; then
-    echo $module
-fi
diff --git a/grub-core/genhandlerlist.sh b/grub-core/genhandlerlist.sh
deleted file mode 100644 (file)
index e4cb0d9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2009  Free Software Foundation, Inc.
-#
-# This script is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect command names.
-
-module=$1
-
-grep -v "^#" | sed -n \
- -e "/grub_parser_register *( *\"/{s/.*( *\"\([^\"]*\)\".*/parser.\1: $module/;p;}"
diff --git a/grub-core/genpartmaplist.sh b/grub-core/genpartmaplist.sh
deleted file mode 100644 (file)
index fceb0f8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2005, 2008  Free Software Foundation, Inc.
-#
-# This script is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect partmap names.
-
-module=$1
-
-# Ignore kernel.mod.
-if test $module = kernel; then
-    exit
-fi
-
-# For now, this emits only a module name, if the module registers a partition map.
-if grep -v "^#" | grep '^ *grub_partition_map_register' >/dev/null 2>&1; then
-    echo $module
-fi
diff --git a/grub-core/genparttoollist.sh b/grub-core/genparttoollist.sh
deleted file mode 100644 (file)
index 48a0efe..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2009  Free Software Foundation, Inc.
-#
-# This gensymlist.sh is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect parttool names.
-
-module=$1
-
-grep -v "^#" | sed -n \
- -e "/grub_parttool_register *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $module/;p;}"
diff --git a/grub-core/genterminallist.sh b/grub-core/genterminallist.sh
deleted file mode 100644 (file)
index 60f5b91..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2009,2010  Free Software Foundation, Inc.
-#
-# This script is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect command names.
-
-module=$1
-
-grep -v "^#" | sed -n \
- -e "/grub_term_register_input *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $module/;p;}" \
- -e "/grub_term_register_output *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $module/;p;}" \
diff --git a/grub-core/genvideolist.sh b/grub-core/genvideolist.sh
deleted file mode 100644 (file)
index b208fa2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2005,2008,2009  Free Software Foundation, Inc.
-#
-# This script is free software; the author
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Read source code from stdin and detect partmap names.
-
-module=$1
-
-# Ignore video.mod.
-if test $module = video; then
-    exit
-fi
-
-# For now, this emits only a module name, if the module registers a partition map.
-if grep -v "^#" | grep '^ *grub_video_register' >/dev/null 2>&1; then
-    echo $module
-fi