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