]> arthur.barton.de Git - ax-linux.git/blob - Makefile.ax
Makefile.ax: Don't require a "all" target in "Makefile" any more
[ax-linux.git] / Makefile.ax
1 #
2 # ax-linux: Alex' Linux Tools & Scripts
3 # Copyright (c)2013 Alexander Barton (alex@barton.de)
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10
11 AX_SILENT ?= @
12
13 PREFIX ?= /usr/local
14
15 USER ?= $(shell id -un)
16 GROUP ?= $(shell stat --format=%G $(DESTDIR)$(PREFIX) 2>/dev/null || id -gn)
17
18 all: all-ax all-local
19
20 all-ax: $(ALL) $(SUBDIRS)
21
22 clean: clean-ax clean-local
23
24 clean-ax:
25         $(AX_SILENT)for subdir in $(SUBDIRS); do \
26           $(MAKE) -C $$subdir clean || exit 1; \
27          done
28
29 distclean: clean-local distclean-ax distclean-local
30
31 distclean-ax:
32         $(AX_SILENT)for subdir in $(SUBDIRS); do \
33           $(MAKE) -C $$subdir distclean || exit 1; \
34          done
35
36 maintainer-clean: clean-local distclean-local maintainer-clean-ax maintainer-clean-local
37
38 maintainer-clean-ax:
39         $(AX_SILENT)for subdir in $(SUBDIRS); do \
40           $(MAKE) -C $$subdir maintainer-clean || exit 1; \
41          done
42
43 check: check-ax check-local
44
45 check-ax:
46         $(AX_SILENT)for subdir in $(SUBDIRS); do \
47           $(MAKE) -C $$subdir check || exit 1; \
48          done
49
50 install: install-ax install-local
51
52 install-ax:
53         $(AX_SILENT)for subdir in $(SUBDIRS); do \
54           $(MAKE) -C $$subdir install || exit 1; \
55          done
56
57 $(SUBDIRS):
58         $(MAKE) -C $@
59
60 .PHONY: all clean distclean maintainer-clean check install
61 .PHONY: all-ax clean-ax distclean-ax maintainer-clean-ax check-ax install-ax
62 .PHONY: all-local clean-local distclean-local maintainer-clean-local check-local install-local
63 .PHONY: $(SUBDIRS)