summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-08-31 23:48:29 +0200
committerLevente Polyak <anthraxx@archlinux.org>2022-09-01 23:40:21 +0200
commit280ef10d37e88a9a60d1a4406fc511d09acc3fad (patch)
tree19b0717f68747eb9504e29a6aeceb4530e8ff71e /Makefile
parentf8d2ad9a7dcd4a5345f53095d7d36c17cc8aa2fd (diff)
downloaddevtools-280ef10d37e88a9a60d1a4406fc511d09acc3fad.tar.xz
make: declare lib files as build dependencies for bash src scripts
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c106db5..63736f7 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ MANDIR = $(PREFIX)/share/man
BUILDDIR = build
BINPROGS = $(addprefix $(BUILDDIR)/,$(patsubst src/%,bin/%,$(patsubst %.in,%,$(wildcard src/*.in))))
+LIBUTILS = $(wildcard lib/*)
MAKEPKG_CONFIGS=$(wildcard config/makepkg/*)
PACMAN_CONFIGS=$(wildcard config/pacman/*)
SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
@@ -71,13 +72,13 @@ edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g"
GEN_MSG = @echo "GEN $(patsubst $(BUILDDIR)/%,%,$@)"
define buildInScript
-$(1)/%: $(2)%.in
+$(1)/%: $(2)%.in $(LIBUTILS)
$$(GEN_MSG)
@mkdir -p $$(dir $$@)
@$(RM) "$$@"
@{ echo -n 'm4_changequote([[[,]]])'; cat $$<; } | m4 -P --define=m4_devtools_version=$$(BUILDTOOLVER) | $(edit) >$$@
@chmod $(3) "$$@"
- @bash -O extglob -n "$$@"
+ @bash -n "$$@"
endef
$(eval $(call buildInScript,build/bin,src/,555))