-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.am
42 lines (29 loc) · 1.18 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
## Makefile.am
##
## Process this file with automake to produce Makefile.in
SUBDIRS = src asn_src ebin doc priv test
beam_DATA = ebin/cgf.appup
if HAVE_SYSTEMD
systemdsystemunit_DATA = scripts/cgf.service
env_DATA = scripts/cgf
endif
script_SCRIPTS = scripts/ssh_keys.sh
RELEASE_NAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
.PHONY: release
release: $(RELEASE_NAME).tar.gz
$(RELEASE_NAME).rel: $(PACKAGE_NAME).rel
cp $< $@
ERLTMP := $(shell mktemp -d)
$(RELEASE_NAME).tar.gz: $(RELEASE_NAME).rel sys.config
mkdir -p $(ERLTMP)/lib/$(RELEASE_NAME)
cp -r $(DESTDIR)/$(ERLANG_INSTALL_LIB_DIR)/$(RELEASE_NAME)/* $(ERLTMP)/lib/$(RELEASE_NAME)
ERL_LIBS=$(ERLTMP)/lib:$(ERL_LIBS) RELDIR=releases $(ERL) -noinput -boot_var OTPHOME lib \
-eval "systools:make_script(\"$(RELEASE_NAME)\", [{variables, [{\"OTPHOME\", \"$(ERLTMP)\"}]}])" \
-eval "systools:make_tar(\"$(RELEASE_NAME)\", [{dirs, [include,mibs,doc]}])" \
-s init stop
rm -rf $(ERLTMP)
install-data-hook: $(RELEASE_NAME).tar.gz
$(MKDIR_P) $(DESTDIR)/$(reldir)
$(INSTALL_DATA) $< $(DESTDIR)/$(reldir)
EXTRA_DIST = $(RELEASE_NAME).tar.gz
CLEANFILES = $(RELEASE_NAME).rel $(RELEASE_NAME).script $(RELEASE_NAME).boot $(RELEASE_NAME).tar.gz