8c6b1ac
From eec4237a3265b024cc97d3cd287bdea7cd187f48 Mon Sep 17 00:00:00 2001
78a3d7d
From: Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
Date: Tue, 21 Jan 2014 20:54:09 +0400
8c6b1ac
Subject: [PATCH 039/506] add GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime
78a3d7d
 files
78a3d7d
78a3d7d
Not all toolkits provide static libraries. This patch enables creation of self
78a3d7d
contained distribution that does not require pre-existing runtime libraries.
78a3d7d
Intended usage is
78a3d7d
78a3d7d
export GRUB_WINDOWS_EXTRA_DIST="/path/to/liblzma.dll /path/to/libintl.dll"
78a3d7d
make
78a3d7d
make windowszip
78a3d7d
78a3d7d
As those libraries and locations are dependent on toolchain in use, trying
78a3d7d
to autodetect them is likely impossible. So just provide a simple way to
78a3d7d
package everything in one step.
78a3d7d
78a3d7d
Also remove $(windowsdir) after ZIP was created same as other "make dist"
78a3d7d
targets.
78a3d7d
---
78a3d7d
 ChangeLog   | 5 +++++
78a3d7d
 Makefile.am | 4 ++++
78a3d7d
 2 files changed, 9 insertions(+)
78a3d7d
78a3d7d
diff --git a/ChangeLog b/ChangeLog
011fe81
index 3ba57ae..1ede370 100644
78a3d7d
--- a/ChangeLog
78a3d7d
+++ b/ChangeLog
78a3d7d
@@ -1,5 +1,10 @@
78a3d7d
 2014-01-21  Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
 
78a3d7d
+	* Makefile.am: Allow adding extra files to generated Windows ZIP
78a3d7d
+	archive by setting GRUB_WINDOWS_EXTRA_DIST.
78a3d7d
+
78a3d7d
+2014-01-21  Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
+
78a3d7d
 	* configure.ac: Look for DejaVuSans also in /usr/share/fonts/truetype.
78a3d7d
 	Show detected font path in summary.
78a3d7d
 
78a3d7d
diff --git a/Makefile.am b/Makefile.am
78a3d7d
index 97c062d..f02ae0a 100644
78a3d7d
--- a/Makefile.am
78a3d7d
+++ b/Makefile.am
78a3d7d
@@ -420,10 +420,14 @@ windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
78a3d7d
 	for x in $(starfield_DATA); do \
78a3d7d
 		cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
78a3d7d
 	done
78a3d7d
+	for x in $(GRUB_WINDOWS_EXTRA_DIST); do \
78a3d7d
+		cp -fp $$x $(windowsdir); \
78a3d7d
+	done
78a3d7d
 
78a3d7d
 windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
78a3d7d
 windowszip: windowsdir
78a3d7d
 	test -f $(windowszip) && rm $(windowszip) || true
78a3d7d
 	zip -r $(windowszip) $(windowsdir)
78a3d7d
+	rm -rf $(windowsdir)
78a3d7d
 
78a3d7d
 EXTRA_DIST += linguas.sh
78a3d7d
-- 
8c6b1ac
2.4.3
78a3d7d