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."
2009-08-25  Robert Millan  <r...@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,.*/,,'`"; \
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to