Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /benchmarks/mk/clean-rules.gmk
ViewVC logotype

Annotation of /benchmarks/mk/clean-rules.gmk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1656 - (view) (download)

1 : jhr 1538 # Common makerules for cleaning directory trees.
2 :     #
3 :     # COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     # All rights reserved.
5 :     #
6 :     # This file defines standard rules for the clean, distclean, and devclean
7 :     # targets. To use, define the following make variables:
8 :     #
9 :     # CLEAN_SUBDIRS -- subdirectories to recursively clean
10 :     # CLEAN_FILES -- extra files to remove for clean target
11 :     # The default is to remove CM subdirectories,
12 :     # .o files, .so files, .a files, .dSYM directories
13 :     # and the $(TARGET).
14 :     # DISTCLEAN_FILES -- extra files to remove for distclean target
15 :     # The default is to remove Makefile.
16 :     # DEVCLEAN_FILES -- extra files to remove for devclean target
17 :     #
18 :    
19 : jhr 1656 CLEAN_FILES += bmark-seq.c bmark-par.c bmark-cl.c bmark-cl.cl \
20 :     $(wildcard *.o) \
21 :     $(wildcard *.txt) \
22 :     $(wildcard *.nrrd) \
23 :     $(TARGETS)
24 :    
25 : jhr 1538 DISTCLEAN_FILES += Makefile
26 :    
27 :     .PHONY: sub-clean local-clean clean
28 :     sub-clean:
29 :     dirs="$(CLEAN_SUBDIRS)"; \
30 :     if test -n "$$dirs" ; then \
31 :     for dir in $$dirs ; do \
32 :     (cd $$dir && $(MAKE) clean) \
33 :     done \
34 :     fi
35 :    
36 :     local-clean:
37 :     -rm -rf $(CLEAN_FILES)
38 :     find . \( -name .cm -exec rm -rf {} \; -prune -print \)
39 :    
40 :     clean: sub-clean local-clean
41 :    
42 :     .PHONY: sub-distclean local-distclean distclean
43 :     sub-distclean:
44 :     dirs="$(CLEAN_SUBDIRS)"; \
45 :     if test -n "$$dirs" ; then \
46 :     for dir in $$dirs ; do \
47 :     (cd $$dir && $(MAKE) distclean) \
48 :     done \
49 :     fi
50 :    
51 :     local-distclean: local-clean
52 :     -rm -rf $(DISTCLEAN_FILES)
53 :    
54 :     distclean: sub-distclean local-distclean
55 :    
56 :     .PHONY: sub-devclean local-devclean devclean
57 :     sub-devclean:
58 :     dirs="$(CLEAN_SUBDIRS)"; \
59 :     if test -n "$$dirs" ; then \
60 :     for dir in $$dirs ; do \
61 :     (cd $$dir && $(MAKE) devclean) \
62 :     done \
63 :     fi
64 :    
65 :     local-devclean: local-distclean
66 :     -rm -rf $(DEVCLEAN_FILES)
67 :    
68 :     devclean: sub-devclean local-devclean
69 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0