make clean for DocBook
Hi Sam,
'make clean' doesn't seem to descend into Documentation/DocBook/. At least 'make V=1 clean' doesn't show me any references in DocBook.
I guess that this is because DocBook doesn't have anything that qualifies in obj-y/m/n and subdir-y/m/n. (?)
Do you have any recommendations for this?
Thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 7 lines · Randy Dunlap
Hi Sam,
'make clean' doesn't seem to descend into
Documentation/DocBook/. At least 'make V=1 clean' doesn't show me any references in DocBook.I guess that this is because DocBook doesn't have anything that qualifies in obj-y/m/n and subdir-y/m/n. (?)
Documentation/ is handled explicit i top-level Makefile:
mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
PHONY += $(mrproper-dirs) mrproper archmrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
And we will visit DocBook with mrproper - but not clean. I have no stron opinion when to delete generated files in DocBook.
Sam
Quoted 13 lines · On Fri, 13 Apr 2007 18:41:42 +0200 Sam Ravnborg wrote:
Quoted 7 lines · Randy Dunlap
Hi Sam,
'make clean' doesn't seem to descend into
Documentation/DocBook/. At least 'make V=1 clean' doesn't show me any references in DocBook.I guess that this is because DocBook doesn't have anything that qualifies in obj-y/m/n and subdir-y/m/n. (?)
Documentation/is handled explicit i top-levelMakefile:mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
Quoted 7 lines
PHONY += $(mrproper-dirs) mrproper archmrproper
$(mrproper-dirs):$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)And we will visit DocBook with mrproper - but not clean. I have no stron opinion when to delete generated files in DocBook.
OK, that's fine, thanks for the info...
but trying 'make mrproper' gives me:
make -f scripts/Makefile.clean obj=Documentation/DocBook make -f scripts/Makefile.clean obj=Documentation/DocBook/man/ make[2]: execvp: /bin/sh: Argument list too long make[2]: *** [__clean] Error 127
make[1]: *** [Documentation/DocBook/man/] Error 2
make: *** [_mrproper_Documentation/DocBook] Error 2
DocBook/man/ contains about 2000 files.
Is there some way to have scripts/Makefile.clean just do
rm -rf Documentation/DocBook/man/
? or some other solution?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 15 lines
Quoted 4 lines
And we will visit DocBook with mrproper - but not clean. I have no stron opinion when to delete generated files in DocBook.
OK, that's fine, thanks for the info...
but trying 'make mrproper' gives me:make -f
scripts/Makefile.cleanobj=Documentation/DocBook make -fscripts/Makefile.cleanobj=Documentation/DocBook/man/ make[2]: execvp:/bin/sh: Argument list too long make[2]: *** [__clean] Error 127
make[1]: *** [Documentation/DocBook/man/] Error 2
make: *** [_mrproper_Documentation/DocBook] Error 2
Quoted 4 lines
DocBook/man/ contains about 2000 files.
Is there some way to havescripts/Makefile.cleanjust do
rm -rfDocumentation/DocBook/man/
? or some other solution?
Something like this should do it.
This deletes the man/ directory entirely so
I have to do that when I check in the patch.
Let me know if this works for you.
Sam
Documentation/DocBook/Makefile +2 -5
@@ -152,6 +152,7 @@ quiet_cmd_db2man = MAN $@ @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \ exit 1) + $(Q)mkdir -p $(obj)/man $(call cmd,db2man) @touch $@
@@ -212,11 +213,7 @@ clean-files := $(DOCBOOKS) \ $(patsubst %.xml, %.9, $(DOCBOOKS)) \ $(C-procfs-example) -clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) - -#man put files in man subdir - traverse down -subdir- := man/ - +clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable se we can use it in if_changed and friends.
Documentation/DocBook/man/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -# Rules are put in Documentation/DocBook - -clean-files := *.9.gz *.sgml manpage.links manpage.refs
Randy Dunlap
Acked-byQuoted 20 lines · On Fri, 13 Apr 2007 21:32:50 +0200 Sam Ravnborg wrote:
Quoted 15 lines
Quoted 4 lines
And we will visit DocBook with mrproper - but not clean. I have no stron opinion when to delete generated files in DocBook.
OK, that's fine, thanks for the info...
but trying 'make mrproper' gives me:make -f
scripts/Makefile.cleanobj=Documentation/DocBook make -fscripts/Makefile.cleanobj=Documentation/DocBook/man/ make[2]: execvp:/bin/sh: Argument list too long make[2]: *** [__clean] Error 127
make[1]: *** [Documentation/DocBook/man/] Error 2
make: *** [_mrproper_Documentation/DocBook] Error 2Quoted 4 lines
DocBook/man/ contains about 2000 files.
Is there some way to havescripts/Makefile.cleanjust do
rm -rfDocumentation/DocBook/man/
? or some other solution?
Quoted 5 lines
Something like this should do it.
This deletes the man/ directory entirely so
I have to do that when I check in the patch.Let me know if this works for you.
Yes, thanks.
Quoted 33 lines
Sam
Documentation/DocBook/Makefile +2
-5@@ -152,6 +152,7 @@ quiet_cmd_db2man = MAN $@ @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \ exit 1) + $(Q)mkdir -p $(obj)/man $(call cmd,db2man) @touch $@@@ -212,11 +213,7 @@ clean-files := $(DOCBOOKS) \ $(patsubst %.xml, %.9, $(DOCBOOKS)) \ $(C-procfs-example) -clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) - -#man put files in man subdir - traverse down -subdir- := man/ - +clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable se we can use it in if_changed and friends.Documentation/DocBook/man/Makefile deleted +0
-0
Documentation/DocBook/man/Makefile
Quoted 5 lines
Documentation/DocBook/man/Makefile deleted +0
-4@@ -1,3 +0,0 @@ -# Rules are put in Documentation/DocBook - -clean-files := *.9.gz *.sgml manpage.links manpage.refs -
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 26 lines · Randy Dunlap
Quoted 24 lines · On Fri, 13 Apr 2007 21:32:50 +0200 Sam Ravnborg wrote:
Quoted 15 lines
Quoted 4 lines
And we will visit DocBook with mrproper - but not clean. I have no stron opinion when to delete generated files in DocBook.
OK, that's fine, thanks for the info...
but trying 'make mrproper' gives me:make -f
scripts/Makefile.cleanobj=Documentation/DocBook make -fscripts/Makefile.cleanobj=Documentation/DocBook/man/ make[2]: execvp:/bin/sh: Argument list too long make[2]: *** [__clean] Error 127
make[1]: *** [Documentation/DocBook/man/] Error 2
make: *** [_mrproper_Documentation/DocBook] Error 2Quoted 4 lines
DocBook/man/ contains about 2000 files.
Is there some way to havescripts/Makefile.cleanjust do
rm -rfDocumentation/DocBook/man/
? or some other solution?Something like this should do it.
This deletes the man/ directory entirely so
I have to do that when I check in the patch.
Quoted 5 lines
Quoted 1 line
Let me know if this works for you.
Yes, thanks.
Acked-by Randy Dunlap <[email protected]>
Thanks, pushed out to kbuild.git.
Sam