[PATCH] Makefile.in: better clean

2008-03-05 Thread Carmelo Amoroso

Hi All,
I've discovered (at least on nptl branch) that issuing
make clean from the top dir not all files are cleaned-up
(i.e. some symlink into nptl directory).
This causes 'svn status' showing a lot of ? due files
not controlled by CM.
I've found that the clean target in top Makefile.in
doesn't call make objclean_y (while it calls headers_clean-y).

Doing this fix, we can remove the find commnad.
I've tested the patch on trunk doing a full build for sh4/linuxthread.old
then a 'make clean' and 'svn status' without extra files left.

Any concerns with the patch ?

Please, find attached the log of the clean
Call objclean target instead of using find command to do a build clean.
This ensures that all files created on-the-fly during the build
will be removed if correctly listed into the objclean-y target.

Signed-off-by: Carmelo Amoroso <[EMAIL PROTECTED]>

Index: Makefile.in
===
--- Makefile.in (revision 21163)
+++ Makefile.in (working copy)
@@ -343,8 +343,7 @@
$(Q)$(RM) -r lib include/bits
$(RM) lib*/*.a ldso/*/*.a libpthread/*/*.a
$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
-   $(MAKE) -C extra/locale locale_clean
-   $(MAKE) headers_clean-y
+   $(MAKE) objclean-y headers_clean-y
$(MAKE) -s -C test clean
$(MAKE) -C utils utils_clean
@set -e; \
@@ -357,7 +356,6 @@
done; \
fi
@$(RM) include/linux include/asm*
-   -find . \( -name \*.o -o -name \*.os -o -name \*.oS \) -exec $(RM) {} \;
 
 distclean: clean
-find . \( -name core -o -name \*.orig -o -name \*~ \) -exec $(RM) {} \;
rm -f -r lib include/bits
rm -f lib*/*.a ldso/*/*.a libpthread/*/*.a
rm -f include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
make objclean-y headers_clean-y
rm -f ./ldso/ldso/*.{o,os,oS,a} ./ldso/ldso/*/*.{o,os,oS}
rm -f ./ldso/libdl/*.{o,os,a,oS}
rm -f ./libcrypt/*.{o,os,oS,a}
rm -f ./libintl/*.{o,os,a}
rm -f ./libm/{,*/,*/*/}*.{o,os,oS,a}
rm -f ./libnsl/*.{o,os,a}
rm -f ./libresolv/*.{o,os,a}
rm -f ./libutil/*.{o,os,oS,a}
rm -f ./libpthread/linuxthreads.old/*.{o,os,oS,a}
rm -f ./libpthread/linuxthreads.old_db/*.{o,os,oS,a}
rm -f ./librt/*.{o,os,a}
rm -f ./extra/locale/gen_collate ./extra/locale/gen_wc8bit 
./extra/locale/gen_wctype ./extra/locale/locale_data.c 
./extra/locale/{*.{o,os,txt},gen_locale,gen_ldc}
rm -f 
./extra/locale/{uClibc_locale_data,lt_defines,c8tables,wctables,locale_tables,locale_collate}.h
rm -f ./extra/locale/{lmmtolso,gen_mmap,locale.mmap}
rm -f ./libc/sysdeps/linux/sh/*.{o,os} ./lib/crti.o ./lib/crtn.o ./lib/crt1.o 
./lib/Scrt1.o
rm -f ./libc/sysdeps/linux/common/*.{o,os,oS}
rm -f ./libc/misc/assert/*.{o,os}
rm -f ./libc/misc/ctype/*.{o,os}
rm -f ./libc/misc/dirent/*.{o,os}
rm -f ./libc/misc/error/*.{o,os}
rm -f ./libc/misc/file/*.{o,os,oS}
rm -f ./libc/misc/fnmatch/*.{o,os}
rm -f ./libc/misc/ftw/*.{o,os}
rm -f ./libc/misc/glob/*.{o,os}
rm -f ./libc/misc/gnu/*.{o,os}
rm -f ./libc/misc/internals/*.{o,os,oS}
rm -f ./libc/misc/locale/{*.{o,os}}
rm -f ./libc/misc/mntent/*.{o,os}
rm -f ./libc/misc/regex/*.{o,os}
rm -f ./libc/misc/search/*.{o,os}
rm -f ./libc/misc/statfs/*.{o,os,oS}
rm -f ./libc/misc/syslog/*.{o,os}
rm -f ./libc/misc/sysvipc/*.{o,os}
rm -f ./libc/misc/time/*.{o,os}
rm -f ./libc/misc/ttyent/*.{o,os}
rm -f ./libc/misc/utmp/*.{o,os}
rm -f ./libc/misc/wchar/*.{o,os}
rm -f ./libc/misc/wctype/*.{o,os}
rm -f ./libc/misc/wordexp/*.{o,os}
rm -f ./libc/pwd_grp/*.{o,os}
rm -f ./libc/stdio/*.{o,os,oS}
rm -f ./libc/string/{,*/}*.{o,os}
rm -f ./libc/termios/*.{o,os}
rm -f ./libc/inet/rpc/*.{o,os,oS}
rm -f ./libc/inet/*.{o,os}
rm -f ./libc/signal/*.{o,os}
rm -f ./libc/stdlib/malloc/*.{o,os}
rm -f ./libc/stdlib/malloc-simple/*.{o,os}
rm -f ./libc/stdlib/malloc-standard/*.{o,os}
rm -f ./libc/stdlib/*.{o,os,oS}
rm -f ./libc/unistd/*.{o,os}
rm -f ./libc/*.{o,os,oS,a}
rm -f ./include/pthread.h ./include/semaphore.h \
./include/bits/pthreadtypes.h
rm -f ./include/thread_db.h
make -s -C test clean
make -C utils utils_clean
rm -f ../utils/{ldconfig,ldd,readelf,iconv,*.host}
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Re: Problems with syscall for SH

2008-03-05 Thread Carmelo Amoroso
Thiago Galesi wrote:
> Hello
> 
> I am trying this with svn uclibc, and even with (moderately) old
> versions the result is the same.
> 
> I saw this problem discussed in older messages (for other archs), but
> it was not solved them
> 
> There is a conflict with the definition of syscall (in .h) and the
> implementation (for SH).
> 
> this is the .h (include/unistd.h)
> 
> extern long int syscall (long int __sysno, ...) __THROW;
> 
> this is the .c (libc/sysdeps/linux/sh/syscall.c)
> 
> long syscall(long sysnum,
>  long arg1, long arg2, long arg3,
>  long arg4, long arg5, long arg6)
> 
> Problem is, if I take the .c prototype and put it in the .h, things
> will not work (eg. there are problems with compiling pthread)
> 
> What would be the correct way to deal with this? Most archs don't have
> this problem, as they have a syscall.S file, ARM uses a .c, I'll try
> to figure out from there.
> 
> Thanks

Hello Thiago,
I cannot do any test just now, hopefully tomorrow
I will do a check on my sh4.

Carmelo
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc