OSDN Git Service

install_headers: convert header removal to Kbuild style
[uclinux-h8/uClibc.git] / Makefile.in
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4 #
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 #
7
8 #--------------------------------------------------------------
9 # You shouldn't need to mess with anything beyond this point...
10 #--------------------------------------------------------------
11 clean_targets := clean realclean distclean \
12         objclean-y headers_clean-y utils_clean
13 noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
14         defconfig allyesconfig allnoconfig \
15         release dist tags help
16
17 include $(top_builddir)Rules.mak
18 sub_headers := headers
19
20 ifeq ($(HAVE_DOT_CONFIG),y)
21
22 all: pregen libs
23 libs: pregen
24
25 # In this section, we need .config
26 -include .config.cmd
27
28 else # ifeq ($(HAVE_DOT_CONFIG),y)
29
30 all: menuconfig
31
32 headers:
33         @echo "Need to make a config file first, run: make menuconfig"
34         @false
35
36 endif # ifeq ($(HAVE_DOT_CONFIG),y)
37
38 include $(top_srcdir)ldso/Makefile.in
39 include $(top_srcdir)libcrypt/Makefile.in
40 include $(top_srcdir)libintl/Makefile.in
41 include $(top_srcdir)libm/Makefile.in
42 include $(top_srcdir)libnsl/Makefile.in
43 include $(top_srcdir)libresolv/Makefile.in
44 include $(top_srcdir)libutil/Makefile.in
45 include $(top_srcdir)libpthread/Makefile.in
46 include $(top_srcdir)librt/Makefile.in
47 include $(top_srcdir)extra/locale/Makefile.in
48
49 # last included to catch all the objects added by others (locales/threads)
50 include $(top_srcdir)libc/Makefile.in
51
52 ifeq ($(HAVE_DOT_CONFIG),y)
53 # If the .config changes then we have to make sure that our includes are
54 # updated properly. This would normally work by saying that the headers
55 # have uClibc_config.h as prerequisite but since we _symlink_ the headers
56 # and do not (?) want to rely on 'make -L' we better update them right here,
57 # on spot to save us from alot of hazzle.
58 include/bits/uClibc_config.h: extra/config/conf .config $(top_srcdir)extra/scripts/conf-header.sh | include/bits
59         @$(disp_gen)
60         $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
61         $(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
62         $(Q)$(MAKE) headers-y
63
64 # The above doesn't work for threads, though. Just using check-symlinks for now.
65 # XXX: FIXME: this is ugly
66 MAKEFLAGS += -L
67 include/config/linuxthreads/old.h include/config/linuxthreads/new.h:
68         @true
69
70 # For the moment, we have to keep re-running this target
71 # because the fix includes scripts rely on pre-processers
72 # in order to generate the headers correctly :(.  That
73 # means we can't use the $(HOSTCC) in order to get the
74 # correct output.
75 ifeq ($(ARCH_USE_MMU),y)
76 export header_extra_args =
77 else
78 export header_extra_args = -n
79 endif
80 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
81 HEADERS_BITS_ARCH   := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
82 HEADERS_BITS_SUBARCH :=
83 ifneq ($(TARGET_SUBARCH),)
84 HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
85 endif
86 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
87
88 HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
89 HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
90 HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
91
92 ALL_HEADERS_COMMON       := include/fpu_control.h include/dl-osinfo.h \
93                                 include/hp-timing.h
94 ALL_HEADERS_BITS_COMMON  := $(addprefix include/bits/,$(HEADERS_BITS_COMMON))
95 ALL_HEADERS_BITS_ARCH    := $(addprefix include/bits/,$(HEADERS_BITS_ARCH))
96 ifneq ($(TARGET_SUBARCH),)
97 ALL_HEADERS_BITS_SUBARCH := $(addprefix include/bits/,$(HEADERS_BITS_SUBARCH))
98 else
99 ALL_HEADERS_BITS_SUBARCH :=
100 endif
101 ALL_HEADERS_SYS_COMMON   := $(addprefix include/sys/,$(HEADERS_SYS_COMMON))
102 ALL_HEADERS_SYS_ARCH     := $(addprefix include/sys/,$(HEADERS_SYS_ARCH))
103
104 target-headers-sysdep := \
105         $(ALL_HEADERS_COMMON) \
106         $(ALL_HEADERS_BITS_COMMON) \
107         $(ALL_HEADERS_BITS_ARCH) \
108         $(ALL_HEADERS_BITS_SUBARCH) \
109         $(ALL_HEADERS_SYS_COMMON) \
110         $(ALL_HEADERS_SYS_ARCH)
111
112 include/fpu_control.h:
113         @$(disp_ln)
114         $(Q)[ -r libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
115                 $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
116                 $(LN) -fs ../libc/sysdeps/linux/common/$(@F) $@
117
118 include/dl-osinfo.h include/hp-timing.h:
119         $(do_ln) ../libc/sysdeps/linux/common/$(@F) $@
120
121 $(ALL_HEADERS_BITS_COMMON):
122         $(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@
123
124 $(ALL_HEADERS_BITS_ARCH):
125         $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
126
127 ifneq ($(TARGET_SUBARCH),)
128 $(ALL_HEADERS_BITS_SUBARCH):
129         $(do_ln) ../../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
130 endif
131
132 ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
133 $(ALL_HEADERS_SYS_COMMON):
134         $(do_ln) ../../libc/sysdeps/linux/common/sys/$(@F) $@
135 endif
136
137 ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
138 $(ALL_HEADERS_SYS_ARCH):
139         $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
140 endif
141
142 $(target-headers-sysdep): | include/bits
143
144 sysdep_common_headers-clean:
145         $(RM) $(ALL_HEADERS_COMMON)
146 headers_clean-y += sysdep_common_headers-clean
147
148 # The headers. Arch specific headers are specified via ARCH_HEADERS in
149 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
150 # libc/sysdeps/linux/Makefile.commonarch to headers-y
151 headers-y += $(target-headers-sysdep)
152
153 headers: include/bits/uClibc_config.h
154
155 pregen: include/bits/sysnum.h headers
156
157 include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
158         $(Q)$(INSTALL) -d $(@D)
159         @$(disp_gen)
160         $(Q)set -e; \
161         cd $(top_builddir); \
162         tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
163         [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
164         KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
165         if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
166                 $(RM) $$tmp; \
167         else \
168                 mv -f $$tmp include/bits/sysnum.h; \
169         fi
170         @# Ugly linux specific hack..
171         $(Q)if grep -q __NR_ $@; then true; else \
172                 rm -f $@; \
173                 echo "ERROR: Could not generate syscalls."; \
174                 echo "Make sure that you have proper kernel headers."; \
175                 echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
176                 echo "${KERNEL_HEADERS}"; \
177                 exit 1; \
178         fi
179
180 $(LOCAL_INSTALL_PATH):
181         $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
182         DEVEL_PREFIX=/usr/ \
183         HOSTCC="$(HOSTCC)" \
184         install
185
186 install: install_runtime install_dev
187
188
189 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
190
191 $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
192         $(hcompile.u)
193
194 # Installs header files.
195 # a "y" here means the feature is enabled and so we should *not* rm it.
196 # if the option expands to nothing though, we can punt the headers.
197 HEADERS_RM- := \
198         dl-osinfo.h \
199         _lfs_64.h \
200         bits/kernel_sigaction.h \
201         bits/kernel_stat.h \
202         bits/kernel_types.h \
203         bits/utmpx.h \
204         bits/uClibc_errno.h \
205         bits/uClibc_uintmaxtostr.h \
206         atomic.h \
207         bits/atomic.h \
208         bits/sigcontextinfo.h \
209         bits/stackinfo.h \
210         tls.h
211         # gcc 4.3.1 needs it, dont rm:
212         #bits/uClibc_arch_features.h
213 HEADERS_RM-$(UCLIBC_HAS_FLOATS) += \
214         complex.h \
215         fpu_control.h \
216         ieee754.h \
217         math.h \
218         tgmath.h \
219         bits/uClibc_fpmax.h \
220         bits/math*.h
221 HEADERS_RM-$(UCLIBC_HAS_GNU_GETOPT)$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
222 HEADERS_RM-$(UCLIBC_HAS_REALTIME) += \
223         mqueue.h \
224         bits/mqueue.h \
225         sched.h \
226         bits/sched.h \
227         semaphore.h
228 HEADERS_RM-$(UCLIBC_HAS_THREADS) += \
229         *thread*.h \
230         semaphore.h \
231         bits/*thread*.h \
232         bits/initspin.h
233 HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += \
234         sys/fsuid.h \
235         sys/inotify.h \
236         sys/perm.h \
237         sys/personality.h \
238         sys/prctl.h \
239         sys/reboot.h \
240         sys/sendfile.h \
241         sys/signalfd.h \
242         bits/statfs.h \
243         sys/statfs.h \
244         sys/swap.h \
245         sys/sysctl.h \
246         sys/sysinfo.h \
247         sys/vfs.h
248 HEADERS_RM-$(HAVE_SHARED)                    += dlfcn.h bits/dlfcn.h
249 HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT)         += thread_db.h
250 HEADERS_RM-$(UCLIBC_HAS_BSD_ERR)             += err.h
251 HEADERS_RM-$(UCLIBC_HAS_CRYPT)               += crypt.h
252 HEADERS_RM-$(UCLIBC_HAS_EPOLL)               += sys/epoll.h
253 HEADERS_RM-$(UCLIBC_HAS_FENV)                += fenv.h bits/fenv.h bits/fenvinline.h
254 HEADERS_RM-$(UCLIBC_HAS_FTW)                 += ftw.h
255 HEADERS_RM-$(UCLIBC_HAS_GETTEXT_AWARENESS)   += libintl.h
256 HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
257 HEADERS_RM-$(UCLIBC_HAS_GLOB)                += glob.h
258 HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR)           += error.h
259 HEADERS_RM-$(UCLIBC_HAS_IPV6)                += netinet/ip6.h netinet/icmp6.h
260 HEADERS_RM-$(UCLIBC_HAS_LOCALE)              += iconv.h
261 HEADERS_RM-$(UCLIBC_HAS_PTY)                 += pty.h
262 HEADERS_RM-$(UCLIBC_HAS_REGEX)               += regex.h regexp.h
263 HEADERS_RM-$(UCLIBC_HAS_RPC)                 += rpc
264 HEADERS_RM-$(UCLIBC_HAS_SHADOW)              += shadow.h
265 HEADERS_RM-$(UCLIBC_HAS_SOCKET)              += sys/socket.h bits/socket.h sys/socketvar.h
266 HEADERS_RM-$(UCLIBC_HAS_SYSLOG)              += syslog.h sys/syslog.h bits/syslog*.h
267 HEADERS_RM-$(UCLIBC_HAS_WCHAR)               += wchar.h wctype.h
268 HEADERS_RM-$(UCLIBC_HAS_WORDEXP)             += wordexp.h
269 HEADERS_RM-$(UCLIBC_HAS_XATTR)               += sys/xattr.h
270 HEADERS_RM-$(UCLIBC_HAS_XLOCALE)             += xlocale.h
271 HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG)   += ifaddrs.h
272 HEADERS_RM-$(UCLIBC_SV4_DEPRECATED)          += ustat.h sys/ustat.h bits/ustat.h
273 HEADERS_RM-$(UCLIBC_SUSV3_LEGACY)            += sys/timeb.h regexp.h
274         # BREAKAGE: include/signal.h uses it, this rm broke bbox compile:
275         ### ucontext.h
276
277 install_headers: headers $(top_builddir)extra/scripts/unifdef
278         $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
279         top_builddir=$(top_builddir) \
280         $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
281         # Disabled. If libc-internal.h is needed, document here why!
282         #printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' >$(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
283         echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
284                 $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
285         cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -r $(HEADERS_RM-)
286
287 # Installs development library links.
288 install_dev: install_headers all
289         $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
290         -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
291 ifeq ($(HAVE_SHARED),y)
292         for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
293         $(SED) -e 's/lib\///'` ; do \
294                 $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
295                 $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \
296         done
297 ifeq ($(HARDWIRED_ABSPATH),y)
298         if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
299                 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
300                 $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \
301                     -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \
302                     -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \
303                     $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
304         fi
305 else
306         -$(INSTALL) -m 644 lib/libc.so $(PREFIX)$(DEVEL_PREFIX)lib/
307 endif
308 ifeq ($(UCLIBC_HAS_THREADS),y)
309 ifneq ($(LINUXTHREADS_OLD),y)
310 ifeq ($(HARDWIRED_ABSPATH),y)
311         if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \
312                 $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
313                 cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
314                 echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \
315                         >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \
316         fi
317 else
318         -$(INSTALL) -m 644 lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)lib/
319 endif
320 endif
321 endif
322 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
323         $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
324                 $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
325 endif
326 ifeq ($(DOPIC),y)
327 #       # If we build shared libraries then the static libs are PIC...
328 #       # Make _pic.a symlinks to make mklibs.py and similar tools happy.
329         if [ -d lib ] ; then \
330                 for i in `find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \
331                         $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \
332                                 | $(SED) -e 's/\.a$$/_pic.a/'`; \
333                 done ; \
334         fi
335 endif
336 endif
337 ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
338         for file in lib/lib*.gdb; do \
339                 if test -f $$file; then \
340                         $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \
341                         $(INSTALL) -m 755 `echo $$file | $(SED) 's/\.gdb$$//'` \
342                           $(PREFIX)$(DEVEL_PREFIX)lib; \
343                 fi; \
344         done
345 endif
346
347 # Installs run-time libraries
348 install_runtime: all
349 ifeq ($(HAVE_SHARED),y)
350         $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
351         $(INSTALL) -m 644 lib/lib*-$(VERSION).so \
352                 $(PREFIX)$(RUNTIME_PREFIX)lib
353         (cd lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
354         @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
355                 set -e; \
356                 $(SHELL_SET_X); \
357                 $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
358                         $(PREFIX)$(RUNTIME_PREFIX)lib; \
359         fi
360 endif
361
362 utils:
363         $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
364
365 # Installs helper applications, such as 'ldd' and 'ldconfig'
366 install_utils: utils
367         $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
368
369 endif # ifeq ($(HAVE_DOT_CONFIG),y)
370
371 hostutils:
372         $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" -C utils hostutils
373
374 install_hostutils: hostutils
375         $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install DOTHOST=.host
376
377 include/bits include/config:
378         @$(disp_mkdir)
379         $(Q)$(INSTALL) -d $@
380
381 # configuration
382 # ---------------------------------------------------------------------------
383 extra/config/conf extra/config/mconf: | include/config
384         $(Q)$(MAKE) -C extra/config $(notdir $@)
385
386 menuconfig: extra/config/mconf
387         $(Q)./extra/config/mconf extra/Configs/Config.in
388
389 config: extra/config/conf
390         $(Q)./extra/config/conf extra/Configs/Config.in
391
392 oldconfig: extra/config/conf
393         $(Q)./extra/config/conf -o extra/Configs/Config.in
394
395 silentoldconfig: extra/config/conf
396         $(Q)./extra/config/conf -s extra/Configs/Config.in
397
398 randconfig: extra/config/conf
399         $(Q)./extra/config/conf -r extra/Configs/Config.in
400
401 allyesconfig: extra/config/conf
402         $(Q)./extra/config/conf -y extra/Configs/Config.in
403         $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
404         $(SED) -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
405         $(SED) -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
406         $(SED) -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
407         $(SED) -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
408         $(Q)./extra/config/conf -o extra/Configs/Config.in
409
410 allnoconfig: extra/config/conf
411         $(Q)./extra/config/conf -n extra/Configs/Config.in
412
413 defconfig: extra/config/conf
414         $(Q)./extra/config/conf -d extra/Configs/Config.in \
415                 -D extra/Configs/defconfigs/$(ARCH)
416
417 include_clean:
418         $(Q)$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
419         @set -e; \
420         for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
421                 $(RM) include/sys/$$i; \
422         done; \
423         if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
424                 for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
425                         $(RM) include/sys/$$i; \
426                 done; \
427         fi
428
429 clean: include_clean
430         $(Q)$(RM) -r lib include/bits
431         @$(MAKE) -C utils utils_clean
432         +$(MAKE) -s -C test clean
433         @$(RM) include/linux include/asm*
434         $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
435         $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
436
437 distclean: clean
438         -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
439         $(RM) .config .config.old .config.cmd
440         $(RM) extra/locale/*.tgz
441         $(MAKE) -C extra/config distclean
442
443 dist release:
444         $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
445         svn -q export . ../uClibc-$(VERSION)
446         $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
447         du -b ../uClibc-$(VERSION).tar.bz2
448
449 test check: test_compile
450         $(Q)$(MAKE) -C test
451
452 test_compile: $(LOCAL_INSTALL_PATH)
453         $(Q)$(MAKE) -C test compile