Thread (5 messages) flat view 5 messages, 4 authors, 2017-11-27

Re: [PATCH] Makefile: check that tcl/tk is installed

From: Junio C Hamano <hidden>
Date: 2017-11-27 04:31:19

Junio C Hamano [off-list ref] writes:
Perhaps the "else" part of the above should become a bit more
careful, something along the lines of...

    else
            MSGFMT ?= msgfmt
-           ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0)
-                   MSGFMT := $(TCL_PATH) po/po2msg.sh
-           endif
+           MSGFMT_DRYRUN = --tcl -l C -d . /dev/null 2>/dev/null
+            ifneq ($(shell $(MSGFMT) $(MSGFMT_DRYRUN); echo $$?),0)
+               ifneq ($(shell $(TCL_PATH) po/po2msg.sh $(MSGFMT_DRYRUN); echo $$?),0)
+                    MSGFMT := $(TCL_PATH) po/po2msg.sh
+               else
+                   $(error "no usable msgfmt to build gitk; set NO_TCLTK perhaps?")
+               endif
            endif
    endif
Actually, at this point, I think the suggestion should primarily be
to install either msgfmt or tclsh; offering another choice to set
NO_TCLTK is OK, but it should be secondary, as the fact that the
make utility is running this recipe is a sign that the builder wants
to build gitk/git-gui.  

Whether the builder wants to run the result on the same box is a
separate and irrelevant matter.  Once built and installed, a box
without "wish" may not be able to run the result, but installing it
after the fact will fix it without need to rebuild anything.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help