Commit | Line | Data |
---|---|---|
bf3d2b75 MW |
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 | ||
ebc0f582 | 9 | datadir = $(exec_prefix)/lib/dejagnu |
bf3d2b75 MW |
10 | mandir = $(prefix)/man |
11 | man1dir = $(mandir)/man1 | |
12 | man2dir = $(mandir)/man2 | |
13 | man3dir = $(mandir)/man3 | |
14 | man4dir = $(mandir)/man4 | |
15 | man5dir = $(mandir)/man5 | |
16 | man6dir = $(mandir)/man6 | |
17 | man7dir = $(mandir)/man7 | |
18 | man8dir = $(mandir)/man8 | |
19 | man9dir = $(mandir)/man9 | |
20 | infodir = $(prefix)/info | |
21 | includedir = $(prefix)/include | |
22 | gxx_includedir = $(tooldir)/g++-include | |
23 | docdir = $(datadir)/doc | |
24 | targetdir = $(datadir)/$(target_alias) | |
25 | ||
26 | SHELL = /bin/sh | |
27 | ||
28 | INSTALL = install -c | |
29 | INSTALL_PROGRAM = $(INSTALL) | |
30 | INSTALL_DATA = $(INSTALL) | |
31 | ||
bf3d2b75 MW |
32 | CFLAGS = -g |
33 | CHILLFLAGS = $(CFLAGS) | |
34 | CHILL_LIB = -lchill | |
5aefc1ca | 35 | CXXFLAGS = -g |
bf3d2b75 MW |
36 | |
37 | LINK= ln -s | |
38 | SUBDIRS= | |
29aa49d4 RS |
39 | RUNTEST = runtest |
40 | RUNTESTFLAGS = | |
bf3d2b75 | 41 | |
29aa49d4 | 42 | CC = ` \ |
d27960e7 RS |
43 | if [ -f $${rootme}/../../gcc/Makefile ] ; then \ |
44 | echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \ | |
bf3d2b75 MW |
45 | else \ |
46 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
29aa49d4 | 47 | echo cc; \ |
bf3d2b75 MW |
48 | else \ |
49 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
50 | fi; \ | |
51 | fi` | |
52 | ||
29aa49d4 | 53 | CHILL = ` \ |
d27960e7 RS |
54 | if [ -f $${rootme}/../../gcc/Makefile ] ; then \ |
55 | echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/ -L$${rootme}../../chillrt/; \ | |
bf3d2b75 MW |
56 | else \ |
57 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
29aa49d4 | 58 | echo gcc; \ |
bf3d2b75 MW |
59 | else \ |
60 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
61 | fi; \ | |
62 | fi` | |
bf3d2b75 | 63 | |
29aa49d4 | 64 | CXX = ` \ |
d27960e7 RS |
65 | if [ -f $${rootme}/../../gcc/Makefile ] ; then \ |
66 | echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \ | |
bf3d2b75 MW |
67 | else \ |
68 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
29aa49d4 | 69 | echo gcc; \ |
bf3d2b75 MW |
70 | else \ |
71 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
72 | fi; \ | |
73 | fi` | |
74 | ||
d27960e7 | 75 | GDB = ` \ |
a1092b5d RS |
76 | if [ -f $${rootme}/../gdb ] ; \ |
77 | then echo $${rootme}|sed -e 's@/[^/]*$$@@'|sed -e 's@$$@/gdb@' ; \ | |
78 | else echo gdb; \ | |
d27960e7 RS |
79 | fi` |
80 | ||
a1092b5d | 81 | GDBFLAGS = -nx |
bf3d2b75 | 82 | |
29aa49d4 RS |
83 | EXPECT = `if [ -f $${rootme}../../expect/expect ] ; \ |
84 | then echo $${rootme}../../expect/expect ; \ | |
bf3d2b75 MW |
85 | else echo expect; fi` |
86 | ||
87 | #### host, target, and site specific Makefile frags come in here. | |
88 | ||
89 | FLAGS_TO_PASS = \ | |
bf3d2b75 MW |
90 | "CXX=$(CXX)" \ |
91 | "CXXFLAGS=$(CXXFLAGS)" \ | |
bf3d2b75 | 92 | "CC=$(CC)" \ |
bf3d2b75 | 93 | "CFLAGS=$(CFLAGS)" \ |
bf3d2b75 | 94 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
29aa49d4 | 95 | "CHILL=$(CHILL)" \ |
bf3d2b75 | 96 | "CHILL_LIB=$(CHILL_LIB)" \ |
bf3d2b75 MW |
97 | "INSTALL=$(INSTALL)" \ |
98 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
99 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
100 | "LDFLAGS=$(LDFLAGS)" \ | |
101 | "LINK=$(LINK)" \ | |
bf3d2b75 MW |
102 | "LOADLIBES=$(LOADLIBES)" \ |
103 | "MAKEINFO=$(MAKEINFO)" \ | |
bf3d2b75 MW |
104 | "exec_prefix=$(exec_prefix)" \ |
105 | "prefix=$(prefix)" | |
106 | ||
107 | all: subdirs | |
108 | ||
109 | .NOEXPORT: | |
110 | INFODIRS=doc | |
111 | info: | |
bf3d2b75 | 112 | install-info: |
21ce979a | 113 | dvi: |
bf3d2b75 MW |
114 | |
115 | install: | |
bf3d2b75 MW |
116 | |
117 | uninstall: force | |
bf3d2b75 | 118 | |
cc49ffa0 | 119 | site.exp: ./config.status Makefile |
1ee369e8 RS |
120 | @echo "Making a new config file..." |
121 | -@rm -f ./tmp? | |
122 | @touch site.exp | |
123 | -@mv site.exp site.bak | |
124 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
125 | @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 | |
126 | @echo "# add them to the last section" >> ./tmp0 | |
a1092b5d | 127 | @echo "set GDBFLAGS \"${GDBFLAGS}\"" >> ./tmp0 |
1ee369e8 RS |
128 | @echo "set host_os ${host_os}" >> ./tmp0 |
129 | @echo "set host_alias ${host_alias}" >> ./tmp0 | |
130 | @echo "set host_cpu ${host_cpu}" >> ./tmp0 | |
131 | @echo "set host_vendor ${host_vendor}" >> ./tmp0 | |
132 | @echo "set target_os ${target_os}" >> ./tmp0 | |
133 | @echo "set target_alias ${target_alias}" >> ./tmp0 | |
134 | @echo "set target_cpu ${target_cpu}" >> ./tmp0 | |
135 | @echo "set target_vendor ${target_vendor}" >> ./tmp0 | |
cc49ffa0 RS |
136 | @echo "set host_triplet ${host_canonical}" >> ./tmp0 |
137 | @echo "set target_triplet ${target_canonical}" >> ./tmp0 | |
1ee369e8 | 138 | @echo "set srcdir ${srcdir}" >> ./tmp0 |
1ee369e8 | 139 | @echo "set objdir `pwd`" >> ./tmp0 |
cc49ffa0 | 140 | @echo "set tool gdb" >> ./tmp0 |
1ee369e8 RS |
141 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 |
142 | @cat ./tmp0 > site.exp | |
143 | @cat site.bak | sed \ | |
144 | -e '1,/^## All variables above are.*##/ d' >> site.exp | |
cc49ffa0 | 145 | -@rm -f ./tmp? |
1ee369e8 | 146 | |
21ce979a | 147 | installcheck: |
ab8603ea RP |
148 | check: site.exp all just-check |
149 | just-check: | |
d27960e7 RS |
150 | rootme=`pwd`; export rootme; \ |
151 | $(RUNTEST) $(RUNTESTFLAGS) --tool gdb GDB=$(GDB) --srcdir $(srcdir) | |
29aa49d4 | 152 | |
bf3d2b75 MW |
153 | subdir_do: force |
154 | @for i in $(DODIRS); do \ | |
155 | if [ -d ./$$i ] ; then \ | |
156 | if (rootme=`pwd`/ ; export rootme ; \ | |
157 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
158 | cd ./$$i; \ | |
159 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ | |
160 | else exit 1 ; fi ; \ | |
161 | else true ; fi ; \ | |
162 | done | |
29aa49d4 RS |
163 | |
164 | force:; | |
bf3d2b75 MW |
165 | |
166 | ||
167 | subdirs: | |
168 | for dir in ${SUBDIRS}; \ | |
169 | do \ | |
170 | echo "$$dir:"; \ | |
171 | if [ -d $$dir ]; then \ | |
172 | (rootme=`pwd`/ ; export rootme ; \ | |
173 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
174 | cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \ | |
175 | fi; \ | |
176 | done | |
177 | ||
29aa49d4 | 178 | clean mostlyclean: |
bf3d2b75 | 179 | -rm -f *~ core *.o a.out xgdb *.x |
29aa49d4 RS |
180 | for dir in ${SUBDIRS}; \ |
181 | do \ | |
182 | echo "$$dir:"; \ | |
183 | if [ -d $$dir ]; then \ | |
184 | (cd $$dir; $(MAKE) clean); \ | |
185 | fi; \ | |
186 | done | |
187 | ||
188 | distclean realclean: clean | |
bf3d2b75 MW |
189 | -rm -f *~ core |
190 | -rm -f Makefile config.status *-init.exp | |
191 | -rm -fr *.log summary detail | |
29aa49d4 RS |
192 | for dir in ${SUBDIRS}; \ |
193 | do \ | |
194 | echo "$$dir:"; \ | |
195 | (cd $$dir; $(MAKE) distclean); \ | |
196 | done | |
bf3d2b75 | 197 | |
ab8603ea | 198 | Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag) |
bf3d2b75 | 199 | $(SHELL) ./config.status |