1 # ------------------------------------------------------------------------
7 # ------------------------------------------------------------------------
10 ifneq ($(MAKECMDGOALS
),gitclean
)
11 $(if
$(wildcard config.mk
),,$(shell cp config.mk.in config.mk
))
15 include Makefile.
check
16 include Makefile.rules
18 # ------------------------------------------------------------------------
21 .PHONY
: all help docs
clean distclean gitclean
tags
23 all clean distclean docs
install install-user
:
24 @echo Running
'$@' in src...
25 ${Q} ${MAKE} -C src
$@
29 $(if
$(wildcard .git
/config
),,$(error this is not a git repository
))
30 ${Q} git
clean -d
-x
-f
32 # ------------------------------------------------------------------------
38 @echo
" general targets"
39 @echo
" all - build everything"
40 @echo
" docs - build documentation"
41 @echo
" clean - clean up build"
42 @echo
" distclean - clean even more"
43 @echo
" gitclean - clean everything not tracked by git"
44 @echo
" install - install in system dir"
45 @echo
" install-user - install in user home dir"
47 @echo
" development targets"
48 @echo
" tags - build ctags/cscope index"
52 # ------------------------------------------------------------------------
53 # local dependencies for main rules
55 .PHONY
: lcl-clean lcl-distclean
60 -${Q} rm -f cscope.files cscope.out
tags
62 distclean: lcl-distclean
68 install: install-variable-check
70 install-user
: install-user-variable-check
72 # ------------------------------------------------------------------------
78 ${Q} find .
-name
'*.[ch]' -o
-name
'*.lua' | grep
-v
-e CVS
-e SCCS
> cscope.files
81 cscope.out
: cscope.files
82 -${Q} cscope
-P
`pwd` -b
86 ${Q} xargs
-n
50 ctags
-a
< cscope.files