linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] install a static build
@ 2006-05-27 10:08 Dirk Jagdmann
  2006-05-27 13:48 ` Luca Berra
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Jagdmann @ 2006-05-27 10:08 UTC (permalink / raw)
  To: linux-raid

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

Hello developers,

after building my static mdadm I wanted to install it via "make
install", but had to tweak the Makefile a little. However my approach
is not the best, since I had to remove the "rmconf" target for the
static build, issue a "cp" of the mdadm.static binary and my patch
might interfere with the "everything" target :-(

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org

[-- Attachment #2: staticinstall.patch --]
[-- Type: application/octet-stream, Size: 652 bytes --]

Index: mdadm-2.5/Makefile
===================================================================
--- mdadm-2.5.orig/Makefile
+++ mdadm-2.5/Makefile
@@ -84,12 +84,14 @@ all : mdadm mdadm.man md.man mdadm.conf.
 everything: all mdadm.static mdadm.uclibc swap_super test_stripe  mdassemble mdassemble.uclibc mdassemble.static mdassemble.man
 # mdadm.tcc doesn't work..
 
-mdadm : rmconf $(OBJS)
+mdadm : $(OBJS)
 	$(CC) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
 
 mdadm.static : STATIC=-DSTATIC
 mdadm.static : rmconf $(OBJS) SHA1.o sha1.o
 	$(CC) $(LDFLAGS) -DSTATIC -static -o mdadm.static $(OBJS) SHA1.o sha1.o
+	cp -f $@ mdadm
+
 rmconf:
 	rm -f config.o
 

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

* Re: [patch] install a static build
  2006-05-27 10:08 [patch] install a static build Dirk Jagdmann
@ 2006-05-27 13:48 ` Luca Berra
  2006-05-27 22:19   ` Dirk Jagdmann
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Berra @ 2006-05-27 13:48 UTC (permalink / raw)
  To: linux-raid

On Sat, May 27, 2006 at 12:08:19PM +0200, Dirk Jagdmann wrote:
>Hello developers,
>
>after building my static mdadm I wanted to install it via "make
>install", but had to tweak the Makefile a little. However my approach
>is not the best, since I had to remove the "rmconf" target for the
>static build, issue a "cp" of the mdadm.static binary and my patch
>might interfere with the "everything" target :-(
>
maybe you better add an install-static target.

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

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

* Re: [patch] install a static build
  2006-05-27 13:48 ` Luca Berra
@ 2006-05-27 22:19   ` Dirk Jagdmann
  2006-05-29  2:24     ` Neil Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Jagdmann @ 2006-05-27 22:19 UTC (permalink / raw)
  To: linux-raid

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

Hello Luca,

> maybe you better add an install-static target.

you're right, that would be a cleaner approach. I've don so, and while
doing so added install-tcc, install-ulibc, install-klibc too.

And while I'm busy in the Makefile anyway I've made a third patch
which adds the uninstall: target too.

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org

[-- Attachment #2: staticinstall.patch --]
[-- Type: application/octet-stream, Size: 1125 bytes --]

Index: mdadm-2.5/Makefile
===================================================================
--- mdadm-2.5.orig/Makefile	2006-05-28 00:05:06.000000000 +0200
+++ mdadm-2.5/Makefile	2006-05-28 00:11:44.000000000 +0200
@@ -143,8 +143,22 @@
 SHA1.o : SHA1.c
 	$(CC) $(CFLAGS) -DHAVE_STDINT_H -o SHA1.o -c SHA1.c
 
-install : mdadm mdadm.8 md.4 mdadm.conf.5
+install : mdadm install-man
 	$(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
+
+install-static : mdadm.static install-man
+	$(INSTALL) -D $(STRIP) -m 755 mdadm.static $(DESTDIR)$(BINDIR)/mdadm
+
+install-tcc : mdadm.tcc install-man
+	$(INSTALL) -D $(STRIP) -m 755 mdadm.tcc $(DESTDIR)$(BINDIR)/mdadm
+
+install-uclibc : mdadm.uclibc install-man
+	$(INSTALL) -D $(STRIP) -m 755 mdadm.uclibc $(DESTDIR)$(BINDIR)/mdadm
+
+install-klibc : mdadm.klibc install-man
+	$(INSTALL) -D $(STRIP) -m 755 mdadm.klibc $(DESTDIR)$(BINDIR)/mdadm
+
+install-man: mdadm.8 md.4 mdadm.conf.5
 	$(INSTALL) -D -m 644 mdadm.8 $(DESTDIR)$(MAN8DIR)/mdadm.8
 	$(INSTALL) -D -m 644 md.4 $(DESTDIR)$(MAN4DIR)/md.4
 	$(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5

[-- Attachment #3: uninstall.patch --]
[-- Type: application/octet-stream, Size: 692 bytes --]

Index: mdadm-2.5/Makefile
===================================================================
--- mdadm-2.5.orig/Makefile	2006-05-28 00:09:38.000000000 +0200
+++ mdadm-2.5/Makefile	2006-05-28 00:11:08.000000000 +0200
@@ -163,6 +163,9 @@
 	$(INSTALL) -D -m 644 md.4 $(DESTDIR)$(MAN4DIR)/md.4
 	$(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
 
+uninstall:
+	rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 md.4 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
+
 clean : 
 	rm -f mdadm $(OBJS) core *.man mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
 	mdassemble mdassemble.static mdassemble.uclibc mdassemble.klibc swap_super \

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

* Re: [patch] install a static build
  2006-05-27 22:19   ` Dirk Jagdmann
@ 2006-05-29  2:24     ` Neil Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Brown @ 2006-05-29  2:24 UTC (permalink / raw)
  To: Dirk Jagdmann; +Cc: linux-raid

On Sunday May 28, jagdmann@gmail.com wrote:
> Hello Luca,
> 
> > maybe you better add an install-static target.
> 
> you're right, that would be a cleaner approach. I've don so, and while
> doing so added install-tcc, install-ulibc, install-klibc too.
> 
> And while I'm busy in the Makefile anyway I've made a third patch
> which adds the uninstall: target too.
> 
> -- 
> ---> Dirk Jagdmann
> ----> http://cubic.org/~doj
> -----> http://llg.cubic.org

thanks for these.  
They are now in my git tree:
  http://neil.brown.name/cgi-bin/gitweb.cgi?p=mdadm
  git://neil.brown.name/mdadm
  
They claim me as their author I'm afraid.. I'll have to fix my scripts
to get it right next time :-(

NeilBrown

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

end of thread, other threads:[~2006-05-29  2:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 10:08 [patch] install a static build Dirk Jagdmann
2006-05-27 13:48 ` Luca Berra
2006-05-27 22:19   ` Dirk Jagdmann
2006-05-29  2:24     ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).