[PATCH 2/4] Install cgcc on "make install", refactor installation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Pavel Roskin <proski@xxxxxxx>

Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---

 Makefile |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index da4a47a..61c7953 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ CFLAGS += -DDEBUG
 PREFIX=$(HOME)
 BINDIR=$(PREFIX)/bin
 PROGRAMS=test-lexing test-parsing obfuscate compile graph sparse test-linearize example test-unssa test-dissect
+INST_PROGRAMS=sparse cgcc
 
 LIB_H=    token.h parse.h lib.h symbol.h scope.h expression.h target.h \
 	  linearize.h bitmap.h ident-list.h compat.h flow.h allocate.h \
@@ -39,8 +40,10 @@ LIBS=$(LIB_FILE)
 
 all: $(PROGRAMS) $(SLIB_FILE)
 
-install: sparse $(SLIB_FILE) bin-dir
-	if test $< -nt $(BINDIR)/sparse ; then install -v $< $(BINDIR)/sparse ; install -v $(SLIB_FILE) $(BINDIR) ; fi
+install: $(INST_PROGRAMS) $(SLIB_FILE) bin-dir
+	for f in $(INST_PROGRAMS) $(SLIB_FILE); do \
+		install -v $$f $(BINDIR)/$$f || exit 1; \
+	done
 
 bin-dir:
 	@if ! test -d $(BINDIR); then \
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux