All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Build system improvements
@ 2010-08-29 12:15 BVK Chaitanya
  2010-08-29 13:07 ` KESHAV P.R.
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: BVK Chaitanya @ 2010-08-29 12:15 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Hi,


Attached patch has few more improvements for automake build system:

1.  It removes the need to create def-* and und-* list files for
creating moddep.lst

2.  It removes gencmdlist.sh, genfslist.sh etc. scripts and creates
commands.lst files only using make rules.

3.  It uses objcopy command to add .modname and .moddeps sections to
modules, and removes the need to create mod-* files.

With these improvements, number of files created in grub build is
brought down to 1500+ from earlier 3000+.



-- 
bvk.chaitanya

[-- Attachment #2: build-improvements.patch --]
[-- Type: text/x-diff, Size: 32714 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: bvk@dbook-20100829112843-lk3o77348uld06kg
# target_branch: ../mainline/
# testament_sha1: ca215b856a9f29c2fd30f660799fe36adfbd97bf
# timestamp: 2010-08-29 17:32:48 +0530
# base_revision_id: bvk@dbook-20100829040313-1x00reilaestorob
# 
# Begin patch
=== modified file 'conf/Makefile.common'
--- conf/Makefile.common	2010-08-23 07:53:56 +0000
+++ conf/Makefile.common	2010-08-29 05:47:30 +0000
@@ -85,18 +85,10 @@
 
 # Define these variables to calm down automake
 
-FS_FILES =
-DEF_FILES =
-UND_FILES =
+PP_FILES =
 IMG_FILES =
 MOD_FILES =
-VIDEO_FILES =
 MODULE_FILES =
-HANDLER_FILES =
-PARTMAP_FILES =
-COMMAND_FILES =
-PARTTOOL_FILES =
-TERMINAL_FILES =
 KERNEL_HEADER_FILES =
 
 man_MANS =

=== modified file 'conf/Makefile.extra-dist'
--- conf/Makefile.extra-dist	2010-08-21 04:18:27 +0000
+++ conf/Makefile.extra-dist	2010-08-29 11:28:43 +0000
@@ -14,20 +14,13 @@
 EXTRA_DIST += grub-core/Makefile.gcry.def
 
 EXTRA_DIST += grub-core/genmoddep.awk
-EXTRA_DIST += grub-core/genmodsrc.sh
-EXTRA_DIST += grub-core/genfslist.sh
-EXTRA_DIST += grub-core/gencmdlist.sh
+EXTRA_DIST += grub-core/genmod.sh.in
+EXTRA_DIST += grub-core/gensyminfo.sh.in
 EXTRA_DIST += grub-core/gensymlist.sh
 EXTRA_DIST += grub-core/genemuinit.sh
-EXTRA_DIST += grub-core/genvideolist.sh
-EXTRA_DIST += grub-core/genhandlerlist.sh
-EXTRA_DIST += grub-core/genpartmaplist.sh
-EXTRA_DIST += grub-core/genterminallist.sh
-EXTRA_DIST += grub-core/genparttoollist.sh
 EXTRA_DIST += grub-core/genemuinitheader.sh
 
 EXTRA_DIST += $(shell find $(top_srcdir)/include -name '*.h')
+EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/lib -name '*.h')
 EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/gnulib -name '*.h')
 EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/efiemu -name '*.h')
-EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/lib/posix_wrap -name '*.h')
-EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/lib/libgcrypt_wrap -name '*.h')

=== modified file 'gentpl.py'
--- gentpl.py	2010-08-23 08:37:29 +0000
+++ gentpl.py	2010-08-29 11:13:07 +0000
@@ -284,75 +284,12 @@
     r += gvar_add("BUILT_SOURCES", "$(nodist_" + cname() + "_SOURCES)")
     r += gvar_add("CLEANFILES", "$(nodist_" + cname() + "_SOURCES)")
 
-    r += gvar_add("DEF_FILES", "def-[+ name +].lst")
-    r += gvar_add("UND_FILES", "und-[+ name +].lst")
     r += gvar_add("MOD_FILES", "[+ name +].mod")
-    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)
 	$(TARGET_CPP) -DGRUB_LST_GENERATOR $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(""" + cname() + """_CPPFLAGS) $(CPPFLAGS) $^ > $@ || (rm -f $@; exit 1)
-
-def-[+ name +].lst: [+ name +].module$(EXEEXT)
-	if test x$(USE_APPLE_CC_FIXES) = xyes; then \
-	  $(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@; \
-	else \
-	  $(NM) -g --defined-only -P -p $< | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@; \
-	fi
-
-und-[+ name +].lst: [+ name +].module$(EXEEXT)
-	$(NM) -u -P -p $< | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@
-
-mod-[+ name +].c: [+ name +].module$(EXEEXT) moddep.lst genmodsrc.sh
-	sh $(srcdir)/genmodsrc.sh [+ name +] moddep.lst > $@ || (rm -f $@; exit 1)
-
-mod-[+ name +].o: mod-[+ name +].c
-	$(TARGET_CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(""" + cname() + """_CPPFLAGS) $(CPPFLAGS) $(""" + cname() + """_CFLAGS) $(CFLAGS) -c -o $@ $<
-
-[+ name +].mod: [+ name +].module$(EXEEXT) mod-[+ name +].o
-	if test x$(USE_APPLE_CC_FIXES) = xyes; then \
-	  $(CCLD) $(""" + cname() + """_LDFLAGS) $(LDFLAGS) -o $@.bin $^; \
-	  $(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -nu -nd $@.bin $@; \
-	  rm -f $@.bin; \
-	else \
-	  $(CCLD) -o $@ $(""" + cname() + """_LDFLAGS) $(LDFLAGS) $^; \
-	  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
 
@@ -479,9 +416,8 @@
     r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
     r += "[+ ENDIF +]"
 
-    r += rule("[+ name +]", "$(top_builddir)/config.status " + platform_sources(platform), """
-$(top_builddir)/config.status --file=-:""" + platform_sources(platform) + """ \
-  | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+    r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
+$(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
 chmod a+x [+ name +]
 """)
 

=== modified file 'grub-core/Makefile.am'
--- grub-core/Makefile.am	2010-08-22 15:30:22 +0000
+++ grub-core/Makefile.am	2010-08-29 11:13:07 +0000
@@ -235,8 +235,8 @@
 	$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
 	if grep "^#define HAVE_ASM_USCORE" $(top_builddir)/config.h; then u="_"; else u=""; fi; \
 	cat kernel_syms.input | grep -v '^#' | sed -n \
-	  -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$$u"'\1 kernel/;p;}' \
-	  -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/'"$$u"'\1 kernel/;p;}' \
+	  -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined '"$$u"'kernel \1/;p;}' \
+	  -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined '"$$u"' kernel \1/;p;}' \
 	  | sort -u >$@
 	rm -f kernel_syms.input
 CLEANFILES += kernel_syms.lst
@@ -256,61 +256,100 @@
 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
+CLEANFILES += fs.lst
+
+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: $(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: $(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: $(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: $(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: $(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
-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 > $@
-CLEANFILES += command.lst
-
-partmap.lst: $(PARTMAP_FILES)
-	cat $^ /dev/null | sort | uniq > $@
-CLEANFILES += partmap.lst
-
-handler.lst: $(HANDLER_FILES)
-	cat $^ /dev/null | sort | uniq > $@
-CLEANFILES += handler.lst
-
-terminal.lst: $(TERMINAL_FILES)
-	cat $^ /dev/null | sort | uniq > $@
-CLEANFILES += terminal.lst
-
-parttool.lst: $(PARTTOOL_FILES)
-	cat $^ /dev/null | sort | uniq > $@
-CLEANFILES += parttool.lst
-
-video.lst: $(VIDEO_FILES)
-	cat $^ /dev/null | sort | uniq > $@
 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
 
+syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
+	cat kernel_syms.lst > $@.new
+	for m in $(MODULE_FILES); do \
+	  sh $< $$m >> $@.new || exit 1; \
+	done
+	mv $@.new $@
+
 # generate global module dependencies list
-moddep.lst: kernel_syms.lst genmoddep.awk $(DEF_FILES) $(UND_FILES)
-	cat $(DEF_FILES) kernel_syms.lst /dev/null \
-	  | $(AWK) -f $(srcdir)/genmoddep.awk $(UND_FILES) > $@ \
-	  || (rm -f $@; exit 1)
+moddep.lst: syminfo.lst genmoddep.awk
+	cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
+platform_DATA += moddep.lst
+CLEANFILES += config.log syminfo.lst moddep.lst
+
+$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
+	sh $^ $@
+platform_DATA += $(MOD_FILES)
+CLEANFILES += $(MOD_FILES)
 
 if COND_i386_pc
 if COND_ENABLE_EFIEMU

=== modified file 'grub-core/Makefile.core.def'
--- grub-core/Makefile.core.def	2010-08-23 07:53:56 +0000
+++ grub-core/Makefile.core.def	2010-08-29 11:13:07 +0000
@@ -1403,3 +1403,13 @@
   name = datehook;
   common = hook/datehook.c;
 };
+
+script = {
+  name = gensyminfo.sh;
+  common = gensyminfo.sh.in;
+};
+
+script = {
+  name = genmod.sh;
+  common = genmod.sh.in;
+};

=== removed file 'grub-core/gencmdlist.sh'
--- grub-core/gencmdlist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/gencmdlist.sh	1970-01-01 00:00:00 +0000
@@ -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;}"
-

=== removed file 'grub-core/genfslist.sh'
--- grub-core/genfslist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genfslist.sh	1970-01-01 00:00:00 +0000
@@ -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

=== removed file 'grub-core/genhandlerlist.sh'
--- grub-core/genhandlerlist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genhandlerlist.sh	1970-01-01 00:00:00 +0000
@@ -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;}"

=== added file 'grub-core/genmod.sh.in'
--- grub-core/genmod.sh.in	1970-01-01 00:00:00 +0000
+++ grub-core/genmod.sh.in	2010-08-29 11:13:07 +0000
@@ -0,0 +1,73 @@
+#! /bin/sh -e
+#
+# Copyright (C) 2010 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.
+
+#
+# Example:
+#
+# genmod.sh moddep.lst normal.module echo.module
+#
+
+moddep=$1
+infile=$2
+outfile=$3
+
+tmpfile=${outfile}.tmp
+modname=`echo $infile | sed -e 's@\.module.*$@@'`
+
+if ! grep ^$modname: $moddep >/dev/null; then
+    echo "warning: moddep.lst has no dependencies for $modname" >&2
+    exit 0
+fi
+
+deps=`grep ^$modname: $moddep | sed s@^.*:@@`
+
+# remove old files if any
+rm -f $tmpfile $outfile
+
+# stripout .modname and .moddeps sections from input module
+objcopy -R .modname -R .moddeps $infile $tmpfile
+
+# Attach .modname and .moddeps sections
+t1=`mktemp`
+printf "$modname\0" >$t1
+
+t2=`mktemp`
+for dep in $deps; do printf "$dep\0" >> $t2; done
+
+if test -n "$deps"; then
+	objcopy --add-section .modname=$t1 --add-section .moddeps=$t2 $tmpfile
+else
+	objcopy --add-section .modname=$t1 $tmpfile
+fi
+rm -f $t1 $t2
+
+if test x@TARGET_APPLE_CC@ != x1; then
+	if ! test -z "@TARGET_OBJ2ELF@"; then
+	    ./@TARGET_OBJ2ELF@ $tmpfile || exit 1
+	fi
+	if test x@platform@ != xemu; then
+	    @STRIP@ --strip-unneeded \
+		-K grub_mod_init -K grub_mod_fini \
+		-K _grub_mod_init -K _grub_mod_fini \
+		-R .note -R .comment $tmpfile || exit 1
+	fi
+else
+# XXX Test these Apple CC fixes
+	cp $tmpfile $tmpfile.bin
+	@OBJCONV@ -f@TARGET_MODULE_FORMAT@ \
+	    -nr:_grub_mod_init:grub_mod_init \
+	    -nr:_grub_mod_fini:grub_mod_fini \
+	    -wd1106 -ew2030 -ew2050 -nu -nd $tmpfile.bin $tmpfile || exit 1
+	rm -f $name.bin
+fi
+mv $tmpfile $outfile

=== modified file 'grub-core/genmoddep.awk'
--- grub-core/genmoddep.awk	2010-06-03 06:22:33 +0000
+++ grub-core/genmoddep.awk	2010-08-29 11:13:07 +0000
@@ -11,23 +11,28 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Read defined symbols from stdin.
+# Read symbols' info from stdin.
 BEGIN {
+  error = 0
+  lineno = 0;
   while (getline <"/dev/stdin") {
-    symtab[$1] = $2
-  }
-}
-
-# The rest is undefined symbols.
-{
-  module = $2
-
-  if ($1 in symtab) {
-    modtab[module] = modtab[module] " " symtab[$1];
-  }
-  else if ($1 != "__gnu_local_gp") {
-    printf "%s in %s is not defined\n", $1, module >"/dev/stderr";
-    error++;
+    lineno++;
+    if ($1 == "defined") {
+      symtab[$3] = $2;
+      modtab[$2] = "" modtab[$2]
+    } else if ($1 == "undefined") {
+      if ($3 in symtab)
+	modtab[$2] = modtab[$2] " " symtab[$3];
+      else if ($3 != "__gnu_local_gp") {
+	printf "%s in %s is not defined\n", $3, $2 >"/dev/stderr";
+	error++;
+      }
+    }
+    else {
+      printf "error: %u: unrecognized input format\n", lineno;
+      error++;
+      break;
+    }
   }
 }
 

=== removed file 'grub-core/genmodsrc.sh'
--- grub-core/genmodsrc.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genmodsrc.sh	1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2002,2007  Free Software Foundation, Inc.
-#
-# This genmodsrc.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.
-
-set -e
-
-mod_name="$1"
-deps="$2"
-
-cat <<EOF
-/* This file is automatically generated by genmodsrc.sh. DO NOT EDIT! */
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2007 Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/dl.h>
-
-EOF
-
-echo "GRUB_MOD_NAME(${mod_name});"
-
-for mod in `grep "^${mod_name}:" ${deps} | sed 's/^[^:]*://'`; do
-  echo "GRUB_MOD_DEP(${mod});"
-done

=== removed file 'grub-core/genpartmaplist.sh'
--- grub-core/genpartmaplist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genpartmaplist.sh	1970-01-01 00:00:00 +0000
@@ -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

=== removed file 'grub-core/genparttoollist.sh'
--- grub-core/genparttoollist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genparttoollist.sh	1970-01-01 00:00:00 +0000
@@ -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;}"

=== added file 'grub-core/gensyminfo.sh.in'
--- grub-core/gensyminfo.sh.in	1970-01-01 00:00:00 +0000
+++ grub-core/gensyminfo.sh.in	2010-08-29 05:47:30 +0000
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+#
+# Copyright (C) 2010 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.
+
+#
+# Example:
+#
+# gensyms.sh normal.module
+#
+
+module=$1
+modname=`echo $module | sed -e 's@\.module.*$@@'`
+
+# Print all symbols defined by module
+if test x@TARGET_APPLE_CC@ = x1; then
+    @NM@ -g -P -p $module | \
+	grep -E '^[a-zA-Z0-9_]* [TDS]' | \
+	sed "s@^\([^ ]*\).*@defined $modname \1@g"
+else
+    @NM@ -g --defined-only -P -p $module | \
+	sed "s@^\([^ ]*\).*@defined $modname \1@g"
+fi
+
+# Print all undefined symbols used by module
+@NM@ -u -P -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"

=== removed file 'grub-core/genterminallist.sh'
--- grub-core/genterminallist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genterminallist.sh	1970-01-01 00:00:00 +0000
@@ -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;}" \

=== removed file 'grub-core/genvideolist.sh'
--- grub-core/genvideolist.sh	2010-05-06 06:04:04 +0000
+++ grub-core/genvideolist.sh	1970-01-01 00:00:00 +0000
@@ -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

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWf0ScgsAEuhfgHAwf////3//
3//////+YBue73ew820DnNfOd5MOuuU3vJ2gqybTZu2XVAqsim3E9jh13J12zzmy7ndqtmLpuz17
2HRKhcrdHXbKd2FVySqEkTSIGgU8mBoNE0lP0U9qbT01QaEbU9TyR6m1HlGIxNGEpGgCYTSamSPU
CnlPRGQbUaAZAAAAAAIqPKHqAyANBoaAxDQ0GmgA0AAAAASIgQhoRkjFTwJlNqbSeU2jEmQAAaep
oBoZNBFKMiYRTYj0IyZJgCjSPQxqj0aNRieptAADR6QKkkJiABGptBCYmET0ZGqPU9CAAAAADSaL
gQBUilTAL6EfuIdUKGZafso/OQHM1DwMm4msB/CMgY918YCaWiQhtwgCPPQQE9mogJgN0iCS4HLh
9I2chrlxS6ftfPriIpZL0U/zuXB7z64bPq6orMQM/uQ5r2XOrTnplbtV65UNO+3IuEy0/na1pNWi
69OxpSj3uq4Z3VFw4oHc84fUNLoPT8YphwS9xwPcf5Gjjmnh7OGniaIbYQNGzLrZrbPI7mK9lDFK
Y6rZVmsc442h0C4kpavERI4SzeTozDzejKNBlrMiS26/ceXZTcp0gTaO3BGu22mwZjU1MkRdyUrL
nEGGXmba0qQ1C2RjRFEb336xwvpJ469/hVF/sua2gOM61UetSkiIYUIQhgSGP0ODGeH4eHq469cG
+vfLvWpn+zQdvQsP+7FuXXfWVrFk7LpR++L3ugD+jDDKQ2A8c3LJ7/qR0txnqqvpV1o9t7y2s5zV
HJBPvtWQrmf23h60H+b+Q/xiXJfD7vT/OCHBiCWQ9xs98+Trw394lP24ijWdRvvi7e7vDG31B7L6
/waql8Cxw+WLDdR4JyTZL30B+U81vrSW1JNDbGxpsTaBsBjTaBtsQxhilF6gF6/Xy83t9TNPlkvR
u2Mro76Imj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dkO5S7t48hQ1J2JOZCzO0pQm55KBRlk4ToOo1jSykuin3G6pVoX4phB
+pB6vEp44xihnV88F2bs9xRFMEmCUfOVIRVDRzOWrSQ8Y3nnGLUa01sUi5YujZOUdUXPfKYUFBJ2
4KZLQ0Xu5zKu8A+6Ab2+MhlfCj495dxJ3jnCo2xC5S3BG44ROvZiuRONLke0DjJ2XP4UwiaKkxL4
52Ong+lvgpzrijjodXlhLm5W9ayrFjor1foRqk7Hrj4wfj9Z74OHAJc6TOWGCu45emQAZ0FNYEdQ
cgnnmmINBxBr4jTpVNx5JAVobB10Cc4eRXIwVJ6lhbbNyROF6NJ20+2p3RXYc1p2HaWShMTUGAli
PSHhAoRkiSDajViJJLUqvTg8b46XSH5mJzjBifJOIanbJ8PlD/64ICEHuPHH+kL+c/sXckU4UJD9
EnIL

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Build system improvements
  2010-08-29 12:15 [PATCH] Build system improvements BVK Chaitanya
@ 2010-08-29 13:07 ` KESHAV P.R.
  2010-08-29 14:09   ` BVK Chaitanya
  2010-08-29 13:56 ` BVK Chaitanya
  2010-09-02 20:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 1 reply; 6+ messages in thread
