remove per module lst files for creating fs.lst, command.lst, etc.

This commit is contained in:
BVK Chaitanya 2010-08-29 10:38:46 +05:30
parent a7363f53c8
commit a0bf9fc930
10 changed files with 63 additions and 227 deletions

View 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
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
# List files
fs.lst: $(FS_FILES)
cat $^ /dev/null | sort | uniq > $@
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
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 \

View file

@ -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;}"

View file

@ -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

View file

@ -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;}"

View file

@ -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

View file

@ -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;}"

View file

@ -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;}" \

View file

@ -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