blob: 44217128d5248eb8cb2adf8960b488bc10c65779 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001LEVEL = ../..
Daniel Dunbar073777f2009-03-24 03:00:12 +00002DIRS := include lib tools docs
Reid Spencer5f016e22007-07-11 17:01:13 +00003
4include $(LEVEL)/Makefile.common
5
Mike Stumpadc981a2009-01-20 21:10:41 +00006ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
Torok Edwin38a80952009-09-23 14:23:05 +00007all::
Mike Stumpadc981a2009-01-20 21:10:41 +00008 $(Verb) if [ ! -f test/Makefile ]; then \
9 $(MKDIR) test; \
10 $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
11 fi
12endif
13
Reid Spencer5f016e22007-07-11 17:01:13 +000014test::
Chris Lattner9d294b92008-04-06 22:32:01 +000015 @ $(MAKE) -C test
Gabor Greifab72ffe2008-03-18 06:14:16 +000016
17report::
Chris Lattner9d294b92008-04-06 22:32:01 +000018 @ $(MAKE) -C test report
Reid Spencer5f016e22007-07-11 17:01:13 +000019
20clean::
Chris Lattner9d294b92008-04-06 22:32:01 +000021 @ $(MAKE) -C test clean
Gabor Greif5267d7c2008-03-20 14:28:22 +000022
Mike Stump8ba82b32009-02-12 02:25:47 +000023tags::
24 $(Verb) etags `find . -type f -name \*.h | grep -v /lib/Headers | grep -v /test/` `find . -type f -name \*.cpp | grep -v /lib/Headers | grep -v /test/`
25
Daniel Dunbar432eeec2009-03-18 05:59:14 +000026cscope.files:
Daniel Dunbar073777f2009-03-24 03:00:12 +000027 find tools lib include -name '*.cpp' \
Daniel Dunbar432eeec2009-03-18 05:59:14 +000028 -or -name '*.def' \
29 -or -name '*.td' \
30 -or -name '*.h' > cscope.files
31
32.PHONY: test report clean cscope.files
Douglas Gregor14ea5692009-10-08 22:15:31 +000033
34install-local::
35 $(Echo) Installing include files
36 $(Verb) $(MKDIR) $(PROJ_includedir)
37 $(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \
38 cd $(PROJ_SRC_ROOT)/tools/clang/include && \
39 for hdr in `find . -type f '!' '(' -name '*~' \
40 -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS | \
41 grep -v .svn` ; do \
42 instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
43 if test \! -d "$$instdir" ; then \
44 $(EchoCmd) Making install directory $$instdir ; \
45 $(MKDIR) $$instdir ;\
46 fi ; \
47 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
48 done ; \
49 fi
50ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
51 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include" ; then \
52 cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
53 for hdr in `find . -type f -print | grep -v CVS .tmp` ; do \
54 $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
55 done ; \
56 fi
57endif