Commit | Line | Data |
---|---|---|
2a775d51 RS |
1 | srcdir = . |
2 | prefix = /usr/local | |
3 | ||
4 | SHELL = /bin/sh | |
5 | ||
6 | CFLAGS = -g | |
7 | SUBDIRS = | |
8 | ||
9 | FLAGS_TO_PASS = \ | |
10 | "CC=$(CC)" \ | |
11 | "CFLAGS=$(CFLAGS)" \ | |
12 | "LDFLAGS=$(LDFLAGS)" \ | |
13 | "RUNTEST=$(RUNTEST)" \ | |
14 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" | |
15 | ||
16 | #### host, target, and site specific Makefile frags come in here. | |
17 | ||
18 | all: subdirs | |
19 | ||
20 | .PHONY: check installcheck | |
21 | check: | |
d0fa64ec | 22 | install: |
2a775d51 RS |
23 | installcheck: |
24 | ||
25 | .NOEXPORT: | |
26 | MAKEOVERRIDES= | |
27 | ||
28 | check: force | |
29 | rootme=`pwd`; export rootme; $(MAKE) DO=check DODIRS=testsuite subdir_do | |
30 | ||
31 | subdir_do: force | |
32 | @for i in $(DODIRS); do \ | |
33 | if [ -d ./$$i ] ; then \ | |
34 | if (rootme=`pwd`/ ; export rootme ; \ | |
35 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
36 | cd ./$$i; \ | |
37 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ | |
38 | else exit 1 ; fi ; \ | |
39 | else true ; fi ; \ | |
40 | done | |
41 | force: | |
42 | ||
43 | ||
44 | subdirs: | |
45 | @for dir in ${SUBDIRS}; \ | |
46 | do \ | |
47 | echo "$$dir:"; \ | |
48 | if [ -d $$dir ]; then \ | |
49 | (rootme=`pwd`/ ; export rootme ; \ | |
50 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
51 | cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \ | |
52 | fi; \ | |
53 | done | |
54 | ||
55 | clean: | |
56 | -rm -f *~ core *.o a.out xgdb *.x | |
57 | for dir in ${SUBDIRS}; \ | |
58 | do \ | |
59 | echo "$$dir:"; \ | |
60 | if [ -d $$dir ]; then \ | |
61 | (cd $$dir; $(MAKE) clean); \ | |
62 | fi; \ | |
63 | done | |
64 | ||
65 | distclean: clean | |
66 | -rm -f *~ core | |
67 | -rm -f Makefile config.status *-init.exp site.* | |
68 | -rm -fr *.log summary detail | |
69 | for dir in ${SUBDIRS}; \ | |
70 | do \ | |
71 | echo "$$dir:"; \ | |
72 | (cd $$dir; $(MAKE) distclean); \ | |
73 | done | |
74 | ||
75 | Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
76 | $(SHELL) ./config.status | |
77 |