1 |
# Common makerules for cleaning directory trees. |
# Common makerules for cleaning directory trees. |
2 |
# |
# |
3 |
# COPYRIGHT (c) 2007 The Manticore Project (manticore.cs.uchicago.edu) |
# COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu) |
4 |
# All rights reserved. |
# All rights reserved. |
5 |
# |
# |
6 |
# This file defines standard rules for the clean, distclean, and devclean |
# This file defines standard rules for the clean, distclean, and devclean |
9 |
# CLEAN_SUBDIRS -- subdirectories to recursively clean |
# CLEAN_SUBDIRS -- subdirectories to recursively clean |
10 |
# CLEAN_FILES -- extra files to remove for clean target |
# CLEAN_FILES -- extra files to remove for clean target |
11 |
# The default is to remove CM subdirectories, |
# The default is to remove CM subdirectories, |
12 |
# .o files, .mbi files, and the $(TARGET). |
# .o files, .so files, .a files, .dSYM directories |
13 |
|
# and the $(TARGET). |
14 |
# DISTCLEAN_FILES -- extra files to remove for distclean target |
# DISTCLEAN_FILES -- extra files to remove for distclean target |
15 |
# The default is to remove Makefile. |
# The default is to remove Makefile. |
16 |
# DEVCLEAN_FILES -- extra files to remove for devclean target |
# DEVCLEAN_FILES -- extra files to remove for devclean target |
19 |
CLEAN_FILES += $(wildcard *.o) \ |
CLEAN_FILES += $(wildcard *.o) \ |
20 |
$(wildcard *.so) \ |
$(wildcard *.so) \ |
21 |
$(wildcard *.a) \ |
$(wildcard *.a) \ |
22 |
$(wildcard *.mbi) \ |
$(wildcard *.dSYM) \ |
23 |
$(TARGET) |
$(TARGET) |
24 |
DISTCLEAN_FILES += Makefile |
DISTCLEAN_FILES += Makefile |
25 |
|
|
33 |
fi |
fi |
34 |
|
|
35 |
local-clean: |
local-clean: |
36 |
-rm -f $(CLEAN_FILES) |
-rm -rf $(CLEAN_FILES) |
37 |
find . \( -name .cm -exec rm -rf {} \; -prune -print \) |
find . \( -name .cm -exec rm -rf {} \; -prune -print \) |
38 |
|
|
39 |
clean: sub-clean local-clean |
clean: sub-clean local-clean |