Re: [PATCH] BUILD: script to clean the build files

Michael Schonberg <mschonberg@...>

On 11/08/2011 12:41 PM, Jacobraj Benet wrote:
A script has been added to clear off all the build related files and this script would be triggered on dist clean command from Makefile.

This script basically clears all the build files, which makes it easy to merge and also check for any difference between the local files and the files in the repository.
Your mail client is not encoding the patch correctly. It is definitely
converting tabs to spaces which breaks the Makefile and has other formatting
issues as well. If you can't get your email client to send the patch
correctly, it is probably best to include a plain text attachment in addition
to the in-line patch. See: I have also had good
luck with git-send-email; however, you will likely need a gmail account or
something similar which you can configure to send email as jbenet@....

Try to keep the margin for your description at 80 characters.

Signed-off-by: Jacobraj Benet <jbenet@... <mailto:jbenet@...>>

diff --git a/Makefile b/Makefile
index 24c7555..e2df1e8 100644
--- a/Makefile
+++ b/Makefile
@@ -49,3 +49,6 @@ common-clean:
install: common-install mama-install

clean: common-clean mama-clean
+distclean: clean
+ ./
This should be:
sh ./".
Note that your mailer changed the tab to a space here as well. You could also
add "#!/bin/sh" to the script and make sure that the executable bit is set.

We will also need to provide an alternative to the shell script when we
reintroduce windows support. I suspect that Python might be a good choice since
we already depend on it for regression tests. It also depends on what tools we
choose for windows builds. In any event the shell script is fine for the moment.

The patch fails to add this as a new file. We should have something like:

--- /dev/null
+++ b/

If you are using git-diff to generate the patch, you need to add the new file,
commit your changes to your local repository and use "git diff HEAD^" to
generate the patch. If you format your checkin comment properly and setup git
with the correct configuration, git-format-patch works very well.

If you use diff you need to pass "-N" for new files to get applied correctly by
git-apply or git-am.

I will try to add some additional instructions to the web site.

cd common/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 <> configure doxyconfig-c libtool autom4te.cache config.log Makefile
Your email client did something funky here with

Also, automake provides "distclean" and "maintainer-clean" targets that do a
lot of the work for you. Something like this might provide a good starting

diff --git a/Makefile b/Makefile
index 24c7555..b98dd94 100644
--- a/Makefile
+++ b/Makefile
@@ -49,3 +49,19 @@ common-clean:
install: common-install mama-install

clean: common-clean mama-clean
+ cd mama/c_cpp ; make distclean; cd -
+ cd common/c_cpp ; make distclean -j1 -l80 ; cd -
+distclean: common-distclean mama-distclean
+cleanclean: distclean
+ cd mama/c_cpp ; make maintainer-clean; cd -
+ cd common/c_cpp ; make maintainer-clean; cd -

With this your script can be a lot smaller.

Also describe briefly how you verified the fix.


Join to automatically receive all group messages.