diff options
Diffstat (limited to 'pkg/deb/Makefile')
-rw-r--r-- | pkg/deb/Makefile | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index df2990ba..ad8e642c 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -84,33 +84,19 @@ export CR=\\n default: @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) test test-debug clean" -all: check-build-depends unit modules +all: check-build-depends-all unit modules modules: $(addprefix unit-, $(MODULES)) -check-build-depends: - @{ \ - not_installed= ; \ - for pkg in $(BUILD_DEPENDS); do \ - dpkg -s $${pkg} >/dev/null 2>&1 ; \ - if [ $$? -ne 0 ]; then \ - not_installed="$${not_installed} $${pkg}" ; \ - fi ; \ - done ; \ - if test -n "$${not_installed}" ; then \ - echo "" >&2 ; \ - echo "The following packages are required in order to proceed:" >&2 ; \ - echo "" >&2 ; \ - echo $${not_installed} >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi \ - } - check-build-depends-%: @{ \ + case "$*" in \ + all) pkgs="$(BUILD_DEPENDS)" ;; \ + unit) pkgs="$(BUILD_DEPENDS_unit)" ;; \ + *) pkgs="$(BUILD_DEPENDS_unit) $(BUILD_DEPENDS_$*)" ;; \ + esac ; \ not_installed= ; \ - for pkg in $(BUILD_DEPENDS_unit) $(BUILD_DEPENDS_$*); do \ + for pkg in $${pkgs}; do \ dpkg -s $${pkg} >/dev/null 2>&1 ; \ if [ $$? -ne 0 ]; then \ not_installed="$${not_installed} $${pkg}" ; \ @@ -125,6 +111,7 @@ check-build-depends-%: exit 1 ; \ fi \ } + touch $@ debuild/$(SRCDIR)/debian: @{ \ @@ -254,8 +241,9 @@ test-debug: unit modules clean: rm -rf debuild debuild-* debs ../../build + rm -f check-build-depends-* find . -maxdepth 1 -type l -delete -.PHONY: default all modules check-build-depends test test-debug clean +.PHONY: default all modules test test-debug clean -.SECONDARY: +.SECONDARY: $(addprefix check-build-depends-, $(MODULES)) $(addprefix debuild-, $(MODULES)) |