fix: Fix path for the locales, return error when running as root

This commit is contained in:
ngn
2024-02-22 20:31:10 +03:00
parent e1b05b3bf2
commit d50d357173
3 changed files with 27 additions and 16 deletions

View File

@ -20,16 +20,16 @@ dist/xcfg: $(SRCS) $(HEADERS) $(PO_FILES)
fi; \
done
@for po in $(PO_DIRS) ; do \
msgfmt $$po/xcfg.po -o $$po/mp.mo ; \
msgfmt $$po/xcfg.po -o $$po/xcfg.mo ; \
done
install:
mkdir -p $(DESTDIR)$(prefix)/bin
install -m755 dist/xcfg $(DESTDIR)$(prefix)/bin/xcfg
@for po in $(PO_DIRS) ; do \
echo "installing locale: $$po/mp.mo" ; \
echo "installing locale: $$po/xcfg.mo" ; \
mkdir -pv $(DESTDIR)/usr/share/$$po ; \
cp $$po/mp.mo $(DESTDIR)/usr/share/$$po ; \
cp $$po/xcfg.mo $(DESTDIR)/usr/share/$$po ; \
done
uninstall: