Skip to content
Snippets Groups Projects
Makefile 1.13 KiB
Newer Older
Eric Vidal's avatar
Eric Vidal committed
#
# 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

Eric Vidal's avatar
Eric Vidal committed
install: install-module install-script
Eric Vidal's avatar
Eric Vidal committed

Eric Vidal's avatar
Eric Vidal committed
install-module: $(MODULE_TARGET:module/%=$(DESTDIR)$(service_directory)/$(package)/%)
install-script: $(SCRIPT_TARGET:module/configure/%=$(DESTDIR)$(service_directory)/$(package)/configure/%)
Eric Vidal's avatar
Eric Vidal committed

Eric Vidal's avatar
Eric Vidal committed
$(DESTDIR)$(service_directory)/$(package)/%: module/%
Eric Vidal's avatar
Eric Vidal committed
	exec $(INSTALL) -D -m 644 $< $@
	sed -i -e 's,@VERSION@,$(version),' \
		-e "s,@DISPLAY_MANAGER@,$(DISPLAY_MANAGER)," \
		-e "s,@CONSOLE_TRACKER@,$(CONSOLE_TRACKER)," \
		-e "s,@XDG_RUNTIME@,$(XDG_RUNTIME)," \
		-e "s,@DESKTOP_CMDLINE@,$(DESKTOP_CMDLINE)," $@

Eric Vidal's avatar
Eric Vidal committed
$(DESTDIR)$(service_directory)/$(package)/configure/%: module/configure/%
	exec $(INSTALL) -D -m 755 $< $@
	sed -i -e 's,@BINDIR@,$(bindir),' $@

Eric Vidal's avatar
Eric Vidal committed
version:
	@echo $(version)

.PHONY: install version

.DELETE_ON_ERROR: