* build-sys: do not depend on check_rundir for executables
@ 2014-10-04 17:27 Michael Tokarev
2014-10-04 20:58 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2014-10-04 17:27 UTC (permalink / raw)
To: linux-raid
The problem is that the link lines will always be executed
even if the executables are up to date.
If anything, this check_rundir should be a dependency of
install target, or some other "phony" target like this,
since check_rundir is phony by itself.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
--- a/Makefile
+++ b/Makefile
@@ -172,7 +172,7 @@ everything-test: all mdadm.static swap_super test_stripe \
# mdadm.uclibc and mdassemble.uclibc don't work on x86-64
# mdadm.tcc doesn't work..
-mdadm : check_rundir $(OBJS)
+mdadm : $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
mdadm.static : $(OBJS) $(STATICOBJS)
@@ -195,7 +195,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
$(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
# use '-z now' to guarantee no dynamic linker interactions with the monitor thread
-mdmon : check_rundir $(MON_OBJS)
+mdmon : $(MON_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
msg.o: msg.c msg.h
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: build-sys: do not depend on check_rundir for executables
2014-10-04 17:27 build-sys: do not depend on check_rundir for executables Michael Tokarev
@ 2014-10-04 20:58 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2014-10-04 20:58 UTC (permalink / raw)
To: Michael Tokarev; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 2450 bytes --]
On Sat, 04 Oct 2014 21:27:08 +0400 Michael Tokarev <mjt@tls.msk.ru> wrote:
> The problem is that the link lines will always be executed
> even if the executables are up to date.
>
> If anything, this check_rundir should be a dependency of
> install target, or some other "phony" target like this,
> since check_rundir is phony by itself.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>
> --- a/Makefile
> +++ b/Makefile
> @@ -172,7 +172,7 @@ everything-test: all mdadm.static swap_super test_stripe \
> # mdadm.uclibc and mdassemble.uclibc don't work on x86-64
> # mdadm.tcc doesn't work..
>
> -mdadm : check_rundir $(OBJS)
> +mdadm : $(OBJS)
> $(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
>
> mdadm.static : $(OBJS) $(STATICOBJS)
> @@ -195,7 +195,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
> $(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
>
> # use '-z now' to guarantee no dynamic linker interactions with the monitor thread
> -mdmon : check_rundir $(MON_OBJS)
> +mdmon : $(MON_OBJS)
> $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
> msg.o: msg.c msg.h
>
>
Thanks for the report... I might fix it like this.
NeilBrown
diff --git a/Makefile b/Makefile
index f058a22ee2dc..a7d8c5c1b7fa 100644
--- a/Makefile
+++ b/Makefile
@@ -153,7 +153,7 @@ ASSEMBLE_SRCS += $(ASSEMBLE_AUTO_SRCS)
ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
endif
-all : check_rundir mdadm mdmon
+all : mdadm mdmon
man : mdadm.man md.man mdadm.conf.man mdmon.man raid6check.man
check_rundir:
@@ -172,7 +172,7 @@ everything-test: all mdadm.static swap_super test_stripe \
# mdadm.uclibc and mdassemble.uclibc don't work on x86-64
# mdadm.tcc doesn't work..
-mdadm : check_rundir $(OBJS)
+mdadm : $(OBJS) | check_rundir
$(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
mdadm.static : $(OBJS) $(STATICOBJS)
@@ -195,7 +195,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
$(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
# use '-z now' to guarantee no dynamic linker interactions with the monitor thread
-mdmon : check_rundir $(MON_OBJS)
+mdmon : $(MON_OBJS) | check_rundir
$(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
msg.o: msg.c msg.h
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-04 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-04 17:27 build-sys: do not depend on check_rundir for executables Michael Tokarev
2014-10-04 20:58 ` NeilBrown
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).