Something went wrong. Try again.
Git fork
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980# The default target of this Makefile is...all::
prefix ?= $(HOME)bindir ?= $(prefix)/binsharedir ?= $(prefix)/sharegitk_libdir ?= $(sharedir)/gitk/libmsgsdir ?= $(gitk_libdir)/msgsmsgsdir_SQ = $(subst ','\'',$(msgsdir))
SHELL_PATH ?= /bin/shTCL_PATH ?= tclshTCLTK_PATH ?= wishINSTALL ?= installRM ?= rm -f
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))bindir_SQ = $(subst ','\'',$(bindir))TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
### Detect Tck/Tk interpreter path changesTRACK_TCLTK = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
GIT-TCLTK-VARS: FORCE @VARS='$(TRACK_TCLTK)'; \ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ echo 1>&2 " * new Tcl/Tk interpreter location"; \ echo "$$VARS" >$@; \ fi
## po-file creation rulesXGETTEXT ?= xgettextifdef NO_MSGFMT MSGFMT ?= $(TCL_PATH) po/po2msg.shelse MSGFMT ?= msgfmt ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) MSGFMT := $(TCL_PATH) po/po2msg.sh endifendif
PO_TEMPLATE = po/gitk.potALL_POFILES = $(wildcard po/*.po)ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
ifndef V QUIET = @ QUIET_GEN = $(QUIET)echo ' ' GEN $@ &&endif
all:: gitk-wish $(ALL_MSGFILES)
install:: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' $(INSTALL) -m 755 gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)' $(foreach p,$(ALL_MSGFILES), $(INSTALL) -m 644 $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
uninstall:: $(foreach p,$(ALL_MSGFILES), $(RM) '$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) &&) true $(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
clean:: $(RM) gitk-wish po/*.msg GIT-TCLTK-VARS
gitk-wish: gitk GIT-TCLTK-VARS $(QUIET_GEN)$(RM) $@ $@+ && \ $(SHELL_PATH) ./generate-tcl.sh "$(TCLTK_PATH_SQ)" "$<" "$@"
$(PO_TEMPLATE): gitk $(XGETTEXT) -kmc -LTcl -o $@ gitkupdate-po:: $(PO_TEMPLATE) $(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )$(ALL_MSGFILES): %.msg : %.po @echo Generating catalog $@ $(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
.PHONY: all install uninstall clean update-po.PHONY: FORCE