Skip to content

Commit

Permalink
Simplify Makefile and remove onevent script when uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
mill1000 committed Jul 13, 2023
1 parent f26f090 commit be18f6a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@ install-systemd: $(SYSTEMD_SERVICE_NAME)
systemctl enable $(SYSTEMD_SERVICE_NAME)
systemctl start $(SYSTEMD_SERVICE_NAME)

install-bin: $(TARGET_NAME).py
install-bin: $(TARGET_NAME).py $(ONEVENT_NAME).py
@$(MKDIR_P) $(DESTDIR)$(PREFIX)/bin
cp $< $(DESTDIR)$(PREFIX)/bin/${TARGET_NAME}
chmod +x $(DESTDIR)$(PREFIX)/bin/${TARGET_NAME}

install-onevent: $(ONEVENT_NAME).py
@$(MKDIR_P) $(DESTDIR)$(PREFIX)/bin
cp $< $(DESTDIR)$(PREFIX)/bin/${ONEVENT_NAME}
chmod +x $(DESTDIR)$(PREFIX)/bin/${ONEVENT_NAME}

install-policy: $(SYSTEMD_POLICY_NAME)
cp $< $(SYSTEMD_POLICY_PATH)/

install: install-bin install-onevent install-policy install-systemd
install: install-bin install-policy install-systemd

uninstall-systemd:
systemctl disable $(SYSTEMD_SERVICE_NAME)
Expand All @@ -42,4 +39,5 @@ uninstall-systemd:

uninstall: uninstall-systemd
rm -f $(DESTDIR)$(PREFIX)/bin/${TARGET_NAME}
rm -f $(DESTDIR)$(PREFIX)/bin/${ONEVENT_NAME}
rm -f $(SYSTEMD_POLICY_PATH)/$(SYSTEMD_POLICY_NAME)

0 comments on commit be18f6a

Please sign in to comment.