Allow canadian-cross builds of the GCC toolchains.
[android/toolchain/build.git] / Makefile.in
1 # -------------------------------
2 # Standard Autoconf-set variables
3 # -------------------------------
4 VPATH=@srcdir@
5
6 build_alias=@build_alias@
7 build_vendor=@build_vendor@
8 build_os=@build_os@
9 build=@build@
10 host_alias=@host_alias@
11 host_vendor=@host_vendor@
12 host_os=@host_os@
13 host=@host@
14 target_alias=@target_alias@
15 target_vendor=@target_vendor@
16 target_os=@target_os@
17 target_cpu=@target_cpu@
18 target=@target@
19
20 program_transform_name = @program_transform_name@
21
22 prefix = @prefix@
23 exec_prefix = @exec_prefix@
24
25 srcdir = @srcdir@
26 abs_srcdir = @abs_srcdir@
27
28 bindir = @bindir@
29 sbindir = @sbindir@
30 libexecdir = @libexecdir@
31 datadir = @datadir@
32 sysconfdir = @sysconfdir@
33 sharedstatedir = @sharedstatedir@
34 localstatedir = @localstatedir@
35 libdir = @libdir@
36 includedir = @includedir@
37 oldincludedir = @oldincludedir@
38 infodir = @infodir@
39 datarootdir = @datarootdir@
40 docdir = @docdir@
41 pdfdir = @pdfdir@
42 htmldir = @htmldir@
43 mandir = @mandir@
44
45 builddir = @builddir@
46 abs_builddir = @abs_builddir@
47 #
48 # miscellaneous variables
49 #
50 TOPLEVEL_CONFIGURE_ARGUMENTS:=@TOPLEVEL_CONFIGURE_ARGUMENTS@
51 baseargs = @baseargs@
52 GCC_MIN_VERSION_4_3_0:=@GCC_MIN_VERSION_4_3_0@
53 GCC_MIN_VERSION_4_5_0:=@GCC_MIN_VERSION_4_5_0@
54 PACKAGE_TO_SRCDIR:=@package_to_srcdir@
55 BUILD_ANDROID_GCC:=@BUILD_ANDROID_GCC@
56 GDB_TARGET:=@GDB_TARGET@
57
58 # We need to figure out how to get to top level source directory from
59 # a package build directory. 
60 # For host modules, accept cache file option, or specification as blank.
61
62
63 BINUTILS_VERSION=binutils-@BINUTILS_VERSION@
64 GOLD_VERSION=binutils-@GOLD_VERSION@
65 GCC_VERSION=gcc-@GCC_VERSION@
66 NEWLIB_VERSION=newlib-@NEWLIB_VERSION@
67 GMP_VERSION=gmp-@GMP_VERSION@
68 MPFR_VERSION=mpfr-@MPFR_VERSION@
69 MPC_VERSION=mpc-@MPC_VERSION@
70 GDB_VERSION=gdb-@GDB_VERSION@
71 STAMP=touch
72
73 TARGET_BINUTILS_BUILDDIR=$(abs_builddir)/$(BINUTILS_VERSION)
74 TARGET_GCC_BUILDDIR=$(abs_builddir)/$(GCC_VERSION)
75 TEMP_INSTALLDIR=$(abs_builddir)/temp-install
76
77 # Figure out where to find the ld binary.
78 FIND_TARGET_LD=\
79         `[ -d $(TARGET_BINUTILS_BUILDDIR)/gold ] && echo "gold" || echo "ld"`
80
81 # We export these insteading when configuring target gcc and newlib
82 TARGET_BINUTILS_EXPORTS= \
83 export  AS_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/gas/as-new \
84         LD_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/$(FIND_TARGET_LD)/ld-new \
85         AR_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/binutils/ar \
86         NM_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/binutils/nm-new \
87         STRIP_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/binutils/strip-new \
88         RANLIB_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/binutils/ranlib \
89         OBJDUMP_FOR_TARGET=$(TARGET_BINUTILS_BUILDDIR)/binutils/objdump
90
91 TARGET_MINIMAL_GCC_EXPORTS= \
92 export  CC_FOR_TARGET="$(TARGET_GCC_BUILDDIR)/gcc/xgcc \
93                       -B $(TARGET_GCC_BUILDDIR)/gcc \
94                       -isystem $(TARGET_GCC_BUILDDIR)/gcc/include-fixed \
95                       -isystem $(TARGET_GCC_BUILDDIR)/gcc/include"
96 #
97 # We need -Os as the overrides below interfere with --enable-target-optspace.
98 # We also need -mandroid for for target libraries to pass linking test
99 # in configuration.
100
101 # To build libstdc++ with RTTI and exceptions do:
102 #
103 #export CFLAGS_FOR_TARGET=-fexceptions
104 #export CXXFLAGS_FOR_TARGET=-frtti
105 #
106 CFLAGS_FOR_TARGET+= -O2 -Os -g
107 CXXFLAGS_FOR_TARGET+=$(CFLAGS_FOR_TARGET)
108 LDFLAGS_FOR_TARGET=
109
110 # Helper
111 prefix-list = $(foreach e, $(2), $(join $1, $e))
112
113 # find source directory for package. This can either be <srcdir>/<package>
114 # or <objdir>/temp-src/<package>
115
116 find-package-srcdir = $(shell \
117   if [ -f $(srcdir)/../$(firstword $(subst -, ,$1))/$(strip $1)/configure ]; then \
118      echo $(PACKAGE_TO_SRCDIR)/../$(firstword $(subst -, ,$1))/$(strip $1); \
119   elif [ -f $(abs_builddir)/temp-src/$(strip $1)/configure ]; then \
120     echo $(abs_builddir)/temp-src/$(strip $1) ; \
121   else \
122     echo 'error cannot find $(strip $1)' ; \
123   fi)
124
125 # Set effective <build>, <host> and <target>.
126
127 ifneq ($(build_alias),)
128 cur_build := $(build_alias)
129 else
130 cur_build := $(build)
131 endif
132
133 ifneq ($(host_alias),)
134 cur_host := $(host_alias)
135 else
136 cur_host := $(host)
137 endif
138
139 ifneq ($(target_alias),)
140 cur_target := $(target_alias)
141 else
142 cur_target := $(target)
143 endif
144
145 # Define environment variables for canadian cross build.
146 ifneq ($(cur_host),$(cur_build))
147 canadian_build_env := \
148         export CC_FOR_BUILD=$(cur_build)-gcc ; \
149         export CC=$(cur_build)-gcc ; \
150         export CXX=$(cur_build)-g++ ;
151
152 CANADIAN_ROOT := $(PWD)/host-${cur_build}
153 canadian_env := \
154         export CC_FOR_BUILD=$(cur_build)-gcc ; \
155         export CC=$(cur_host)-gcc ; \
156         export CXX=$(cur_host)-g++ ; \
157         export AR=$(cur_host)-ar ; \
158         export RANLIB=$(cur_host)-ranlib ; \
159         export PATH="$(CANADIAN_ROOT)/install/bin:${PATH}" ;
160 endif
161
162 #
163 # Make rules
164 #
165
166 .PHONY: all clean
167
168 all: build
169
170 # top level
171 build: build-target-binutils build-target-gcc build-target-gdb
172
173 install: install-target-binutils install-target-gcc install-target-gdb
174
175 # To support canadian cross build we need to build build->target toolchain
176 # as well as final host->target toolchain.
177 ifneq ($(cur_host),$(cur_build))
178 .PHONY: config-canadian-tools build-canadian-tools install-canadian-tools
179
180 config-canadian-tools: stmp-config-canadian-tools
181 stmp-config-canadian-tools:
182         ([ -d $(CANADIAN_ROOT) ] || \
183           mkdir $(CANADIAN_ROOT)) && \
184         ($(canadian_build_env) \
185          cd $(CANADIAN_ROOT) && \
186          $(abs_srcdir)/configure $(baseargs) --build=$(cur_build) \
187                 --host=$(cur_build) --target=$(cur_target)) && \
188         $(STAMP) $@
189
190 build-canadian-tools: stmp-build-canadian-tools
191 stmp-build-canadian-tools: stmp-config-canadian-tools
192         ($(canadian_build_env) \
193          cd $(CANADIAN_ROOT) && \
194          $(MAKE)) && \
195         $(STAMP) $@
196
197 install-canadian-tools: stmp-install-canadian-tools
198 stmp-install-canadian-tools: stmp-build-canadian-tools
199         ($(canadian_build_env) \
200          cd $(CANADIAN_ROOT) && \
201          $(MAKE) install prefix=$(CANADIAN_ROOT)/install) && \
202         $(STAMP) $@
203
204 # When building canadian cross toolchain we cannot build GCC target libraries.
205 # So we build the compilers only and copy the target libaries from
206 # $(CANADIAN_ROOT)/install/ installation.
207 gcc_build_target := all-gcc
208 gcc_install_target := install-gcc
209 install-target-gcc-multilibs: stmp-install-canadian-tools
210         mkdir -p $(prefix)/lib/gcc/
211         rsync -a $(CANADIAN_ROOT)/install/lib/gcc/ $(prefix)/lib/gcc/
212 install-target-gcc-multilibs := install-target-gcc-multilibs
213
214 # We add canadian_stmp dependency to rules that have no dependencies
215 # on other modules.  This is to ensure that simple cross toolchain is built
216 # before canadian cross toolchain.
217 canadian_stmp := stmp-install-canadian-tools
218 else
219 gcc_build_target :=
220 gcc_install_target := install
221 install-target-gcc-multilibs :=
222 canadian_stmp :=
223 endif
224
225 ifneq ($(BINUTILS_VERSION), $(GOLD_VERSION))
226 build: build-target-gold
227 install: install-target-gold
228 endif
229
230 # target binutils rules
231 .PHONY: config-target-binutils build-target-binutils install-target-binutils
232 config-target-binutils: stmp-config-target-binutils
233 # We do not want to enable shared libraries in binutils
234 BINUTILS_CONFIG_ARGS=--prefix=$(prefix) \
235         --target=${cur_target} --host=${cur_host} --build=${cur_build} \
236         $(baseargs) --disable-shared
237 stmp-config-target-binutils: config.status $(canadian_stmp)
238         ([ -d ${BINUTILS_VERSION} ] || \
239           mkdir ${BINUTILS_VERSION}) && \
240         ($(canadian_env) \
241          cd ${BINUTILS_VERSION} ; \
242          $(call find-package-srcdir, ${BINUTILS_VERSION})/configure \
243           $(BINUTILS_CONFIG_ARGS)) && \
244         $(STAMP) $@
245 build-target-binutils: stmp-build-target-binutils
246 stmp-build-target-binutils: stmp-config-target-binutils
247         ($(canadian_env) \
248          $(MAKE) -C ${BINUTILS_VERSION}) && $(STAMP) $@
249 install-target-binutils: stmp-build-target-binutils
250         ($(canadian_env) \
251          $(MAKE) -C ${BINUTILS_VERSION} install)
252
253 # target gold rules.  We need these only if BINUTILS_VERSION != GOLD_VERSION
254 ifneq ($(BINUTILS_VERSION), $(GOLD_VERSION))
255 .PHONY: config-target-gold build-target-gold install-target-gold
256 config-target-gold: stmp-config-target-gold
257 # We do not want to enable shared libraries in gold
258 GOLD_CONFIG_ARGS=--prefix=$(prefix) \
259         --target=${target_alias} --host=${host} --build=${build} \
260         $(baseargs) --disable-shared
261 stmp-config-target-gold: config.status
262         ([ -d ${GOLD_VERSION} ] || \
263           mkdir ${GOLD_VERSION}) && \
264         (cd ${GOLD_VERSION} ; \
265          $(call find-package-srcdir, ${GOLD_VERSION})/configure \
266           $(GOLD_CONFIG_ARGS)) && \
267         $(STAMP) $@
268 build-target-gold: stmp-build-target-gold
269 stmp-build-target-gold: stmp-config-target-gold
270         ($(canadian_env) \
271      $(MAKE) -C ${GOLD_VERSION} && $(STAMP) $@)
272
273 # If we use a different binutils version of gold, we build gold twice.  We
274 # first build everything, including gold with the main binutils version and
275 # then install it.  Then we build the gold-only binutils version and install
276 # just gold.  We don't bother to skip building the first gold to simplify
277 # handling of all combinations of --enable-gold[=*]
278
279 install-target-gold: stmp-build-target-gold install-target-binutils
280         ($(canadian_env) \
281      make -C $(GOLD_VERSION)/gold install)
282
283 endif
284
285 # target gcc rules
286
287 # target gcc rules
288 .PHONY: config-target-gcc build-target-gcc install-target-gcc
289 .PHONY: install-target-gcc-gcc $(install-target-gcc-multilibs)
290 config-target-gcc: stmp-config-target-gcc
291
292 GCC_CONFIG_ARGS=--prefix=$(prefix) \
293           --target=${cur_target} --host=${cur_host} --build=${cur_build} \
294           --with-gnu-as --with-gnu-ld --enable-languages=c,c++
295
296 # For gcc versions 4.3.0 and later, gmp and mpfr are required.
297 # Also build libgcc is a seperate sub-target in 4.3.0+.
298 ifeq ($(GCC_MIN_VERSION_4_3_0),yes)
299 stmp-config-target-gcc: stmp-install-host-gmp stmp-install-host-mpfr
300 GCC_CONFIG_ARGS += --with-gmp=$(TEMP_INSTALLDIR) --with-mpfr=$(TEMP_INSTALLDIR)
301 endif
302
303 # For gcc versions 4.5.0 and higher, mpc is required.
304 ifeq ($(GCC_MIN_VERSION_4_5_0),yes)
305 stmp-config-target-gcc: stmp-install-host-mpc
306 GCC_CONFIG_ARGS += --with-mpc=$(TEMP_INSTALLDIR)
307 endif
308
309 # Add Android specific gcc options.
310 # FIXME: These should be overridable by configure options.
311
312
313 # Target indenpendent Android gcc options.
314 ifeq ($(BUILD_ANDROID_GCC),yes)
315 GCC_CONFIG_ARGS += $(GCC_CONFIG_LIBSTDCXX_V3) --disable-libssp \
316         --enable-threads --disable-nls --disable-libmudflap --disable-libgomp \
317         --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared \
318         --disable-tls
319 CFLAGS_FOR_TARGET += -DTARGET_POSIX_IO -fno-short-enums
320 # ARM specific options.
321 ifeq ($(target_cpu),arm)
322 GCC_CONFIG_ARGS += --with-float=soft --with-fpu=vfp --with-arch=armv5te \
323         --enable-target-optspace
324 ifneq ($(target_os),linux-androideabi)
325 GCC_CONFIG_ARGS += --with-abi=aapcs
326 endif
327 endif
328
329 endif
330
331 # We add the baseargs and the end so that they override any default args
332 GCC_CONFIG_ARGS += $(baseargs)
333
334 # We have to add -mandroid in target CFLAGS and CXXFLAGS
335 stmp-config-target-gcc: config.status stmp-build-target-binutils
336         ([ -d ${GCC_VERSION} ] || \
337           mkdir ${GCC_VERSION}) && \
338         ($(canadian_env) \
339          cd ${GCC_VERSION} ; \
340          $(TARGET_BINUTILS_EXPORTS) ; \
341          export CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" ; \
342          export CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" ; \
343          export LDFLAGS_FOR_TARGET="$(LDFLAGS_FOR_TARGET)" ; \
344          $(call find-package-srcdir, ${GCC_VERSION})/configure \
345            $(GCC_CONFIG_ARGS)) && \
346         $(STAMP) $@
347 build-target-gcc: stmp-build-target-gcc
348 stmp-build-target-gcc: stmp-config-target-gcc
349         ($(canadian_env) \
350          $(MAKE) -C ${GCC_VERSION} \
351                 CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
352                 CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
353                 LDFLAGS_FOR_TARGET="$(LDFLAGS_FOR_TARGET)" \
354                 $(gcc_build_target)) \
355         && $(STAMP) $@
356 install-target-gcc-gcc: stmp-build-target-gcc
357         ($(canadian_env) \
358          $(MAKE) -C ${GCC_VERSION} $(gcc_install_target))
359 install-target-gcc: install-target-gcc-gcc $(install-target-gcc-multilibs)
360
361 # minimal gcc rules
362 # minimal gcc only builds the C and C++ compilers and libgcc
363 # We use the full gcc configure rules.
364 .PHONY: build-target-minimal-gcc install-target-minimal-gcc
365 ifeq ("$(GCC_MIN_VERSION_4_3_0)","yes")
366 MINIMAL_GCC_BUILD_TARGETS:= gcc target-libgcc 
367 else
368 MINIMAL_GCC_BUILD_TARGETS:= gcc
369 endif
370
371 build-target-minimal-gcc: stmp-build-target-minimal-gcc
372 stmp-build-target-minimal-gcc: stmp-config-target-gcc
373         ($(canadian_env) \
374          $(MAKE) -C ${GCC_VERSION} \
375                 $(call prefix-list, all-, $(MINIMAL_GCC_BUILD_TARGETS))) && \
376         $(STAMP) $@
377 install-target-minimal-gcc: stmp-build-target-minimal-gcc
378         ($(canadian_env) \
379          $(MAKE) -C ${GCC_VERSION} \
380                 $(call prefix-list, install-, $(MINIMAL_GCC_BUILD_TARGETS)))
381
382 # target newlib rules
383 .PHONY: config-target-newlib build-target-newlib install-target-newlib
384 config-target-newlib: stmp-config-target-newlib
385 NEWLIB_CONFIG_ARGS=$(baseargs) --prefix=$(prefix) \
386           --target=${cur_target} --host=${cur_host} --build=${cur_build}
387
388 stmp-config-target-newlib: stmp-build-target-binutils \
389                            stmp-build-target-minimal-gcc
390         ([ -d ${NEWLIB_VERSION} ] || \
391           mkdir ${NEWLIB_VERSION}) && \
392         ($(canadian_env) \
393          cd ${NEWLIB_VERSION} ; \
394          $(TARGET_BINUTILS_EXPORTS) ; \
395          $(TARGET_MINIMAL_GCC_EXPORTS) ; \
396          $(call find-package-srcdir, ${NEWLIB_VERSION})/configure \
397           $(NEWLIB_CONFIG_ARGS)) && \
398         $(STAMP) $@
399 stmp-build-target-newlib: stmp-config-target-newlib
400         ($(canadian_env) \
401          $(MAKE) -C ${NEWLIB_VERSION}) && $(STAMP) $@
402 install-target-newlib: stmp-build-target-newlib
403         ($(canadian_env) \
404          $(MAKE) -C ${NEWLIB_VERSION} install)
405
406 # host gmp rules
407 .PHONY: config-host-gmp build-host-gmp install-host-gmp
408 config-host-gmp: stmp-config-host-gmp
409 GMP_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \
410           --host=${cur_host} --build=${cur_build}
411 stmp-config-host-gmp: config.status $(canadian_stmp)
412         ([ -d ${GMP_VERSION} ] || \
413           mkdir ${GMP_VERSION}) && \
414         ($(canadian_env) \
415          cd ${GMP_VERSION} ; \
416          $(call find-package-srcdir, ${GMP_VERSION})/configure \
417           $(GMP_CONFIG_ARGS)) && \
418         $(STAMP) $@
419 stmp-build-host-gmp: stmp-config-host-gmp
420         ($(canadian_env) \
421          $(MAKE) -C ${GMP_VERSION}) && $(STAMP) $@
422 build-host-gmp: stmp-build-host-gmp
423 # Need -j1 to avoid a race condition in building on OS X.
424 stmp-install-host-gmp: stmp-build-host-gmp
425         ($(canadian_env) \
426          $(MAKE) -C ${GMP_VERSION} install -j1) && \
427         $(STAMP) $@
428 install-host-gmp: stmp-install-host-gmp
429
430 # host mpfr rules
431 .PHONY: config-host-mpfr build-host-mpfr install-host-mpfr
432 config-host-mpfr: stmp-config-host-mpfr
433 MPFR_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \
434           --host=${cur_host} --build=${cur_build} \
435           --with-gmp=$(TEMP_INSTALLDIR)
436 stmp-config-host-mpfr: config.status stmp-install-host-gmp
437         ([ -d ${MPFR_VERSION} ] || \
438           mkdir ${MPFR_VERSION}) && \
439         ($(canadian_env) \
440          cd ${MPFR_VERSION} ; \
441          $(call find-package-srcdir, ${MPFR_VERSION})/configure \
442           $(MPFR_CONFIG_ARGS)) && \
443         $(STAMP) $@
444 stmp-build-host-mpfr: stmp-config-host-mpfr
445         ($(canadian_env) \
446          $(MAKE) -C ${MPFR_VERSION}) && $(STAMP) $@
447 build-host-mpfr: stmp-build-host-mpfr
448 stmp-install-host-mpfr: stmp-build-host-mpfr
449         ($(canadian_env) \
450          $(MAKE) -C ${MPFR_VERSION} install) && \
451         $(STAMP) $@
452 install-host-mpfr: stmp-install-host-mpfr
453
454 # host mpc rules
455 .PHONY: config-host-mpc build-host-mpc install-host-mpc
456 config-host-mpc: stmp-config-host-mpc
457 MPC_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \
458          --host=${cur_host} --build=${cur_build} \
459          --with-gmp=$(TEMP_INSTALLDIR) --with-mpfr=$(TEMP_INSTALLDIR)
460 stmp-config-host-mpc: config.status stmp-install-host-gmp stmp-install-host-mpfr
461         ([ -d ${MPC_VERSION} ] || \
462           mkdir ${MPC_VERSION}) && \
463         ($(canadian_env) \
464          cd ${MPC_VERSION} ; \
465          $(call find-package-srcdir, ${MPC_VERSION})/configure \
466           $(MPC_CONFIG_ARGS)) && \
467         $(STAMP) $@
468 stmp-build-host-mpc: stmp-config-host-mpc
469         ($(canadian_env) \
470          $(MAKE) -C ${MPC_VERSION}) && $(STAMP) $@
471 build-host-mpc: stmp-build-host-mpc
472 stmp-install-host-mpc: stmp-build-host-mpc
473         ($(canadian_env) \
474          $(MAKE) -C ${MPC_VERSION} install) && \
475         $(STAMP) $@
476 install-host-mpc: stmp-install-host-mpc
477
478 # target gdb rules
479 .PHONY: config-target-gdb build-target-gdb install-target-gdb
480 config-target-gdb: stmp-config-target-gdb
481
482 GDB_CONFIG_ARGS=$(baseargs) --prefix=$(prefix) \
483         --target=$(GDB_TARGET) --host=${cur_host} --build=${cur_build} \
484         --disable-nls
485
486 stmp-config-target-gdb: config.status $(canadian_stmp)
487         ([ -d ${GDB_VERSION} ] || \
488           mkdir ${GDB_VERSION}) && \
489         ($(canadian_env) \
490          cd ${GDB_VERSION} ; \
491          $(call find-package-srcdir, ${GDB_VERSION})/configure \
492           $(GDB_CONFIG_ARGS)) && \
493         $(STAMP) $@
494 build-target-gdb: stmp-build-target-gdb
495 stmp-build-target-gdb: stmp-config-target-gdb
496         ($(canadian_env) \
497          $(MAKE) -C ${GDB_VERSION}) && $(STAMP) $@
498 install-target-gdb: stmp-build-target-gdb
499         ($(canadian_env) \
500          $(MAKE) -C ${GDB_VERSION} install)
501
502 # clean rules
503 .PHONY: clean
504 clean:
505         $(RM) -r $(TEMP_INSTALLDIR) stmp-build-* stmp-install-* && \
506         for sub in [ * ]; do \
507           if [ -f $$sub/Makefile ]; then \
508             $(MAKE) -C $$sub clean ; \
509           fi; \
510         done
511
512 .PHONY: distclean
513 distclean:
514         @$(RM) -r config.log config.status \
515                   $(TEMP_INSTALLDIR) temp-src \
516                   stmp-config-* stmp-build-* stmp-install-* && \
517         for sub in [ * ]; do \
518           if [ -f $$sub/config.status ]; then \
519             echo "Deleting " $$sub "..." && $(RM) -r $$sub ; \
520           fi; \
521         done
522         @$(RM) Makefile