Patchwork [02/23] manual: make clean target consistent with others in buildroot

login
register
mail settings
Submitter Samuel Martin
Date Nov. 11, 2012, 1:14 p.m.
Message ID <1352639701-27829-3-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/198261/
State Superseded
Headers show

Comments

Samuel Martin - Nov. 11, 2012, 1:14 p.m.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Arnout Vandecappelle - Nov. 11, 2012, 10:57 p.m.
On 11/11/12 14:14, Samuel Martin wrote:
> Signed-off-by: Samuel Martin<s.martin49@gmail.com>
>
> diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
> index 1eaf73a..83d2fcb 100644
> --- a/docs/manual/manual.mk
> +++ b/docs/manual/manual.mk
> @@ -38,10 +38,10 @@ $(call GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
>   $(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
>   $(call GENDOC_INNER,$(1),text,txt,text,Text)
>   $(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
> -clean: clean-$(1)
> -clean-$(1):
> +clean clean-$(1): $(1)-clean

  I think you can safely remove clean-$(1) - or should we consider this API?

  Regards,
  Arnout

> +$(1)-clean:
>   	$(Q)$(RM) -rf $(O)/docs/$(1)
> -.PHONY: $(1) clean-$(1)
> +.PHONY: $(1) $(1)-clean
>   endef
>
>   MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)
Samuel Martin - Nov. 11, 2012, 11:34 p.m.
2012/11/11 Arnout Vandecappelle <arnout@mind.be>:
> On 11/11/12 14:14, Samuel Martin wrote:
>>
>> Signed-off-by: Samuel Martin<s.martin49@gmail.com>
>>
>> diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
>> index 1eaf73a..83d2fcb 100644
>> --- a/docs/manual/manual.mk
>> +++ b/docs/manual/manual.mk
>> @@ -38,10 +38,10 @@ $(call
>> GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
>>   $(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P
>> latex.output.revhistory=0")
>>   $(call GENDOC_INNER,$(1),text,txt,text,Text)
>>   $(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
>> -clean: clean-$(1)
>> -clean-$(1):
>> +clean clean-$(1): $(1)-clean
>
>
>  I think you can safely remove clean-$(1) - or should we consider this API?
Actually, I kept it to, at least, not break the release.
IIRC, Peter generates the manual and includes it in the release tarball.
That's why I choose the safe path ;-) but I can remove it as soon as
Peter has confirmed it does not break anything.

Regards,
Peter Korsgaard - Nov. 15, 2012, 9:56 p.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 >> I think you can safely remove clean-$(1) - or should we consider this API?

 Samuel> Actually, I kept it to, at least, not break the release.  IIRC,
 Samuel> Peter generates the manual and includes it in the release
 Samuel> tarball.  That's why I choose the safe path ;-) but I can
 Samuel> remove it as soon as Peter has confirmed it does not break
 Samuel> anything.

I just use 'make release' which doesn't use the clean target, so it can
get removed.

Patch

diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
index 1eaf73a..83d2fcb 100644
--- a/docs/manual/manual.mk
+++ b/docs/manual/manual.mk
@@ -38,10 +38,10 @@  $(call GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
 $(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
 $(call GENDOC_INNER,$(1),text,txt,text,Text)
 $(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
-clean: clean-$(1)
-clean-$(1):
+clean clean-$(1): $(1)-clean
+$(1)-clean:
 	$(Q)$(RM) -rf $(O)/docs/$(1)
-.PHONY: $(1) clean-$(1)
+.PHONY: $(1) $(1)-clean
 endef
 
 MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)