X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.ax;h=180ce3c51ffb5681cea53b9551ea1a1dc00f6dbe;hb=b238cb229798bb0c88b6e8bf8c5cdee8d37d9592;hp=aa91fb2cafa28218a36933762608c70f989589b4;hpb=2e5c0694344078b92650565322e767a6f2075ca8;p=ax-linux.git diff --git a/Makefile.ax b/Makefile.ax index aa91fb2..180ce3c 100644 --- a/Makefile.ax +++ b/Makefile.ax @@ -1,10 +1,10 @@ # -# ax-linux: Alex' Linux Tools & Scripts -# Copyright (c)2013 Alexander Barton (alex@barton.de) +# ax-make: Alex' Simple Makefile System +# Copyright (c)2014 Alexander Barton (alex@barton.de) # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # @@ -15,45 +15,29 @@ PREFIX ?= /usr/local USER ?= $(shell id -un) GROUP ?= $(shell stat --format=%G $(DESTDIR)$(PREFIX) 2>/dev/null || id -gn) -$(SUBDIRS): - $(MAKE) -C $@ +all: all-ax all-local -clean: clean-ax clean-local - -clean-ax: - $(AX_SILENT)for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir clean || exit 1; \ - done +all-ax: $(ALL) $(SUBDIRS) -distclean: distclean-ax distclean-local - -distclean-ax: - $(AX_SILENT)for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir distclean || exit 1; \ - done - -maintainer-clean: maintainer-clean-ax maintainer-clean-local +clean: clean-ax clean-local -maintainer-clean-ax: - $(AX_SILENT)for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir maintainer-clean || exit 1; \ - done +distclean: clean-local distclean-ax distclean-local -check: check-ax check-local +maintainer-clean: clean-local distclean-local maintainer-clean-ax maintainer-clean-local -check-ax: - $(AX_SILENT)for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir check || exit 1; \ - done +check: check-pre check-ax check-local check-post install: install-ax install-local -install-ax: +all-ax clean-ax distclean-ax maintainer-clean-ax check-ax install-ax: $(AX_SILENT)for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir install || exit 1; \ + target=`echo "$@" | sed -e 's/-ax$$//'`; \ + echo "Making \"$$target\" in \"$$subdir\" ..."; \ + $(MAKE) -C $$subdir $$target || exit 1; \ done .PHONY: all clean distclean maintainer-clean check install -.PHONY: clean-ax distclean-ax maintainer-clean-ax check-ax install-ax -.PHONY: clean-local distclean-local maintainer-clean-local check-local install-local +.PHONY: all-ax clean-ax distclean-ax maintainer-clean-ax check-ax install-ax +.PHONY: all-local clean-local distclean-local maintainer-clean-local check-local install-local +.PHONY: check-pre check-post .PHONY: $(SUBDIRS)