Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -4,10 +4,11 @@ LDFLAGS = $(TCL_LDFLAGS) LIBS = $(shell $(PKG_CONFIG) --libs fuse) $(shell $(PKG_CONFIG) --libs sqlite3) $(TCL_LIBS) PREFIX = /usr/local prefix = $(PREFIX) bindir = $(prefix)/bin +sbindir = $(prefix)/sbin ifneq ($(TCLKIT_SDK_DIR),) TCLCONFIG_SH_PATH = $(TCLKIT_SDK_DIR)/lib/tclConfig.sh TCL_LDFLAGS = -Wl,-R,$(TCLKIT_SDK_DIR)/lib export TCLKIT_SDK_DIR @@ -28,14 +29,15 @@ appfsd.tcl.h: appfsd.tcl sed 's@[\\"]@\\&@g;s@^@ "@;s@$$@\\n"@' appfsd.tcl > appfsd.tcl.h.new mv appfsd.tcl.h.new appfsd.tcl.h install: appfsd - cp appfsd $(bindir) + if [ ! -d '$(DESTDIR)$(sbindir)' ]; then mkdir -p '$(DESTDIR)$(sbindir)'; chmod 755 '$(DESTDIR)$(sbindir)'; fi + cp appfsd '$(DESTDIR)$(sbindir)/' clean: rm -f appfsd appfsd.o rm -f appfsd.tcl.h distclean: clean .PHONY: all test clean distclean install