Skip to contentSkip to conversation

clean specified files instead of wildcarding

PATCH In review Hollis Blanchard 2 participants 4 messages Aug 8, 2006 – Aug 9, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clean specified files instead of wildcarding

# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1155081241 18000
# Node ID fbf4e91468b00b4343e35ac899fd55c1099dd328 # Parent aed85530f3c224821ff3f2b8e4631e56a754729a [LIBXC] clean specified files instead of wildcarding

tools/libxc/Makefile +3 -2
diff -r aed85530f3c2 -r fbf4e91468b0 tools/libxc/Makefile
@@ -99,8 +99,9 @@ TAGS:
 
 .PHONY: clean
 clean:
-	rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
-	rm -rf ia64/*.o ia64/*.opic
+	rm -rf *.rpm $(LIB) *~ $(DEPS) xen \
+            $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
+            $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
 
 .PHONY: rpm
 rpm: build
#2 lore raw
Quoted 7 lines · Keir Fraser
Quoted 2 lines · Hollis Blanchard

[LIBXC] clean specified files instead of wildcarding

We wildcard in all the other makefiles. Is it a problem here?

Well yes. The problem is that we're now adding subdirectories under tools/libxc, so rm -rf *.o doesn't clean them. The IA64 guys just added rm -rf ia64/*.o, but we shouldn't need to guess: we already have these handy variables telling us exactly where all the object files are. If you prefer, we can add another unconditional rm -rf powerpc64/* in the IA64 style...

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#3 lore raw
Quoted 8 lines · Hollis Blanchard
Quoted 1 line

We wildcard in all the other makefiles. Is it a problem here?

Well yes. The problem is that we're now adding subdirectories under tools/libxc, so rm -rf *.o doesn't clean them. The IA64 guys just added rm -rf ia64/*.o, but we shouldn't need to guess: we already have these handy variables telling us exactly where all the object files are. If you prefer, we can add another unconditional rm -rf powerpc64/* in the IA64 style...

Okay, your approach is cleaner.

-- Keir