diff options
author | Juhani Krekelä | 2021-06-26 21:56:41 +0300 |
---|---|---|
committer | Wolfgang Müller | 2021-06-28 16:22:10 +0200 |
commit | 32576fa8d4d44627e730d6c9ae28e37191404082 (patch) | |
tree | 00932e4819de63a2c1cb0c822ab5324736207dc9 /Makefile | |
parent | 1a32a14735d808622d67ed36a82c1894968b4b26 (diff) | |
download | weltschmerz-32576fa8d4d44627e730d6c9ae28e37191404082.tar.gz |
Build localization files when running `make all`
Currently these localization files are only built when the user executes
`make install`. Since `make install` is often run as root, this leaves
files with root as their owner in the source directory. There are also
security implications to running compilers as root. This patch adds a
target `all` to the Makefile which depends on the localization files, so
that they are built as the user.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -9,6 +9,8 @@ VALAC ?= valac POFILES := $(wildcard po/*.po) MOFILES := $(POFILES:.po=.mo) +all: weltschmerz weltschmerz.1 weltschmerz.desktop $(MOFILES) + weltschmerz: weltschmerz.vala terminal.vala config.vala configreader.vala utils.vala resources.c ${VALAC} -X -DGETTEXT_PACKAGE=\"weltschmerz\" -X -DLOCALEDIR="\"${LOCALEDIR}\"" \ -X -lm --pkg posix --pkg gtk+-3.0 --pkg vte-2.91 --gresources resources.xml \ @@ -23,7 +25,7 @@ resources.c: resources.xml terminal.ui terminal.css weltschmerz.desktop: weltschmerz.desktop.in msgfmt --desktop -d po --template $< -o $@ -install: weltschmerz weltschmerz.1 weltschmerz.desktop $(MOFILES) +install: all install -D -m 755 -t '${DESTDIR}${BINDIR}' weltschmerz install -D -m 644 -t '${DESTDIR}${MANDIR}/man1' weltschmerz.1 install -D -m 644 -t '${DESTDIR}${DATAROOTDIR}/applications' weltschmerz.desktop @@ -36,4 +38,4 @@ clean: rm -f weltschmerz weltschmerz.desktop resources.c rm -f po/*.mo -.PHONY: install clean +.PHONY: install clean all |