diff mbox

[2/3] build: add an all-installable target that builds the targets to install.

Message ID 1302692766-30217-2-git-send-email-flameeyes@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Diego Elio Pettenò April 13, 2011, 11:06 a.m. UTC
This is useful for distributions that don't want to build content that
won't be installed.
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Josh Triplett April 13, 2011, 6:34 p.m. UTC | #1
On Wed, Apr 13, 2011 at 01:06:05PM +0200, Diego Elio Pettenò wrote:
> This is useful for distributions that don't want to build content that
> won't be installed.
> ---
>  Makefile |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index e08143a..ffb513f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -118,7 +118,9 @@ SED_PC_CMD = 's|@version@|$(VERSION)|g;		\
>  
>  all: $(PROGRAMS) sparse.pc
>  
> -install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
> +all-installable: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
> +
> +install: all-installable
>  	$(Q)install -d $(DESTDIR)$(BINDIR)
>  	$(Q)install -d $(DESTDIR)$(LIBDIR)
>  	$(Q)install -d $(DESTDIR)$(MAN1DIR)

Why not just "make install" instead?  You don't have to separately make
and make install; make install will build all the installed programs and
then install them.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Diego Elio Pettenò April 13, 2011, 6:35 p.m. UTC | #2
Il giorno mer, 13/04/2011 alle 11.34 -0700, Josh Triplett ha scritto:
> 
> Why not just "make install" instead?  You don't have to separately
> make
> and make install; make install will build all the installed programs
> and
> then install them. 

Most distributions – including Gentoo – prefer running the steps
separately, adding safety checks between one step and the other.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index e08143a..ffb513f 100644
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,9 @@  SED_PC_CMD = 's|@version@|$(VERSION)|g;		\
 
 all: $(PROGRAMS) sparse.pc
 
-install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
+all-installable: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
+
+install: all-installable
 	$(Q)install -d $(DESTDIR)$(BINDIR)
 	$(Q)install -d $(DESTDIR)$(LIBDIR)
 	$(Q)install -d $(DESTDIR)$(MAN1DIR)