On Mon, Jun 06, 2011 at 03:27:16PM +0200, Pierre Boutillier wrote:

> I'm sorry, it's a mistake !

> Do you like
> -----------------
> diff --git a/Nijmegen/CoRN/Makefile.common b/Nijmegen/CoRN/
> Makefile.common
> index faa8cc7..2791982 100644
> --- a/Nijmegen/CoRN/Makefile.common
> +++ b/Nijmegen/CoRN/Makefile.common
> @@ -209,11 +209,11 @@ binaries: $(BINARIES)
> 
>  binaries-clean:
>         rm -f $(BINARIES) $(IDEBIN)
> -       if [ -d "$(BINDIR)" ]; then rm -r "$(BINDIR)"; fi
> +       if [ -d "$(BINDIR)" ]; then find "$(BINDIR)" -type d -empty -exec 
> rmdir '{}' +; fi

Just a small tweak:

        if [ -d "$(BINDIR)" ]; then find -maxdepth 0 "$(BINDIR)" -type d -empty 
-delete; fi

Adding "-maxdepth 0" makes it truly equivalent to the "rmdir
--ignore-fail-if-non-empty", and using "-delete" instead of "-exec
rmdir '{}' +" is just an optimisation I don't insist upon.


> Le 6 juin 11 à 14:54, Lionel Elie Mamane a écrit :

> >On Mon, Jun 06, 2011 at 01:33:31PM +0200,
> >[email protected] wrote:
> >
> >>Log:
> >>Concequences of vector changes and some next issues masked by my
> >>mistake
> >
> >>Modified: trunk/Nijmegen/CoRN/Makefile.common
> >>===================================================================
> >>--- trunk/Nijmegen/CoRN/Makefile.common     2011-06-04 01:45:32 UTC
> >>(rev 1484)
> >>+++ trunk/Nijmegen/CoRN/Makefile.common     2011-06-06 11:33:30 UTC
> >>(rev 1485)
> >>@@ -203,17 +203,17 @@
> >># Real rules
> >
> >>binaries-clean:
> >>    rm -f $(BINARIES) $(IDEBIN)
> >>-   if [ -d "$(BINDIR)" ]; then rmdir --ignore-fail-on-non-empty
> >>"$(BINDIR)"; fi
> >>+   if [ -d "$(BINDIR)" ]; then rm -r "$(BINDIR)"; fi
> >
> >With my "CoRN build system maintainer" hat on, I'm not very fond of
> >this change, and of similar changes throughout the Makefile: this
> >means that any file not created by the build system that is in "bin/"
> >is silently deleted. I understand this as "can cause data loss", and
> >thus very user-unfriendly, to say the least.
> >
> >If you'd care to explain why you found that change necessary or
> >useful? Thanks in advance.

_______________________________________________
C-CoRN mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/c-corn

Reply via email to