From: KESHAV P.R. @ 2010-08-29 13:07 UTC (permalink / raw)
  To: The development of GNU GRUB

One small question - is ruby still required to build grub2 from
mainline or newreloc? Currently I have included the following programs
as makedepends for my grub2-efi (using rev 2627 snapshot tarball, not
1.98 tarball) package in archlinux

ruby
bison
python (version 2, not 3)
binutils
autoconf'
automake
autogen
texinfo
ncurses
flex
help2man
gettext

All the packages have devel libraries included? Which of these
packages are "not needed" for the new automake build system?

Regards.

Keshav

On Sun, Aug 29, 2010 at 17:45, BVK Chaitanya <bvk.groups@gmail.com> wrote:
> Hi,
>
>
> Attached patch has few more improvements for automake build system:
>
> 1.  It removes the need to create def-* and und-* list files for
> creating moddep.lst
>
> 2.  It removes gencmdlist.sh, genfslist.sh etc. scripts and creates
> commands.lst files only using make rules.
>
> 3.  It uses objcopy command to add .modname and .moddeps sections to
> modules, and removes the need to create mod-* files.
>
> With these improvements, number of files created in grub build is
> brought down to 1500+ from earlier 3000+.
>
>
>
> --
> bvk.chaitanya
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Build system improvements
  2010-08-29 12:15 [PATCH] Build system improvements BVK Chaitanya
  2010-08-29 13:07 ` KESHAV P.R.
@ 2010-08-29 13:56 ` BVK Chaitanya
  2010-09-02 20:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 6+ messages in thread
