Skip to content

Commit 2810ae8

Browse files
rddunlapsravnborg
authored andcommitted
docbook: make cleandocs
Add a 'make cleandocs' target to clean up all generated DocBook files. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 9e5ec86 commit 2810ae8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎Documentation/DocBook/Makefile‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ PS_METHOD = $(prefer-db2x)
3131

3232
###
3333
# The targets that may be used.
34-
PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
34+
PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
3535

3636
BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
3737
xmldocs: $(BOOKS)
@@ -213,11 +213,12 @@ silent_gen_xml = :
213213
dochelp:
214214
@echo ' Linux kernel internal documentation in different formats:'
215215
@echo ' htmldocs - HTML'
216-
@echo ' installmandocs - install man pages generated by mandocs'
217-
@echo ' mandocs - man pages'
218216
@echo ' pdfdocs - PDF'
219217
@echo ' psdocs - Postscript'
220218
@echo ' xmldocs - XML DocBook'
219+
@echo ' mandocs - man pages'
220+
@echo ' installmandocs - install man pages generated by mandocs'
221+
@echo ' cleandocs - clean all generated DocBook files'
221222

222223
###
223224
# Temporary files left by various tools
@@ -235,6 +236,10 @@ clean-files := $(DOCBOOKS) \
235236

236237
clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
237238

239+
cleandocs:
240+
$(Q)rm -f $(call objectify, $(clean-files))
241+
$(Q)rm -rf $(call objectify, $(clean-dirs))
242+
238243
# Declare the contents of the .PHONY variable as phony. We keep that
239244
# information in a variable se we can use it in if_changed and friends.
240245

0 commit comments

Comments
 (0)