1 # ------------------------------------------------------------------------
7 # ------------------------------------------------------------------------
10 ifneq ($(MAKECMDGOALS
),gitclean
)
14 include Makefile.
check
15 include Makefile.rules
17 # ------------------------------------------------------------------------
20 .PHONY
: all help docs
clean distclean gitclean
tags
22 all clean distclean docs
install install-user
:
23 @echo Running
'$@' in src...
24 ${Q} ${MAKE} -C src
$@
28 $(if
$(wildcard .git
/config
),,$(error this is not a git repository
))
29 ${Q} git
clean -d
-x
-f
31 # ------------------------------------------------------------------------
37 @echo
" general targets"
38 @echo
" all - build everything"
39 @echo
" docs - build documentation"
40 @echo
" clean - clean up build"
41 @echo
" distclean - clean even more"
42 @echo
" gitclean - clean everything not tracked by git"
43 @echo
" install - install in system dir"
44 @echo
" install-user - install in user home dir"
46 @echo
" development targets"
47 @echo
" tags - build ctags/cscope index"
51 # ------------------------------------------------------------------------
54 config.mk
: config.mk.
dist
56 ${Q} if
test -f
$@
; then \
62 # ------------------------------------------------------------------------
63 # local dependencies for main rules
65 .PHONY
: lcl-clean lcl-distclean
70 -${Q} rm -f cscope.files cscope.out
tags
72 distclean: lcl-distclean
78 install: install-variable-check
80 install-user
: install-user-variable-check
82 # ------------------------------------------------------------------------
88 ${Q} find .
-name
'*.[ch]' -o
-name
'*.lua' | grep
-v
-e CVS
-e SCCS
> cscope.files
91 cscope.out
: cscope.files
92 -${Q} cscope
-P
`pwd` -b
96 ${Q} xargs
-n
50 ctags
-a
< cscope.files