From: BVK Chaitanya @ 2010-08-29 13:56 UTC (permalink / raw)
  To: The development of GRUB 2

Below are the build times gathered using "time make" command,  for
i386-pc platform on two different machines.  Summary is, these
improvements reduce build time up to 10 seconds.


* On 32-bit Intel Core Duo 2GHz with 2GB RAM

mainline:
  real    2m49.117s
  user    2m23.681s
  sys     0m30.058s

with-improvements:
  real    2m39.834s
  user    2m15.704s
  sys     0m26.222s

* On 64-bit AMD Dual Core 1.7GHz with 2GB RAM

mainline:
  real	2m36.829s
  user	1m31.506s
  sys	1m9.220s

with-improvements:
  real	2m23.771s
  user	1m25.109s
  sys	1m0.692s



-- 
bvk.chaitanya


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Build system improvements
  2010-08-29 13:07 ` KESHAV P.R.
@ 2010-08-29 14:09   ` BVK Chaitanya
  2010-08-29 14:17     ` KESHAV P.R.
  0 siblings, 1 reply; 6+ messages in thread
From: BVK Chaitanya @ 2010-08-29 14:09 UTC (permalink / raw)
  To: The development of GNU GRUB

On Sun, Aug 29, 2010 at 6:37 PM, KESHAV P.R. <skodabenz@gmail.com> wrote:
> One small question - is ruby still required to build grub2 from
> mainline or newreloc?

Ruby is not required for mainline anymore.  I am not sure newreloc
branch is syned with mainline yet, so it may need it.  You can look up
build requirements in the INSTALL file.

> Currently I have included the following programs
> as makedepends for my grub2-efi (using rev 2627 snapshot tarball, not
> 1.98 tarball) package in archlinux
>
> ruby
> bison
> python (version 2, not 3)
> binutils
> autoconf'
> automake
> autogen
> texinfo
> ncurses
> flex
> help2man
> gettext
>
> All the packages have devel libraries included? Which of these
> packages are "not needed" for the new automake build system?
>

Ruby is not needed. Python alone is sufficient, its devel variant is
not required.  Please look in INSTALL file.

Why do you say *not* python 3?  Did you see build failing with python
3? (I havn't tried it myself, just asking)



-- 
bvk.chaitanya


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Build system improvements
  2010-08-29 14:09   ` BVK Chaitanya
@ 2010-08-29 14:17     ` KESHAV P.R.
  0 siblings, 0 replies; 6+ messages in thread
From: KESHAV P.R. @ 2010-08-29 14:17 UTC (permalink / raw)
  To: The development of GNU GRUB

On Sun, Aug 29, 2010 at 19:39, BVK Chaitanya <bvk.groups@gmail.com> wrote:
> On Sun, Aug 29, 2010 at 6:37 PM, KESHAV P.R. <skodabenz@gmail.com> wrote:
>> One small question - is ruby still required to build grub2 from
>> mainline or newreloc?
>
> Ruby is not required for mainline anymore.  I am not sure newreloc
> branch is syned with mainline yet, so it may need it.  You can look up
> build requirements in the INSTALL file.
>

newreloc (https://code.launchpad.net/~skodabenz/grub/grub2-branch-newreloc)
is currently synced with mainline but experimental is still using the
old build system.

>> Currently I have included the following programs
>> as makedepends for my grub2-efi (using rev 2627 snapshot tarball, not
>> 1.98 tarball) package in archlinux
>>
>> ruby
>> bison
>> python (version 2, not 3)
>> binutils
>> autoconf'
>> automake
>> autogen
>> texinfo
>> ncurses
>> flex
>> help2man
>> gettext
>>
>> All the packages have devel libraries included? Which of these
>> packages are "not needed" for the new automake build system?
>>
>
> Ruby is not needed. Python alone is sufficient, its devel variant is
> not required.  Please look in INSTALL file.
>
> Why do you say *not* python 3?  Did you see build failing with python
> 3? (I havn't tried it myself, just asking)

Python 3 is supposed to be backward "incompatible" with python 2.
Thats why I asked. Are flex, bison and ncurses still needed for
mainline? In case you are interested, this is the grub2-efi package I
maintain http://aur.archlinux.org/packages.php?ID=40290 (PKGBUILD
http://aur.archlinux.org/packages/grub2-efi-bzr/grub2-efi-bzr/PKGBUILD
- build script for Archlinux similar to rpm spec file or deb rules
file).

Any progress on grub-extras support in the build system?

Regards.

Keshav


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Build system improvements
  2010-08-29 12:15 [PATCH] Build system improvements BVK Chaitanya
  2010-08-29 13:07 ` KESHAV P.R.
  2010-08-29 13:56 ` BVK Chaitanya
@ 2010-09-02 20:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-09-02 20:47 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

On 08/29/2010 02:15 PM, BVK Chaitanya wrote:
> Hi,
>
>
> Attached patch has few more improvements for automake build system:
>
> 1.  It removes the need to create def-* and und-* list files for
> creating moddep.lst
>
> 2.  It removes gencmdlist.sh, genfslist.sh etc. scripts and creates
> commands.lst files only using make rules.
>
> 3.  It uses objcopy command to add .modname and .moddeps sections to
> modules, and removes the need to create mod-* files.
>
> With these improvements, number of files created in grub build is
> brought down to 1500+ from earlier 3000+.
>
>   
Looks good. Can someone test it on non-standard environment?
>
>   
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-02 20:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-29 12:15 [PATCH] Build system improvements BVK Chaitanya
2010-08-29 13:07 ` KESHAV P.R.
2010-08-29 14:09   ` BVK Chaitanya
2010-08-29 14:17     ` KESHAV P.R.
2010-08-29 13:56 ` BVK Chaitanya
2010-09-02 20:47 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.