1# This file is used for common development targets that can be done with 2# needing the cumbersome bootstrapping process. 3# 4# You can use it like this: 5# 6# make -f .makefile indent 7# 8# If you copy or link this file to `GNUmakefile` then you can just do: 9# 10# make indent 11# 12# When copied to `GNUmakefile`, this file is can also be used for bootstrapping 13# Makefile targets. Since GNUmakefile is loaded before Makefile, we do the 14# bootstrapping tasks need to get a Makefile first, then we use the Makefile to 15# make our target. 16 17# Remind user when they are using GNUmakefile: 18ifeq ($(lastword $(MAKEFILE_LIST)),GNUmakefile) 19 $(info *** NOTE: GNUmakefile in use. ***) 20endif 21 22MAKE_TARGETS := \ 23 all \ 24 all-am \ 25 all-recursive \ 26 install \ 27 test \ 28 test-all \ 29 test-suite \ 30 31# SOURCE_FILES := $(shell find . | grep '\.c$$') 32SOURCE_FILES := $(shell find tests/run-test-suite | grep '\.c$$') 33ifneq ($(shell which gindent),) 34INDENT := gindent 35else 36INDENT := indent 37endif 38 39# 40# Proxy make targets: 41# 42default: all 43 44# Proxy these targets to the real Makefile, after bootstrapping is necessary. 45$(MAKE_TARGETS): Makefile 46 @make -f $< $@ 47 48Makefile: Makefile.in 49 ./configure 50 51Makefile.in: 52 ./bootstrap 53 54# 55# Development make targets: 56# 57indent: 58 $(INDENT) $(SOURCE_FILES) 59 60distclean purge: 61 rm -fr tests/run-test-suite/data 62 git clean -dxf -e GNUmakefile 63