Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | LEVEL = ../.. |
Daniel Dunbar | 073777f | 2009-03-24 03:00:12 +0000 | [diff] [blame] | 2 | DIRS := include lib tools docs |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 3 | |
| 4 | include $(LEVEL)/Makefile.common |
| 5 | |
Mike Stump | adc981a | 2009-01-20 21:10:41 +0000 | [diff] [blame] | 6 | ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) |
Torok Edwin | 38a8095 | 2009-09-23 14:23:05 +0000 | [diff] [blame] | 7 | all:: |
Mike Stump | adc981a | 2009-01-20 21:10:41 +0000 | [diff] [blame] | 8 | $(Verb) if [ ! -f test/Makefile ]; then \ |
| 9 | $(MKDIR) test; \ |
| 10 | $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \ |
| 11 | fi |
| 12 | endif |
| 13 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 14 | test:: |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 15 | @ $(MAKE) -C test |
Gabor Greif | ab72ffe | 2008-03-18 06:14:16 +0000 | [diff] [blame] | 16 | |
| 17 | report:: |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 18 | @ $(MAKE) -C test report |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 19 | |
| 20 | clean:: |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 21 | @ $(MAKE) -C test clean |
Gabor Greif | 5267d7c | 2008-03-20 14:28:22 +0000 | [diff] [blame] | 22 | |
Mike Stump | 8ba82b3 | 2009-02-12 02:25:47 +0000 | [diff] [blame] | 23 | tags:: |
| 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 Dunbar | 432eeec | 2009-03-18 05:59:14 +0000 | [diff] [blame] | 26 | cscope.files: |
Daniel Dunbar | 073777f | 2009-03-24 03:00:12 +0000 | [diff] [blame] | 27 | find tools lib include -name '*.cpp' \ |
Daniel Dunbar | 432eeec | 2009-03-18 05:59:14 +0000 | [diff] [blame] | 28 | -or -name '*.def' \ |
| 29 | -or -name '*.td' \ |
| 30 | -or -name '*.h' > cscope.files |
| 31 | |
| 32 | .PHONY: test report clean cscope.files |
Douglas Gregor | 14ea569 | 2009-10-08 22:15:31 +0000 | [diff] [blame] | 33 | |
| 34 | install-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 '*~' \ |
Axel Naumann | 1555c3a | 2009-10-12 16:42:18 +0000 | [diff] [blame] | 40 | -o -name '.#*' -o -name '*.in' -o -name '*.txt' \ |
| 41 | -o -name 'Makefile' -o -name '*.td' ')' -print \ |
| 42 | | grep -v CVS | grep -v .svn` ; do \ |
Douglas Gregor | 14ea569 | 2009-10-08 22:15:31 +0000 | [diff] [blame] | 43 | instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \ |
| 44 | if test \! -d "$$instdir" ; then \ |
| 45 | $(EchoCmd) Making install directory $$instdir ; \ |
| 46 | $(MKDIR) $$instdir ;\ |
| 47 | fi ; \ |
| 48 | $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \ |
| 49 | done ; \ |
| 50 | fi |
| 51 | ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) |
| 52 | $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include" ; then \ |
| 53 | cd $(PROJ_OBJ_ROOT)/tools/clang/include && \ |
Axel Naumann | 1555c3a | 2009-10-12 16:42:18 +0000 | [diff] [blame] | 54 | for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \ |
| 55 | | grep -v CVS | grep -v .tmp` ; do \ |
Douglas Gregor | 14ea569 | 2009-10-08 22:15:31 +0000 | [diff] [blame] | 56 | $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \ |
| 57 | done ; \ |
| 58 | fi |
| 59 | endif |