Davide Pesavento | a1ed0da | 2024-07-15 20:00:22 -0400 | [diff] [blame] | 1 | DIRS := $(wildcard */.) |
Alexander Afanasyev | c510386 | 2014-05-07 19:24:25 -0700 | [diff] [blame] | 2 | |
Davide Pesavento | a1ed0da | 2024-07-15 20:00:22 -0400 | [diff] [blame] | 3 | COMMANDS := distro source-build build dput clean |
Alexander Afanasyev | c510386 | 2014-05-07 19:24:25 -0700 | [diff] [blame] | 4 | |
Davide Pesavento | a1ed0da | 2024-07-15 20:00:22 -0400 | [diff] [blame] | 5 | all: help |
| 6 | |
| 7 | help: |
Alexander Afanasyev | c510386 | 2014-05-07 19:24:25 -0700 | [diff] [blame] | 8 | @echo "Available commands:" |
| 9 | @\ |
Davide Pesavento | a1ed0da | 2024-07-15 20:00:22 -0400 | [diff] [blame] | 10 | for command in ${COMMANDS}; do \ |
| 11 | echo " $$command"; \ |
Alexander Afanasyev | c510386 | 2014-05-07 19:24:25 -0700 | [diff] [blame] | 12 | done |
| 13 | |
Alexander Afanasyev | c510386 | 2014-05-07 19:24:25 -0700 | [diff] [blame] | 14 | $(COMMANDS): ${DIRS} |
| 15 | @\ |
| 16 | for dir in ${DIRS}; do \ |
| 17 | (cd $$dir && $(MAKE) $@) ; \ |
| 18 | done |
Alexander Afanasyev | 2811bdd | 2014-05-26 07:24:01 -0700 | [diff] [blame] | 19 | |
| 20 | deb: ${DIRS} |
| 21 | mkdir .deb || true |
| 22 | @\ |
| 23 | for dir in ${DIRS}; do \ |
| 24 | (cd $$dir && $(MAKE) build && cp work/*.deb ../.deb/) ; \ |
| 25 | done |
| 26 | |
Davide Pesavento | a1ed0da | 2024-07-15 20:00:22 -0400 | [diff] [blame] | 27 | .PHONY: all help deb |