Opened 9 years ago

Closed 9 years ago

#4000 closed defect (fixed)

'make clean' on website doesn't remove html files that have no parent wml file

Reported by: arma Owned by: phobos
Priority: Medium Milestone:
Component: Webpages/Website Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


$(HTMLFILES) in Makefile.common consists of all the $2.html.$1 files that have a corresponding $1/$2.wml file.

So when 'make clean' does "rm -f $(HTMLFILES) $(DEPFILES)" it misses files whose wml file we have deleted.

For example, download/ exists and doesn't get cleaned, because download/de/ has no download.wml file.

Child Tickets

Change History (3)

comment:1 Changed 9 years ago by arma

This does the job for me:

Index: Makefile.common
--- Makefile.common     (revision 25062)
+++ Makefile.common     (working copy)
@@ -305,7 +305,7 @@
 dep: $(DEPFILES)
-       rm -f $(HTMLFILES) $(DEPFILES)
+       rm -f *.html.* $(DEPFILES)
        for sub in $(SUBDIRS); do \
                $(MAKE) -C "$$sub" WMLBASE=../$(WMLBASE) clean; \

Is there any reason it's a bad idea? (We do not have *.html.* files sitting around that are not autogenerated yet we want to keep.)

comment:2 Changed 9 years ago by arma

Going with the more thorough

-       rm -f $(HTMLFILES) $(DEPFILES)
+       rm -f *.html.* .deps/*.html.*.d

since we see a similar behavior with $(DEPFILES) not removing dep files that don't have corresponding wml file.

comment:3 Changed 9 years ago by arma

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.