Skip to content
Snippets Groups Projects
Makefile 1.38 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

install: install-module install-script install-seed
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/%)
install-seed: $(SEED_TARGET:module/configure/session=$(DESTDIR)$(seed_directory)/session)

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

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),' \
		-e 's,%%EXECLINEDIR%%,$(execlinedir),' $@
Eric Vidal's avatar
Eric Vidal committed

$(DESTDIR)$(seed_directory)/session: module/configure/session
	exec $(INSTALL) -D -m 644 $< $@

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

.PHONY: install version

.DELETE_ON_ERROR: