Use AC_PROG_INSTALL to find a usable install

Thanks to LeftWing aka Joshua M. Clulow. This patch is based on his work.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2067 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-07-05 16:35:48 +00:00
parent b667c0ed96
commit eb307ddc6f
5 changed files with 124 additions and 10 deletions
+7 -3
View File
@@ -26,6 +26,10 @@ MODDIR := @MODDIR@
DATADIR := @DATADIR@
LIBZNC := @LIBZNC@
LIBZNCDIR:= @LIBZNCDIR@
INSTALL := @INSTALL@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_SCRIPT := @INSTALL_SCRIPT@
INSTALL_DATA := @INSTALL_DATA@
TCL_FLAGS:= @TCL_FLAGS@
@@ -86,7 +90,7 @@ CLEAN := *.so extra/*.so
all: $(TARGETS)
install: all create_install_dir install_metadirs $(PERLHOOK) $(TCLHOOK)
install -m 0755 $(TARGETS) $(DESTDIR)$(MODDIR)
$(INSTALL_PROGRAM) $(TARGETS) $(DESTDIR)$(MODDIR)
create_install_dir:
mkdir -p $(DESTDIR)$(MODDIR)
@@ -111,12 +115,12 @@ clean:
modperl_install: create_install_dir
for i in $(srcdir)/*.pm; do \
install -m 0644 $$i $(DESTDIR)$(MODDIR); \
$(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \
done
modtcl_install:
mkdir -p $(DESTDIR)$(DATADIR)/modtcl/
install -m 0644 $(srcdir)/extra/modtcl.tcl $(srcdir)/extra/binds.tcl $(DESTDIR)$(DATADIR)/modtcl/
$(INSTALL_DATA) $(srcdir)/extra/modtcl.tcl $(srcdir)/extra/binds.tcl $(DESTDIR)$(DATADIR)/modtcl/
uninstall:
# Yes, we are lazy, just remove everything in there