build: Don't install license or the INSTALL file
[profile/ivi/murphy.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 SUBDIRS  = . utils src doc
4 doc_DATA = AUTHORS ChangeLog NEWS README
5
6 # This is the only way with automake I know of to force 'check-git-hooks'
7 # to be evaluated before 'all'. If there is a nicer way, I'm all ears...
8 BUILT_SOURCES = install-git-hooks
9
10 ###################################
11 # git hook management
12 #
13
14 install-git-hooks:
15         if test -d .git; then                                       \
16             for hook in githooks/???*; do                           \
17                 case $$hook in                                      \
18                     *.sample|*~|*.swp) continue;;                   \
19                 esac;                                               \
20                 if test -x $$hook -a                                \
21                       ! -x .git/hooks/$${hook##*/}; then            \
22                     echo "Installing git hook $${hook##*/}...";     \
23                     cp $$hook .git/hooks;                           \
24                     chmod a+x .git/hooks/$${hook##*/};              \
25                 fi                                                  \
26             done                                                    \
27         fi
28
29 check-git-hooks:
30         if test -d .git; then                                                \
31             for hook in githooks/???*; do                                    \
32                 case $$hook in                                               \
33                     *.sample|*~|*.swp) continue;;                            \
34                 esac;                                                        \
35                 if test -x $$hook -a ! -e .git/hooks/$${hook##*/}; then      \
36                     echo "";                                                 \
37                     echo "WARNING:";                                         \
38                     echo "WARNING: You have an uninstalled git hook $$hook"; \
39                     echo "WARNING: Please, consider taking it into use by";  \
40                     echo "WARNING: running 'make install-git-hooks'...";     \
41                     echo "WARNING:";                                         \
42                     echo "";                                                 \
43                 fi                                                           \
44             done                                                             \
45         fi
46
47 # cleanup
48 clean-local:
49         rm -f *~