The sys_socket module uses mostlyclean-local: mostlyclean-local: -rmdir sys 2>/dev/null
This makes it difficult for other modules to do the same. I get: Makefile:817: warning: overriding commands for target `mostlyclean-local' Makefile:712: warning: ignoring old commands for target `mostlyclean-local' How about this solution? 2006-06-17 Simon Josefsson <[EMAIL PROTECTED]> * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS, and remove them in mostlyclean-local. * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS. --- gnulib-tool 16 Jun 2006 17:36:28 +0200 1.112 +++ gnulib-tool 17 Jun 2006 21:54:18 +0200 @@ -749,6 +749,7 @@ echo "BUILT_SOURCES =" echo "SUFFIXES =" echo "MOSTLYCLEANFILES =" + echo "MOSTLYCLEANDIRS =" echo "CLEANFILES =" echo "DISTCLEANFILES =" echo "MAINTAINERCLEANFILES =" @@ -776,6 +777,8 @@ rm -f amsnippet.tmp fi done + echo "mostlyclean-local:" + echo " -test -n \"\$(MOSTLYCLEANDIRS)\" && rmdir \$(MOSTLYCLEANDIRS) 2>/dev/null" echo echo "# Makefile.am ends here" } --- sys_socket 16 Jun 2006 17:36:20 +0200 1.1 +++ sys_socket 17 Jun 2006 21:25:53 +0200 @@ -21,9 +21,7 @@ cp $(srcdir)/socket_.h [EMAIL PROTECTED] mv [EMAIL PROTECTED] $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t - -mostlyclean-local: - -rmdir sys 2>/dev/null +MOSTLYCLEANDIRS += sys Include: #include <sys/socket.h>