All of lore.kernel.org
 help / color / mirror / Atom feed
From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] build binary tar.gz from source
Date: Wed, 08 Apr 2009 18:56:09 +0200	[thread overview]
Message-ID: <49DCD729.8020707@gmail.com> (raw)

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

Hello. Here is a patch to add new target distbin which creates a binary 
tar.gz. The main purpose is for the possible nightly builds
-- 

Regards
Vladimir 'phcoder' Serbinenko

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

diff --git a/ChangeLog b/ChangeLog
index c679982..1fd827a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-08  Vladimir Serbinenko  <phcoder@gmail.com>
+	
+	Creating binary tar.gz from compile directory
+
+	* Makefile.in (distbin): new target
+	(grub2.tar.gz): likewise
+
 2009-04-07  David S. Miller  <davem@davemloft.net>
 
 	* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
diff --git a/Makefile.in b/Makefile.in
index d6e55e7..a3c5d11 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -191,6 +191,81 @@ include_DATA += $(shell find $(srcdir)/include -name \*.h | sed -e "s,^$(srcdir)
 
 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
 
+distbin: grub2.tar.gz
+
+grub2.tar.gz: all
+	rm -rf tar
+	mkdir -p tar/$(includedir);
+	mkdir -p tar/$(pkglibdir);
+	mkdir -p tar/$(bindir);
+	mkdir -p tar/$(sbindir);
+	mkdir -p tar/$(pkgdatadir);
+	mkdir -p tar/$(mandir)/man1 ;
+	mkdir -p tar/$(mandir)/man8 ;
+	mkdir -p tar/$(sysconfdir)/grub.d;
+	@list='$(PKGLIB)'; \
+	for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  cp -d $$dir$$file tar/$(pkglibdir)/$$dest; \
+	done
+	@list='$(include_DATA)'; \
+	for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,include/,,'`"; \
+	  destdir="`echo $$dest | sed 's,\(^\|/\)[^/]*$$,,g'`"; \
+	  mkdir -p tar/$(includedir)/$$destdir; \
+	  cp -d $$dir$$file tar/$(includedir)/$$dest; \
+	done
+	@list='$(PKGDATA)'; \
+	for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  cp -d $$dir$$file tar/$(pkgdatadir)/$$dest; \
+	done
+	@list='$(bin_UTILITIES)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(bindir)/$$dest; \
+	  $(HELP2MAN) --section=1 $(builddir)/$$file > tar/$(mandir)/man1/$$dest.1; \
+	done
+	@list='$(sbin_UTILITIES)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(sbindir)/$$dest; \
+	  $(HELP2MAN) --section=8 $(builddir)/$$file > tar/$(mandir)/man1/$$dest.8; \
+	done
+	@list='$(bin_SCRIPTS)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(bindir)/$$dest; \
+	  $(HELP2MAN) --section=1 $(builddir)/$$file > tar/$(mandir)/man1/$$dest.1; \
+	done
+	@list='$(sbin_SCRIPTS)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(sbindir)/$$dest; \
+	  $(HELP2MAN) --section=8 $(builddir)/$$file > tar/$(mandir)/man1/$$dest.8; \
+	done
+	@list='$(grub-mkconfig_SCRIPTS)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(sysconfdir)/grub.d/$$dest; \
+	done
+	@list='$(grub-mkconfig_DATA)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  cp -d $$dir$$file tar/$(sysconfdir)/grub.d/$$dest; \
+	done
+	@list='$(lib_DATA)'; \
+	for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  cp -d $$dir$$file tar/$(libdir)/grub/$$dest; \
+	done
+	tar -czf $@ --transform 's,^tar/,,' tar/*
+	rm -rf tar
+
 install: install-local
 
 install-local: all

             reply	other threads:[~2009-04-08 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 16:56 phcoder [this message]
2009-04-08 17:01 ` [PATCH] build binary tar.gz from source Felix Zielcke
2009-04-08 17:07   ` phcoder

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=49DCD729.8020707@gmail.com \
    --to=phcoder@gmail.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.