# [PATCH] Makefile: Fix 'clean' target to remove all gitweb build files

2 messages from 2010-05-08 to 2010-05-08. Participants: Ramsay Jones, Jakub Narebski.
Thread: https://gitlist.dev/t/23747

## Ramsay Jones, 2010-05-08 17:36

Subject: [PATCH] Makefile: Fix 'clean' target to remove all gitweb build files
Message-ID: <4BE5A10F.6040401@ramsay1.demon.co.uk>
URL: https://gitlist.dev/e/4BE5A10F.6040401%40ramsay1.demon.co.uk

```

In particular the gitweb/GITWEB-BUILD-OPTIONS file was not being
removed by the main Makefile. However, the gitweb/Makefile has a
'clean' target that correctly removes all the build products.
In order to fix the problem, rather than duplicate the clean-up
instructions, we change the main Makefile so that it delegates
the clean-up actions to the gitweb Makefile.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 910f471..eb1d162 100644
--- a/Makefile
+++ b/Makefile
@@ -2098,7 +2098,7 @@ clean:
 	$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
 	$(MAKE) -C Documentation/ clean
 ifndef NO_PERL
-	$(RM) gitweb/gitweb.cgi gitweb/gitweb.min.*
+	$(MAKE) -C gitweb clean
 	$(MAKE) -C perl clean
 endif
 ifndef NO_PYTHON
-- 
1.7.1

```

## Jakub Narebski, 2010-05-08 18:07

Subject: Re: [PATCH] Makefile: Fix 'clean' target to remove all gitweb build files
Message-ID: <m3fx22e08t.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3fx22e08t.fsf%40localhost.localdomain
In-Reply-To: <4BE5A10F.6040401@ramsay1.demon.co.uk>

```
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> In particular the gitweb/GITWEB-BUILD-OPTIONS file was not being
> removed by the main Makefile. However, the gitweb/Makefile has a
> 'clean' target that correctly removes all the build products.
> In order to fix the problem, rather than duplicate the clean-up
> instructions, we change the main Makefile so that it delegates
> the clean-up actions to the gitweb Makefile.
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

For what it is worth

Acked-by: Jakub Narebski <jnareb@gmail.com>

> ---
>  Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 910f471..eb1d162 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2098,7 +2098,7 @@ clean:
>  	$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
>  	$(MAKE) -C Documentation/ clean
>  ifndef NO_PERL
> -	$(RM) gitweb/gitweb.cgi gitweb/gitweb.min.*
> +	$(MAKE) -C gitweb clean
>  	$(MAKE) -C perl clean
>  endif
>  ifndef NO_PYTHON
> -- 
> 1.7.1

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```
