changeset 705:93c09e025180 trunk

[svn] - more intelligently handle directory creation
author nenolod
date Sun, 26 Feb 2006 15:39:06 -0800
parents f16636c12b55
children f520a0abddbc
files mk/objective.mk
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mk/objective.mk	Sun Feb 26 15:29:28 2006 -0800
+++ b/mk/objective.mk	Sun Feb 26 15:39:06 2006 -0800
@@ -13,14 +13,18 @@
 INCLUDEDIR = $(pkgincludedir)
 CFLAGS += -DHAVE_CONFIG_H
 
+OBJ_DIRS = $(BINDIR) $(LIBDIR) $(INCLUDEDIR)
+
 default: all
 all: build
 
 install:
 	$(MAKE) install-prehook
-	$(INSTALL) -d -m 755 $(DESTDIR)/$(BINDIR)
-	$(INSTALL) -d -m 755 $(DESTDIR)/$(LIBDIR)
-	$(INSTALL) -d -m 755 $(DESTDIR)/$(INCLUDEDIR)
+	@if test ! -d $(DESTDIR)/$(BINDIR); then \
+		for i in $(OBJ_DIRS); do \
+			$(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
+		done; \
+	fi
 	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[installing subobjective: $$i]"; \