diff options
author | Ayush Agarwal <ayushnix@fastmail.com> | 2023-03-22 18:57:34 +0530 |
---|---|---|
committer | Ayush Agarwal <ayushnix@fastmail.com> | 2023-03-22 18:57:34 +0530 |
commit | 3224624c56954ce2fc771e31cb73739049ffb3d4 (patch) | |
tree | e129607f2840ba8200aed0c0f2c6aad84b24f476 /Makefile | |
parent | 1f27ea3350a95eabede7c0b99e29221ed955cae9 (diff) |
make: install default config in XDG_CONFIG_DIRS
The XDG_CONFIG_DIRS environment variable should define the base
directory to search for default configuration files of applications.
This is a system level directory that complements XDG_CONFIG_HOME. It
should default to `/etc/xdg` although this can be bypassed if needed
when using make.
In addition, this commit makes the minimal target also install the
default configuration file in XDG_CONFIG_DIRS. The 'install' target now
depends on the 'minimal' target.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -7,8 +7,9 @@ DATAROOTDIR := $(PREFIX)/share MANDIR := $(DATAROOTDIR)/man BASHCOMPDIR := $(DATAROOTDIR)/bash-completion/completions FISHCOMPDIR := $(DATAROOTDIR)/fish/vendor_completions.d +CONFDIRS = /etc/xdg PROG = tessen - +PROGCFG = config SCDOC = scdoc SHCHK = shellcheck SHFMT = shfmt @@ -20,15 +21,13 @@ all: @echo "$(PROG) is a shell script and doesn't need to be compiled" @echo "To install it, enter \"make install\"" -install: man bashcomp fishcomp - $(INSTALL) -Dm 0755 $(PROG) -t $(DESTDIR)$(BINDIR) +install: man bashcomp fishcomp minimal @echo "" @echo "$(PROG) has been installed succesfully" minimal: $(INSTALL) -Dm 0755 $(PROG) -t $(DESTDIR)$(BINDIR) - @echo "" - @echo "$(PROG) has been installed succesfully" + $(INSTALL) -Dm 0644 $(PROGCFG) -t $(DESTDIR)$(CONFDIRS)/$(PROG) man: man/$(PROG).1 man/$(PROG).5 $(INSTALL) -Dm 0644 man/$(PROG).1 -t $(DESTDIR)$(MANDIR)/man1 @@ -57,3 +56,4 @@ uninstall: rm -f "$(DESTDIR)$(MANDIR)/man5/$(PROG).5" rm -f "$(DESTDIR)$(BASHCOMPDIR)/$(PROG)" rm -f "$(DESTDIR)$(FISHCOMPDIR)/$(PROG).fish" + rm -f "$(DESTDIR)$(CONFDIRS)/$(PROG)/$(PROGCFG)" |