[Spice-devel] [protocol] Add spice/Makefile to the generated .gitignore

Jeremy White jwhite at codeweavers.com
Wed Jul 4 08:03:16 PDT 2012


> Hi,
> 
> I think you want to search for Makefile(s) in the build directory
> not the source directory.
> I guess the build directory would be the current directory for this Makefile.
> Is  MAINTAINERCLEANFILES the approrpriate place for Makefiles?
> Makefiles are removed by 'distclean' or 'maintainer-clean' targets.

I think this is, sadly, more tangled than first meets the eye.

That is, I share your instincts, but pressing further it appears messy.

First of all, the stock git.mk (which we have taken, essentially unmodified
from the https://github.com/behdad/git.mk), is *supposed* to
add Makefile and Makefile.in to the .gitignore file.

For reasons I can't puzzle out of the code, Shaun (the git.mk author) felt that all paths needed
to be prefixed with a '/' in the .gitignore.  This has the effect of making spice/.gitignore
contain '/Makefile' (and /Makefile.in), which does not work.

To overcome this for Makefile.in, Marc-André added the 'find' hack to Makefile.am.  Thus, when I
got sick and tired of git status always telling me that spice-common was dirty, I
chose to extend the hack by adding Makefile to it; hence my patch.

If you believe that git.mk is broken, then the attached patch 'fixes' it.  This
presumes that Shaun used the preceeding / as an anchor, rather than just
using a '^' to anchor the expression, and there is no other rational.

I will email Shaun this patch to see if it is an easy oversight, or if there
is more than I have not understood, and to see if he can come up with a way to fix it for us.

Cheers,

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: removeslash.diff
Type: text/x-patch
Size: 2498 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120704/5a5bf30e/attachment-0001.bin>


More information about the Spice-devel mailing list