This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.am
63 lines (54 loc) · 2.28 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
SUBDIRS = . utils src
doc_DATA = AUTHORS ChangeLog NEWS README
# This is the only way with automake I know of to force 'check-git-hooks'
# to be evaluated before 'all'. If there is a nicer way, I'm all ears...
BUILT_SOURCES = install-git-hooks install-iot-symlink
# command to copy a file while substituting libexecdir,bindir, and prefix
substcp = sed \
-e 's|@libexecdir[@]|$(libexecdir)|g' \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@prefix[@]|$(prefix)|g'
###################################
# git hook management
#
install-git-hooks:
if test -d githooks -a -d .git; then \
for hook in githooks/???* kludge~; do \
case $$hook in \
*.sample|*~|*.swp) continue;; \
esac; \
echo "Testing hook $$hook..."; \
if test -x $$hook -a \
! -x .git/hooks/$${hook##*/}; then \
echo "Installing git hook $${hook##*/}..."; \
cp $$hook .git/hooks; \
chmod a+x .git/hooks/$${hook##*/}; \
fi \
done \
fi
install-iot-symlink:
if test ! -L $(top_srcdir)/iot; then \
ln -sf ./src $(top_srcdir)/iot; \
fi; \
if test ! -L $(top_builddir)/iot; then \
ln -sf ./src $(top_builddir)/iot; \
fi
install-data-hook:
mkdir -p $(DESTDIR)/lib/systemd/system
if SYSTEMD_ENABLED
$(substcp) $(top_srcdir)/packaging.in/iot-launch.service-socket.in \
> $(DESTDIR)/lib/systemd/system/iot-launch.service
$(substcp) $(top_srcdir)/packaging.in/iot-launch.socket.in \
> $(DESTDIR)/lib/systemd/system/iot-launch.socket
$(substcp) $(top_srcdir)/packaging.in/iotpm-register-apps.service.in \
> $(DESTDIR)/lib/systemd/system/iotpm-register-apps.service
else
$(substcp) $(top_srcdir)/packaging.in/iot-launch.service.in \
> $(DESTDIR)/lib/systemd/system/iot-launch.service
endif
# generate documentation
generate-docs: Doxyfile
doxygen $<
# cleanup
clean-local:
rm -f *~