Add DESTDIR support (bug #200)
[asterisk/asterisk.git] / astman / Makefile
index 7b9d20f..476c491 100755 (executable)
@@ -8,7 +8,7 @@ all: depend $(TARGET)
 install:
        if [ "$(TARGET)" != "none" ]; then \
                for x in $(TARGET); do \
-                       install -m 755 $$x $(ASTSBINDIR)/astman; \
+                       install -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/astman; \
                done ; \
        fi
 
@@ -21,7 +21,9 @@ clean:
 astman: astman.o ../md5.o
        $(CC) -o astman astman.o ../md5.o -lnewt
 
+ifneq ($(wildcard .depend),)
 include .depend
+endif
 
 depend: .depend