Skip to content

Commit

Permalink
Update Makefile: add -p to inatall commands
Browse files Browse the repository at this point in the history
  • Loading branch information
hakavlad committed Oct 11, 2020
1 parent 21cd3b2 commit 9ed4187
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ all:
@ echo "Use: make install, make uninstall"

base:
install -d $(DESTDIR)$(SBINDIR)
install -m0755 $(NAME) $(DESTDIR)$(SBINDIR)/$(NAME)
install -p -d $(DESTDIR)$(SBINDIR)
install -p -m0755 $(NAME) $(DESTDIR)$(SBINDIR)/$(NAME)

install -d $(DESTDIR)$(SYSCONFDIR)
install -m0644 $(NAME).conf $(DESTDIR)$(SYSCONFDIR)/$(NAME).conf
install -p -d $(DESTDIR)$(SYSCONFDIR)
install -p -m0644 $(NAME).conf $(DESTDIR)$(SYSCONFDIR)/$(NAME).conf

install -d $(DESTDIR)$(DOCDIR)
install -m0644 README.md $(DESTDIR)$(DOCDIR)/README.md
install -p -d $(DESTDIR)$(DOCDIR)
install -p -m0644 README.md $(DESTDIR)$(DOCDIR)/README.md

install -dm0700 $(DESTDIR)/var/lib/$(NAME)
install -p -dm0700 $(DESTDIR)/var/lib/$(NAME)

units:
install -d $(DESTDIR)$(SYSTEMDUNITDIR)
install -p -d $(DESTDIR)$(SYSTEMDUNITDIR)

sed "s|:TARGET_SBINDIR:|$(SBINDIR)|; s|:TARGET_SYSCONFDIR:|$(SYSCONFDIR)|" \
$(NAME).service.in > $(NAME).service

install -m0644 $(NAME).service $(DESTDIR)$(SYSTEMDUNITDIR)/$(NAME).service
install -p -m0644 $(NAME).service $(DESTDIR)$(SYSTEMDUNITDIR)/$(NAME).service

rm -fv $(NAME).service

Expand Down

0 comments on commit 9ed4187

Please sign in to comment.