Build safe_asterisk script substituting the proper path in (bug #4952, patch not...
[asterisk/asterisk.git] / Makefile
index 737ea8e..e565d6b 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -598,7 +598,7 @@ bininstall: all
        install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
        install -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/     
        if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
-               install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
+               cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
        fi
        for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
        install -d $(DESTDIR)$(ASTHEADERDIR)