--- Makefile.orig 2004-09-28 16:04:55.000000000 -0500 +++ Makefile 2011-12-13 23:38:07.000000000 -0600 @@ -9,10 +9,11 @@ FILES = Makefile README README.japanese NEWS Changelog COPYRIGHT TODO $(SHSKEL) $(PODIR) tools $(TESTDIR) $(NAME).man +PREFIX = /usr DESTDIR = -BINDIR = $(DESTDIR)/usr/bin -LOCALEDIR = $(DESTDIR)/usr/share/locale -MANDIR = $(DESTDIR)/usr/share/man/man1 +BINDIR = $(PREFIX)/bin +LOCALEDIR = $(PREFIX)/share/locale +MANDIR = $(PREFIX)/share/man/man1 TARGET=all @@ -48,7 +48,7 @@ po: check-po-dir @cd $(PODIR) && \ for pot in *.po; do \ - echo -n "merging $$pot..."; \ + printf "merging $$pot..."; \ poti=`echo $$pot | sed 's/\.po$$//'`; \ cp $$pot $$pot.old && \ msgmerge $$pot.old $(NAME).pot > $$pot; \ @@ -57,7 +57,7 @@ mo: check-po-dir @cd $(PODIR) && \ for pot in *.po; do \ - echo -n "compiling $$pot..."; \ + printf "compiling $$pot..."; \ poti=`echo $$pot | sed 's/\.po$$//'`; \ msgfmt -o $$poti.mo $$pot && \ echo ok; \ @@ -66,7 +66,7 @@ check-po: check-po-dir @cd $(PODIR) && \ for pot in *.po; do \ - echo -n "checking $$pot... "; \ + printf "checking $$pot... "; \ msgfmt -v $$pot || exit 1; \ done @@ -79,20 +80,22 @@ tar cvzf $(DISTDIR).tgz $(DISTDIR) && \ rm -rf $(DISTDIR) -#TODO install man page and README +#TODO install README install: mo - @[ -d $(LOCALEDIR) ] || mkdir -p $(LOCALEDIR); \ - [ -d $(BINDIR) ] || mkdir -p $(BINDIR); \ + @[ -d $(DESTDIR)$(LOCALEDIR) ] || mkdir -p $(DESTDIR)$(LOCALEDIR); \ + [ -d $(DESTDIR)$(MANDIR) ] || mkdir -p $(DESTDIR)$(MANDIR); \ + [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR); \ for pot in `cd $(PODIR) && ls *.mo`; do \ poti=`echo $$pot | sed 's/\.mo$$//'`; \ - modir=$(LOCALEDIR)/$$poti/LC_MESSAGES; \ + modir=$(DESTDIR)$(LOCALEDIR)/$$poti/LC_MESSAGES; \ [ -d $$modir ] || mkdir -p $$modir; \ install -m644 $(PODIR)/$$pot $$modir/$(NAME).mo; \ done; \ + install -m644 $(NAME).man $(DESTDIR)$(MANDIR)/$(NAME).1 sed -e '/^TEXTDOMAINDIR=/s,=.*,=$(LOCALEDIR),' \ - -e '/^VERSION=/s/=.*/=$(VERSION)/' $(SHSKEL) > $(BINDIR)/$(NAME) && \ - chmod +x $(BINDIR)/$(NAME) && \ - echo "program '$(NAME)' installed. just run $(BINDIR)/$(NAME)" + -e '/^VERSION=/s/=.*/=$(VERSION)/' $(SHSKEL) > $(DESTDIR)$(BINDIR)/$(NAME) && \ + chmod +x $(DESTDIR)$(BINDIR)/$(NAME) && \ + echo "program '$(NAME)' installed. just run $(DESTDIR)$(BINDIR)/$(NAME)" ###DEVELOPPER ONLY### doc: