* [PATCH 0/4] user-cr: Makefile cleanups
@ 2010-02-26 18:56 Matt Helsley
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 18:56 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
Some minor fixes to the Makefile:
[PATCH 1/4] user-cr: Add install prefix
[PATCH 2/4] user-cr: Make directories during install
[PATCH 3/4] user-cr: Fix install rule dependencies
[PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines
Cheers,
-Matt Helsley
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] user-cr: Add install prefix
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-02-26 18:56 ` Matt Helsley
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 18:56 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
Add an install prefix rather than require setting both
BIN_INSTALL_DIR and LIB_INSTALL_DIR.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b312358..a8f426a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,9 @@ WARNS := -Wall -Wstrict-prototypes -Wno-trigraphs
CFLAGS += -g $(WARNS) $(CKPT_INCLUDE) $(DEBUG)
# install dir
-BIN_INSTALL_DIR = /bin
-LIB_INSTALL_DIR = /lib
+PREFIX ?= /usr/local
+BIN_INSTALL_DIR := $(PREFIX)/bin
+LIB_INSTALL_DIR := $(PREFIX)/lib
ECLONE_PROGS = restart nsexec
PROGS = checkpoint ckptinfo $(ECLONE_PROGS)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] user-cr: Make directories during install
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-02-26 18:56 ` Matt Helsley
2010-02-26 18:56 ` [PATCH 3/4] user-cr: Fix install rule dependencies Matt Helsley
2010-02-26 18:56 ` [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines Matt Helsley
2 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 18:56 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
This makes the directories needed to hold the installed files if they do not
already exist.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index a8f426a..e776857 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,7 @@ ckptinfo_types.c: $(CKPT_HEADERS) ckptinfo.py
cat $(CKPT_HEADERS) | ./ckptinfo.py > ckptinfo_types.c
install:
+ /usr/bin/install -d -D $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)
@echo /usr/bin/install -m 755 checkpoint restart nsexec ckptinfo $(BIN_INSTALL_DIR)
@/usr/bin/install -m 755 checkpoint restart ckptinfo nsexec $(BIN_INSTALL_DIR)
@echo /usr/bin/install -m 755 $(LIB_ECLONE) $(LIB_INSTALL_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] user-cr: Fix install rule dependencies
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 18:56 ` [PATCH 2/4] user-cr: Make directories during install Matt Helsley
@ 2010-02-26 18:56 ` Matt Helsley
2010-02-26 18:56 ` [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines Matt Helsley
2 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 18:56 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
Since we're installing these programs we need them to be built first.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index e776857..f8b113a 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ ckptinfo: ckptinfo_types.o
ckptinfo_types.c: $(CKPT_HEADERS) ckptinfo.py
cat $(CKPT_HEADERS) | ./ckptinfo.py > ckptinfo_types.c
-install:
+install: $(PROGS)
/usr/bin/install -d -D $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)
@echo /usr/bin/install -m 755 checkpoint restart nsexec ckptinfo $(BIN_INSTALL_DIR)
@/usr/bin/install -m 755 checkpoint restart ckptinfo nsexec $(BIN_INSTALL_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 18:56 ` [PATCH 2/4] user-cr: Make directories during install Matt Helsley
2010-02-26 18:56 ` [PATCH 3/4] user-cr: Fix install rule dependencies Matt Helsley
@ 2010-02-26 18:56 ` Matt Helsley
2 siblings, 0 replies; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 18:56 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
In Make, actions prefixed with @ do not produce output showing what
Make is executing. It seems rather silly to manually echo the precise
output Make would produce automatically without the @ prefix.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index f8b113a..a4a1a8a 100644
--- a/Makefile
+++ b/Makefile
@@ -69,10 +69,8 @@ ckptinfo_types.c: $(CKPT_HEADERS) ckptinfo.py
install: $(PROGS)
/usr/bin/install -d -D $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)
- @echo /usr/bin/install -m 755 checkpoint restart nsexec ckptinfo $(BIN_INSTALL_DIR)
- @/usr/bin/install -m 755 checkpoint restart ckptinfo nsexec $(BIN_INSTALL_DIR)
- @echo /usr/bin/install -m 755 $(LIB_ECLONE) $(LIB_INSTALL_DIR)
- @/usr/bin/install -m 755 $(LIB_ECLONE) $(LIB_INSTALL_DIR)
+ /usr/bin/install -m 755 checkpoint restart ckptinfo nsexec $(BIN_INSTALL_DIR)
+ /usr/bin/install -m 755 $(LIB_ECLONE) $(LIB_INSTALL_DIR)
$(CKPT_HEADERS): %:
./scripts/extract-headers.sh -s $(KERNELSRC) -o ./include
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] user-cr: Makefile cleanups
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 18:56 ` [PATCH 1/4] user-cr: Add install prefix Matt Helsley
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-02-26 19:09 ` Nathan Lynch
2010-02-26 19:44 ` [PATCH] user-cr: Makefile: Use standard variables Matt Helsley
2010-03-01 18:24 ` [PATCH 0/4] user-cr: Makefile cleanups Oren Laadan
4 siblings, 0 replies; 9+ messages in thread
From: Nathan Lynch @ 2010-02-26 19:09 UTC (permalink / raw)
To: Matt Helsley; +Cc: Linux-Containers
On Fri, 2010-02-26 at 10:56 -0800, Matt Helsley wrote:
> Some minor fixes to the Makefile:
>
> [PATCH 1/4] user-cr: Add install prefix
> [PATCH 2/4] user-cr: Make directories during install
> [PATCH 3/4] user-cr: Fix install rule dependencies
> [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines
ack 1-4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] user-cr: Makefile: Use standard variables
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2010-02-26 19:09 ` [PATCH 0/4] user-cr: Makefile cleanups Nathan Lynch
@ 2010-02-26 19:44 ` Matt Helsley
[not found] ` <92a207e405307fe1dc528f59e08782985830d5e9.1267213393.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-01 18:24 ` [PATCH 0/4] user-cr: Makefile cleanups Oren Laadan
4 siblings, 1 reply; 9+ messages in thread
From: Matt Helsley @ 2010-02-26 19:44 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux-Containers, Nathan Lynch
[Based on the previous series of Makefile patches]
These are standard variables which many cross compiler systems will setup.
I believe they are also variables Make sets up with default values.
Make also sets $(MAKE) so you don't accidentally mix make binaries in the
same build -- let's use that too.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
Makefile | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index a4a1a8a..60ddccd 100644
--- a/Makefile
+++ b/Makefile
@@ -34,10 +34,10 @@ LDLIBS = -lm
.PHONY: all distclean clean headers install
all: $(PROGS)
- @make -C test
+ @$(MAKE) -C test
$(LIB_ECLONE):
- ar ruv $(LIB_ECLONE) $^
+ $(AR) ruv $(LIB_ECLONE) $^
# restart needs to be thread-safe
restart: CFLAGS += -D__REENTRANT -pthread
@@ -82,4 +82,4 @@ distclean: clean
clean:
@rm -f $(PROGS) $(LIB_ECLONE) $(OTHER) *~ *.o headers.h
- @make -C test clean
+ @$(MAKE) -C test clean
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] user-cr: Makefile cleanups
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
` (3 preceding siblings ...)
2010-02-26 19:44 ` [PATCH] user-cr: Makefile: Use standard variables Matt Helsley
@ 2010-03-01 18:24 ` Oren Laadan
4 siblings, 0 replies; 9+ messages in thread
From: Oren Laadan @ 2010-03-01 18:24 UTC (permalink / raw)
To: Matt Helsley; +Cc: Linux-Containers, Nathan Lynch
Applied, thanks.
Matt Helsley wrote:
> Some minor fixes to the Makefile:
>
> [PATCH 1/4] user-cr: Add install prefix
> [PATCH 2/4] user-cr: Make directories during install
> [PATCH 3/4] user-cr: Fix install rule dependencies
> [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines
>
> Cheers,
> -Matt Helsley
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] user-cr: Makefile: Use standard variables
[not found] ` <92a207e405307fe1dc528f59e08782985830d5e9.1267213393.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-03-01 18:25 ` Oren Laadan
0 siblings, 0 replies; 9+ messages in thread
From: Oren Laadan @ 2010-03-01 18:25 UTC (permalink / raw)
To: Matt Helsley; +Cc: Linux-Containers, Nathan Lynch
Applied, thanks.
Matt Helsley wrote:
> [Based on the previous series of Makefile patches]
>
> These are standard variables which many cross compiler systems will setup.
> I believe they are also variables Make sets up with default values.
> Make also sets $(MAKE) so you don't accidentally mix make binaries in the
> same build -- let's use that too.
>
> Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> Makefile | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a4a1a8a..60ddccd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -34,10 +34,10 @@ LDLIBS = -lm
> .PHONY: all distclean clean headers install
>
> all: $(PROGS)
> - @make -C test
> + @$(MAKE) -C test
>
> $(LIB_ECLONE):
> - ar ruv $(LIB_ECLONE) $^
> + $(AR) ruv $(LIB_ECLONE) $^
>
> # restart needs to be thread-safe
> restart: CFLAGS += -D__REENTRANT -pthread
> @@ -82,4 +82,4 @@ distclean: clean
>
> clean:
> @rm -f $(PROGS) $(LIB_ECLONE) $(OTHER) *~ *.o headers.h
> - @make -C test clean
> + @$(MAKE) -C test clean
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-03-01 18:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 18:56 [PATCH 0/4] user-cr: Makefile cleanups Matt Helsley
[not found] ` <1267210602-11444-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 18:56 ` [PATCH 1/4] user-cr: Add install prefix Matt Helsley
[not found] ` <eef3af1ee39b3146facf08eac6230be041e6263d.1267210517.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 18:56 ` [PATCH 2/4] user-cr: Make directories during install Matt Helsley
2010-02-26 18:56 ` [PATCH 3/4] user-cr: Fix install rule dependencies Matt Helsley
2010-02-26 18:56 ` [PATCH 4/4] user-cr: Remove pointless echo lines and @-prefixed lines Matt Helsley
2010-02-26 19:09 ` [PATCH 0/4] user-cr: Makefile cleanups Nathan Lynch
2010-02-26 19:44 ` [PATCH] user-cr: Makefile: Use standard variables Matt Helsley
[not found] ` <92a207e405307fe1dc528f59e08782985830d5e9.1267213393.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-01 18:25 ` Oren Laadan
2010-03-01 18:24 ` [PATCH 0/4] user-cr: Makefile cleanups Oren Laadan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox