aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2015-10-19 13:46:51 +0200
committerPaweł Chmielowski <pchmielowski@process-one.net>2015-10-19 13:47:01 +0200
commit97a93263c14aec7bfcddf995160c153947f9bfba (patch)
tree2662cb345cf1a6bf2c7346d29abadb6d7cc54a4f /Makefile.in
parentejabberd_listener: Fix ETS update on port reuse (diff)
Make install should work even without having DESTDIR set
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index c5f2b2d0f..57f355cb1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -17,6 +17,9 @@ BINDIR = $(DESTDIR)@bindir@
# /sbin/
SBINDIR = $(DESTDIR)@sbindir@
+# /lib/
+LIBDIR = $(DESTDIR)@libdir@
+
# /lib/ejabberd/
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
@@ -109,7 +112,7 @@ spec:
$(ERL) -noinput +B -pa ebin -pa deps/*/ebin -eval \
'case xml_gen:compile("tools/xmpp_codec.spec") of ok -> halt(0); _ -> halt(1) end.'
-TO_DEST=$(foreach path,$(1),$(if $(filter deps/%,$(path)),$(patsubst deps/%,$(DESTDIR)/lib/%,$(path)),$(patsubst %,$(DESTDIR)/lib/ejabberd/%,$(path))))
+TO_DEST=$(foreach path,$(1),$(if $(filter deps/%,$(path)),$(patsubst deps/%,$(LIBDIR)/%,$(path)),$(patsubst %,$(LIBDIR)/ejabberd/%,$(path))))
FILTER_DIRS=$(foreach path,$(1),$(if $(wildcard $(path)/*),,$(path)))
FILES_WILDCARD=$(call FILTER_DIRS,$(foreach w,$(1),$(wildcard $(w))))
@@ -130,7 +133,7 @@ $(foreach file,$(DEPS_FILES_FILTERED) $(MAIN_FILES),$(eval $(call COPY_template,
$(call TO_DEST,$(MAIN_DIRS) $(DEPS_DIRS)):
$(INSTALL) -d $@
-$(call TO_DEST,deps/p1_pam/priv/bin/epam): $(DESTDIR)/lib/%: deps/% $(call TO_DEST,deps/p1_pam/priv/bin/)
+$(call TO_DEST,deps/p1_pam/priv/bin/epam): $(LIBDIR)/%: deps/% $(call TO_DEST,deps/p1_pam/priv/bin/)
$(INSTALL) -m 750 $(O_USER) $< $@
copy-files: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES))