You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

3 years ago
#
# This Makefile requires GNU make.
#
# Do not make changes here.
# Use the included .mak files.
#
make_need := 3.81
ifeq "" "$(strip $(filter $(make_need), $(firstword $(sort $(make_need) $(MAKE_VERSION)))))"
fail := $(error Your make ($(MAKE_VERSION)) is too old. You need $(make_need) or newer)
endif
-include config.mak
include package/targets.mak
INSTALL := ./tools/install.sh
install: install-conf install-lib-scripts install-sysadm-scripts install-service
install-conf: $(CONF_TARGETS:boot.conf=$(DESTDIR)$(boot_conf))
install-lib-scripts: $(SCRIPTS_LIB_TARGETS:scripts/%=$(DESTDIR)$(scripts)/%)
install-sysadm-scripts: $(SCRIPTS_SYSADM_TARGETS:scripts/%=$(DESTDIR)$(sysconfdir)/$(package_macro_dir)/%)
3 years ago
install-service: $(SERVICES_TARGETS:service/%=$(DESTDIR)$(service_directory)/%)
$(DESTDIR)$(boot_conf): boot.conf
exec $(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(sysconfdir)/$(package_macro_dir)/%: scripts/rc.local
3 years ago
exec $(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(scripts)/%: scripts/%
exec $(INSTALL) -D -m 755 $< $@
sed -i -e 's,@BINDIR@,$(bindir),' $@
$(DESTDIR)$(service_directory)/%: service/%
exec $(INSTALL) -D -m 644 $< $@
sed -i -e 's,@BOOTCONF@,$(boot_conf),' -e 's,@SCRIPTS@,$(scripts),' \
-e 's,@INITCONF@,$(init_conf),' \
-e 's,@SYSCONFDIR@,$(sysconfdir),' $@
3 years ago
version:
@echo $(version)
.PHONY: install version
.DELETE_ON_ERROR: