summaryrefslogtreecommitdiff
path: root/src/devtools/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/devtools/Makefile')
-rw-r--r--src/devtools/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/devtools/Makefile b/src/devtools/Makefile
index e357675..18f1518 100644
--- a/src/devtools/Makefile
+++ b/src/devtools/Makefile
@@ -4,13 +4,21 @@ DESTDIR=
#prefix=/usr/local
prefix=/usr
exec_prefix=$(prefix)
-datarootdir=$(prefix)/share
-
bindir=$(exec_prefix)/bin
sbindir=$(exec_prefix)/sbin
+#libexecdir=$(exec_prefix)/libexec
+libexecdir=$(exec_prefix)/lib
+
+datarootdir=$(prefix)/share
datadir=$(datarootdir)
+#sysconfdir=$(prefix)/etc
+sysconfdir=/etc
+
+docdir=$(datarootdir)/doc
+
+################################################################################
-pkgdatadir=$(datadir)/devtools
+pkglibexecdir=$(libexecdir)/libretools
devtoolsdir=../../../devtools-par
@@ -47,7 +55,7 @@ build: \
lib/common.sh \
lib/makechrootpkg.sh
-edit = sed -e 's|m4_include(lib/\(.*\))|. @pkgdatadir@/\1|' -e "s|@pkgdatadir[@]|$(pkgdatadir)|g"
+edit = sed -e 's|m4_include(lib/\(.*\))|. $$(librelib \1)|'
indent = emacs --batch $1 \
--eval '(setq sh-basic-offset 8)' \
@@ -62,6 +70,8 @@ indent = emacs --batch $1 \
lib/common.sh: %: %.in Makefile
@echo "GEN $@"
@{ \
+ echo '#!/bin/bash -euE' && \
+ echo '#!/bin/bash' && \
echo 'if [[ -z $${_INCLUDE_COMMON_SH:-} ]]; then' && \
echo '_INCLUDE_COMMON_SH=true' && \
cat "$<" && \
@@ -86,8 +96,8 @@ install: \
$(DESTDIR)$(bindir)/find-libprovides \
$(DESTDIR)$(bindir)/finddeps \
$(DESTDIR)$(bindir)/lddd \
- $(DESTDIR)$(pkgdatadir)/common.sh \
- $(DESTDIR)$(pkgdatadir)/makechrootpkg.sh
+ $(DESTDIR)$(pkglibexecdir)/common.sh \
+ $(DESTDIR)$(pkglibexecdir)/makechrootpkg.sh
$(DESTDIR)$(sbindir)/%: %
install -Dm755 $< $@
@@ -95,7 +105,7 @@ $(DESTDIR)$(sbindir)/%: %
$(DESTDIR)$(bindir)/%: %
install -Dm755 $< $@
-$(DESTDIR)$(pkgdatadir)/%: lib/%
+$(DESTDIR)$(pkglibexecdir)/%: lib/%
install -Dm644 $< $@
$(DESTDIR)$(bindir)/find-libprovides: