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