aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorPavel Roskin <proski@gnu.org>2006-11-03 17:17:04 -0500
committerJosh Triplett <josh@freedesktop.org>2006-11-06 10:37:59 -0800
commit619a407197089ab6110e4fd3a857df04005f2a34 (patch)
tree6ae9e1e63467c2931c941052864cd910258be0d4 /Makefile
parent595e510572aeee3bc1a185c043d5f0a1c9a0023b (diff)
downloadsparse-dev-619a407197089ab6110e4fd3a857df04005f2a34.tar.gz
Install cgcc on "make install", refactor installation code
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index da4a47a6..61c7953d 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 \