-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (37 loc) · 1.14 KB
/
Makefile
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
SOURCEDIR = $(PWD)
VEDLIBDIR = $(PWD)/ext/velib_python
INSTALL_CMD = install
LIBDIR = $(bindir)/ext/velib_python
FILES = \
$(SOURCEDIR)/dbus_digitalinputs.py
VEDLIB_FILES = \
$(VEDLIBDIR)/logger.py \
$(VEDLIBDIR)/ve_utils.py \
$(VEDLIBDIR)/vedbus.py \
$(VEDLIBDIR)/settingsdevice.py \
$(VEDLIBDIR)/dbusmonitor.py
help:
@echo "The following make targets are available"
@echo " help - print this message"
@echo " install - install everything"
@echo " clean - remove temporary files"
install_app : $(FILES)
@if [ "$^" != "" ]; then \
$(INSTALL_CMD) -d $(DESTDIR)$(bindir); \
$(INSTALL_CMD) -t $(DESTDIR)$(bindir) $^; \
echo installed $(DESTDIR)$(bindir)/$(notdir $^); \
fi
install_velib_python: $(VEDLIB_FILES)
@if [ "$^" != "" ]; then \
$(INSTALL_CMD) -d $(DESTDIR)$(LIBDIR); \
$(INSTALL_CMD) -t $(DESTDIR)$(LIBDIR) $^; \
echo installed $(DESTDIR)$(LIBDIR)/$(notdir $^); \
fi
clean: ;
install: install_velib_python install_app
testinstall:
$(eval TMP := $(shell mktemp -d))
$(MAKE) DESTDIR=$(TMP) install
(cd $(TMP) && ./dbus_digitalinputs.py --help > /dev/null)
-rm -rf $(TMP)
.PHONY: help install_app install_velib_python install