All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build binary tar.gz from source
@ 2009-04-08 16:56 phcoder
  2009-04-08 17:01 ` Felix Zielcke
  0 siblings, 1 reply; 3+ messages in thread
From: phcoder @ 2009-04-08 16:56 UTC (permalink / raw)
  To: The development of GRUB 2

[-- 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

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

* Re: [PATCH] build binary tar.gz from source
  2009-04-08 16:56 [PATCH] build binary tar.gz from source phcoder
@ 2009-04-08 17:01 ` Felix Zielcke
  2009-04-08 17:07   ` phcoder
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Zielcke @ 2009-04-08 17:01 UTC (permalink / raw)
  To: The development of GRUB 2

Am Mittwoch, den 08.04.2009, 18:56 +0200 schrieb phcoder:
> 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

Why don't you just use `make DESTDIR=tar install'?

-- 
Felix Zielcke




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

* Re: [PATCH] build binary tar.gz from source
  2009-04-08 17:01 ` Felix Zielcke
@ 2009-04-08 17:07   ` phcoder
  0 siblings, 0 replies; 3+ messages in thread
From: phcoder @ 2009-04-08 17:07 UTC (permalink / raw)
  To: The development of GRUB 2

Felix Zielcke wrote:
> Am Mittwoch, den 08.04.2009, 18:56 +0200 schrieb phcoder:
>> 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
> 
> Why don't you just use `make DESTDIR=tar install'?
> 
Because I didn't know about this trick. Because of this trick this patch 
is useless. I withdraw it

-- 

Regards
Vladimir 'phcoder' Serbinenko



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

end of thread, other threads:[~2009-04-08 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 16:56 [PATCH] build binary tar.gz from source phcoder
2009-04-08 17:01 ` Felix Zielcke
2009-04-08 17:07   ` phcoder

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.