diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-01-15 13:33:11 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-01-15 13:35:33 -0500 |
commit | 27fb7ccf7e00b1d94b7b13989006aa2da7edef9a (patch) | |
tree | b1ae69779e3f07dc52df0bb74571fd1badd26495 /Makefile.in | |
parent | 26242d9e53bcb0997000aa2a50c6c9a72f92541d (diff) |
buildsys: simplify include_clean greatly
Since we want to clean out all the headers we symlinked into include/,
just use `find` to locate all the symlinks for us. This simplifies it
greatly, and actually fixes bugs where we build for one arch, switch
to another, and then do a clean but the previous arch headers are left
behind.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in index b7b491738..d0ac6c027 100644 --- a/Makefile.in +++ b/Makefile.in @@ -466,23 +466,18 @@ defconfig: $(conf) menuconfig-clean-y: $(Q)$(MAKE) -C extra/config CLEAN_extra/config +# The find here should continue to work as long as we are only symlinking +# headers in to include/. I don't see this changing to anything else, so +# it should be fine. include_clean: - $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h - @set -e; \ - for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \ - $(RM) $(top_builddir)include/sys/$$i; \ - done; \ - if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \ - for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \ - $(RM) $(top_builddir)include/sys/$$i; \ - done; \ - fi + $(SECHO) " CLEAN include" + $(Q)$(RM) -r $(top_builddir)include/bits + $(Q)find $(top_builddir)include/ -type l -exec rm -f {} + clean: include_clean - $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits + $(Q)$(RM) -r $(top_builddir)lib @$(MAKE) -C utils CLEAN_utils +$(MAKE) -s -C test clean - @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm* $(Q)$(RM) $(top_builddir)extra/scripts/unifdef $(Q)$(RM) -r $(LOCAL_INSTALL_PATH) |