Commit 712d5395 authored by Ondřej Surý's avatar Ondřej Surý

Daemons should be in sbin, make destination variables overridable

parent 1070c49a
...@@ -77,6 +77,7 @@ info: ...@@ -77,6 +77,7 @@ info:
$(info PREFIX: $(PREFIX)) $(info PREFIX: $(PREFIX))
$(info DESTDIR: $(DESTDIR)) $(info DESTDIR: $(DESTDIR))
$(info BINDIR: $(BINDIR)) $(info BINDIR: $(BINDIR))
$(info SBINDIR: $(SBINDIR))
$(info LIBDIR: $(LIBDIR)) $(info LIBDIR: $(LIBDIR))
$(info ETCDIR: $(ETCDIR)) $(info ETCDIR: $(ETCDIR))
$(info INCLUDEDIR: $(INCLUDEDIR)) $(info INCLUDEDIR: $(INCLUDEDIR))
......
...@@ -7,12 +7,13 @@ BUILDMODE := dynamic ...@@ -7,12 +7,13 @@ BUILDMODE := dynamic
HARDENING := yes HARDENING := yes
# Paths # Paths
PREFIX := /usr/local PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin BINDIR ?= $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib SBINDIR ?= $(PREFIX)/sbin
INCLUDEDIR := $(PREFIX)/include LIBDIR ?= $(PREFIX)/lib
MODULEDIR := $(LIBDIR)/kdns_modules INCLUDEDIR ?= $(PREFIX)/include
ETCDIR := $(PREFIX)/etc/kresd MODULEDIR ?= $(LIBDIR)/kdns_modules
ETCDIR ?= $(PREFIX)/etc/kresd
# Tools # Tools
CC ?= cc CC ?= cc
......
...@@ -35,7 +35,7 @@ endif ...@@ -35,7 +35,7 @@ endif
# Make binary # Make binary
ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes) ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes)
$(eval $(call make_bin,kresd,daemon,yes)) $(eval $(call make_sbin,kresd,daemon,yes))
endif endif
# Targets # Targets
......
...@@ -152,7 +152,7 @@ All paths are prefixed with ``PREFIX`` variable by default if not specified othe ...@@ -152,7 +152,7 @@ All paths are prefixed with ``PREFIX`` variable by default if not specified othe
:header: "Component", "Variable", "Default", "Notes" :header: "Component", "Variable", "Default", "Notes"
"library", "``LIBDIR``", "``$(PREFIX)/lib``", "pkg-config is auto-generated [#]_" "library", "``LIBDIR``", "``$(PREFIX)/lib``", "pkg-config is auto-generated [#]_"
"daemon", "``BINDIR``", "``$(PREFIX)/bin``", "" "daemon", "``SBINDIR``", "``$(PREFIX)/sbin``", ""
"configuration", "``ETCDIR``", "``$(PREFIX)/etc/kresd``", "Configuration file, templates." "configuration", "``ETCDIR``", "``$(PREFIX)/etc/kresd``", "Configuration file, templates."
"modules", "``MODULEDIR``", "``$(LIBDIR)/kdns_modules``", "[#]_" "modules", "``MODULEDIR``", "``$(LIBDIR)/kdns_modules``", "[#]_"
"work directory", "", "``$(PREFIX)/var/run/kresd``", "Run directory for daemon." "work directory", "", "``$(PREFIX)/var/run/kresd``", "Run directory for daemon."
......
...@@ -120,6 +120,7 @@ endef ...@@ -120,6 +120,7 @@ endef
# Make targets (name,path,amalgable yes|no,abiver) # Make targets (name,path,amalgable yes|no,abiver)
make_bin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(BINDIR),$(3)) make_bin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(BINDIR),$(3))
make_sbin = $(call make_target,$(1),$(2),$(BINEXT),$(BINFLAGS),$(SBINDIR),$(3))
make_lib = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(LIBDIR),$(3),$(4)) make_lib = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(LIBDIR),$(3),$(4))
make_module = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(MODULEDIR),$(3)) make_module = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(MODULEDIR),$(3))
make_shared = $(call make_target,$(1),$(2),$(MODEXT),-$(MODTYPE),$(LIBDIR),$(3)) make_shared = $(call make_target,$(1),$(2),$(MODEXT),-$(MODTYPE),$(LIBDIR),$(3))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment