All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: grub-devel@gnu.org
Subject: [PATCH] Remove framework for external modules
Date: Tue, 25 Aug 2009 23:13:17 +0200	[thread overview]
Message-ID: <20090825211317.GA23440@thorin> (raw)

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


My bad...

When I proposed adding a framework for building GRUB modules externally, I
was expecting it would end up being used.  I had grub-extras in mind.

But it became much simpler and straightforwarded to build grub-extras by
overlaiing it into GRUB tree and doing a one-line change in GRUB Makefile.in.

So I wonder if there's anyone reliing on this.  I believe there isn't, and I
noticed that it's a nuissance because it installs headers in /usr/include which
may later be dragged in to a newer version of GRUB, causing breakage.

So I admit having a bad idea and propose to undo it.  Maintaining features is
costly, we should only maintain features that are useful.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: remove_external_module_framework.diff --]
[-- Type: text/x-diff, Size: 2905 bytes --]

2009-08-25  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (PKGLIB): Remove $(pkglib_BUILDDIR).
	(pkglib_BUILDDIR): Remove.
	(build_env.mk): Remove.
	(include_DATA): Remove.
	(install-local): Stop installing $(include_DATA) files in
	$(includedir).

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 2531)
+++ Makefile.in	(working copy)
@@ -117,7 +117,7 @@
 MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
 
 PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
-	$(pkglib_DATA) $(pkglib_BUILDDIR)
+	$(pkglib_DATA)
 PKGDATA = $(pkgdata_DATA)
 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \
@@ -186,26 +186,6 @@
 endif
 endif
 
-# Used for building modules externally
-pkglib_BUILDDIR += build_env.mk
-build_env.mk: Makefile
-	(\
-	echo "TARGET_CC=$(TARGET_CC)" ; \
-	echo "TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
-	echo "TARGET_ASFLAGS=$(TARGET_ASFLAGS)" ; \
-	echo "TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir) -I$(includedir)" ; \
-	echo "STRIP=$(STRIP)" ; \
-	echo "OBJCONV=$(OBJCONV)" ; \
-	echo "TARGET_MODULE_FORMAT=$(TARGET_MODULE_FORMAT)" ; \
-	echo "TARGET_APPLE_CC=$(TARGET_APPLE_CC)" ; \
-	echo "COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
-	echo "COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
-	echo "COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
-	) > $@
-pkglib_BUILDDIR += config.h grub_script.tab.h
-include_DATA += $(shell find $(srcdir)/include -name \*.h | sed -e "s,^$(srcdir)/,,g") \
-	include/grub/cpu include/grub/machine
-
 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
 
 install: install-local
@@ -219,20 +199,6 @@
 	  dest="`echo $$file | sed 's,.*/,,'`"; \
 	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
 	done
-	$(SHELL) $(mkinstalldirs) $(DESTDIR)$(includedir)
-	@list='$(include_DATA)'; \
-	for file in $$list; do \
-	  if test -e "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
-	  dest="`echo $$file | sed 's,include/,,'`"; \
-	  destdir="`echo $$dest | sed 's,[^/]*$$,,g'`"; \
-	  $(SHELL) $(mkinstalldirs) $(DESTDIR)$(includedir)/$$destdir; \
-	  if test -f "$$dir$$file"; then \
-	    $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(includedir)/$$dest; \
-	  elif test -L "$$dir$$file"; then \
-	    rm -rf $(DESTDIR)$(includedir)/$$dest && \
-	    cp -fR $$dir$$file $(DESTDIR)$(includedir)/$$dest; \
-	  fi; \
-	done
 	$(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
 	@list='$(PKGDATA)'; \
 	for file in $$list; do \
@@ -313,11 +279,6 @@
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
 	done
-	@list='$(include_DATA)'; \
-	for file in $$list; do \
-	  dest="`echo $$file | sed 's,include/,,'`"; \
-	  rm -f $(DESTDIR)$(includedir)/$$dest; \
-	done
 	@list='$(lib_SCRIPTS)'; \
 	for file in $$list; do \
 	  dest="`echo $$file | sed 's,.*/,,'`"; \

             reply	other threads:[~2009-08-25 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25 21:13 Robert Millan [this message]
2009-08-27  4:20 ` [PATCH] Remove framework for external modules Joe Auricchio
2009-08-28 12:48   ` Robert Millan
2009-08-28 14:04     ` Vladimir 'phcoder' Serbinenko
2009-08-28 16:07       ` Robert Millan
2009-08-28 15:41     ` Vladimir 'phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090825211317.GA23440@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.