Distclean does not remove gram.c

Started by Gurjeet Singhover 15 years ago5 messages
#1Gurjeet Singh
singh.gurjeet@gmail.com

The src/backend/parser/gram.c is a generated file, so shouldn't this be
removed by `make distclean`, or maybe even by `make clean`?

I did a `git clean -f -d` and even that did not remove gram.c, apparently
because this file _was_ alive at some point in the past hence git won't
remove it even though the current branch does not have gram.c.

Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.enterprisedb.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gurjeet Singh (#1)
Re: Distclean does not remove gram.c

Gurjeet Singh <singh.gurjeet@gmail.com> writes:

The src/backend/parser/gram.c is a generated file, so shouldn't this be
removed by `make distclean`, or maybe even by `make clean`?

No. It's shipped in distribution tarballs. If you want all derived
files to be removed, use make maintainer-clean.

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Gurjeet Singh (#1)
Re: Distclean does not remove gram.c

Gurjeet Singh wrote:

I did a `git clean -f -d` and even that did not remove gram.c,
apparently because this file _was_ alive at some point in the past
hence git won't remove it even though the current branch does not have
gram.c.

At first glance that looks like a git bug.

cheers

andrew

#4Robert Haas
robertmhaas@gmail.com
In reply to: Andrew Dunstan (#3)
Re: Distclean does not remove gram.c

On Wed, May 26, 2010 at 8:20 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

Gurjeet Singh wrote:

I did a `git clean -f -d` and even that did not remove gram.c, apparently
because this file _was_ alive at some point in the past hence git won't
remove it even though the current branch does not have gram.c.

At first glance that looks like a git bug.

My guess is that either .git/info/exclude or a .gitignore file
someplace says to ignore gram.c. git clean -df will not remove such
files; you need git clean -dfx if you want that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

#5Gurjeet Singh
singh.gurjeet@gmail.com
In reply to: Robert Haas (#4)
Re: Distclean does not remove gram.c

On Wed, May 26, 2010 at 9:00 PM, Robert Haas <robertmhaas@gmail.com> wrote:

On Wed, May 26, 2010 at 8:20 PM, Andrew Dunstan <andrew@dunslane.net>
wrote:

Gurjeet Singh wrote:

I did a `git clean -f -d` and even that did not remove gram.c,

apparently

because this file _was_ alive at some point in the past hence git won't
remove it even though the current branch does not have gram.c.

At first glance that looks like a git bug.

My guess is that either .git/info/exclude or a .gitignore file
someplace says to ignore gram.c. git clean -df will not remove such
files; you need git clean -dfx if you want that.

Yes indeed, -x is what I needed.

Thanks.
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.enterprisedb.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device