Browse Source

Remove the -D option from install

In the Makefile, `make install` is used to create missing directories
and install files into them. Until now, the -D option was used for this
job. However, FreeBSD as an implementation of the install command that
differs about this option. In order to remain compatible with FreeBSD,
the -D option has been removed and replace by prior directory creation
using the -d option, which is common to (most?) implementations.
https://www.freebsd.org/cgi/man.cgi?query=install
https://man.openbsd.org/install
https://linux.die.net/man/1/install
pull/39/head
Rodolphe Breard 4 years ago
parent
commit
f44d95e7b1
  1. 21
      Makefile

21
Makefile

@ -3,6 +3,8 @@ EXEC_PREFIX = $(PREFIX)
BINDIR = $(EXEC_PREFIX)/bin
DATAROOTDIR = $(PREFIX)/share
DATADIR = $(DATAROOTDIR)
MAN5DIR = $(DATADIR)/man/man5
MAN8DIR = $(DATADIR)/man/man8
SYSCONFDIR = /etc
TARGET_DIR = ./target/release
MAN_SRC_DIR = ./man/en
@ -28,15 +30,18 @@ man:
gzip <"$(MAN_SRC_DIR)/tacd.8" >"$(MAN_DST_DIR)/tacd.8.gz"
install:
install -D -m 0755 $(TARGET_DIR)/acmed $(DESTDIR)$(BINDIR)/acmed
install -D -m 0755 $(TARGET_DIR)/tacd $(DESTDIR)$(BINDIR)/tacd
install -D -m 0644 $(TARGET_DIR)/man/acmed.8.gz $(DESTDIR)$(DATADIR)/man/man8/acmed.8.gz
install -D -m 0644 $(TARGET_DIR)/man/acmed.toml.5.gz $(DESTDIR)$(DATADIR)/man/man5/acmed.toml.5.gz
install -D -m 0644 $(TARGET_DIR)/man/tacd.8.gz $(DESTDIR)$(DATADIR)/man/man8/tacd.8.gz
install -D -m 0644 acmed/config/acmed.toml $(DESTDIR)$(SYSCONFDIR)/acmed/acmed.toml
install -D -m 0644 acmed/config/default_hooks.toml $(DESTDIR)$(SYSCONFDIR)/acmed/default_hooks.toml
install -d -m 0700 $(DESTDIR)$(SYSCONFDIR)/acmed/accounts
install -d -m 0755 $(DESTDIR)$(BINDIR)
install -d -m 0755 $(DESTDIR)$(MAN5DIR)
install -d -m 0755 $(DESTDIR)$(MAN8DIR)
install -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/acmed/certs
install -d -m 0700 $(DESTDIR)$(SYSCONFDIR)/acmed/accounts
install -m 0755 $(TARGET_DIR)/acmed $(DESTDIR)$(BINDIR)/acmed
install -m 0755 $(TARGET_DIR)/tacd $(DESTDIR)$(BINDIR)/tacd
install -m 0644 $(TARGET_DIR)/man/acmed.8.gz $(DESTDIR)$(MAN8DIR)/acmed.8.gz
install -m 0644 $(TARGET_DIR)/man/acmed.toml.5.gz $(DESTDIR)$(MAN5DIR)/acmed.toml.5.gz
install -m 0644 $(TARGET_DIR)/man/tacd.8.gz $(DESTDIR)$(MAN8DIR)/tacd.8.gz
install -m 0644 acmed/config/acmed.toml $(DESTDIR)$(SYSCONFDIR)/acmed/acmed.toml
install -m 0644 acmed/config/default_hooks.toml $(DESTDIR)$(SYSCONFDIR)/acmed/default_hooks.toml
clean:
cargo clean

Loading…
Cancel
Save