summaryrefslogtreecommitdiff
path: root/src/librefetch
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-08 16:36:45 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-08 16:36:45 -0500
commit7e704d7ac997387341e920e1757c24cac0efe5e9 (patch)
treea9f30eabaaad5496397a91053d3e03bab1ea57e4 /src/librefetch
parent7785a72495e3eb0ea826b41720c241f58a15b601 (diff)
Refactor the build system. Avoid recursive make.
This looks like a lot, but more things should "just work". We have `make dist` now!
Diffstat (limited to 'src/librefetch')
-rw-r--r--src/librefetch/Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/librefetch/Makefile b/src/librefetch/Makefile
index dcb64dc..b28e96e 100644
--- a/src/librefetch/Makefile
+++ b/src/librefetch/Makefile
@@ -1,5 +1,13 @@
-progs = librefetch-install
-confs = librefetch-makepkg.conf
-libexecs = $(shell find librefetchdir -type f -executable)
-libs = $(shell find librefetchdir -type f -not -executable)
-include ../../common.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/automake.head.mk
+
+install-bins = librefetch librefetch-install
+install-confs += librefetch-makepkg.conf
+install-libexecs += $(filter librefetchdir/%,$(detect-exec))
+install-libs += $(filter-out $(install-libexecs),$(filter librefetchdir/%,$(detect-all)))
+pots = $(install-bins)
+
+$(outdir)/librefetch-install: $(var)pkgconfdir
+$(outdir)/librefetch-makepkg.conf: $(var)bindir
+
+include $(topsrcdir)/automake.tail.mk