git-gui: Revert "git-gui: Display all authors of git-gui."
[git/mingw.git] / Makefile
blobd74fca287437d39eb193aed356e9a68f89480fd1
1 all::
3 # Define V=1 to have a more verbose compile.
6 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
7 @$(SHELL_PATH) ./GIT-VERSION-GEN
8 -include GIT-VERSION-FILE
10 SCRIPT_SH = git-gui.sh
11 GITGUI_BUILT_INS = git-citool
12 ALL_PROGRAMS = $(GITGUI_BUILT_INS) $(patsubst %.sh,%,$(SCRIPT_SH))
14 ifndef SHELL_PATH
15 SHELL_PATH = /bin/sh
16 endif
18 ifndef gitexecdir
19 gitexecdir := $(shell git --exec-path)
20 endif
22 ifndef INSTALL
23 INSTALL = install
24 endif
26 ifndef V
27 QUIET_GEN = @echo ' ' GEN $@;
28 QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
29 endif
31 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
32 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
33 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
35 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
36 $(QUIET_GEN)rm -f $@ $@+ && \
37 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
38 -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
39 $@.sh >$@+ && \
40 chmod +x $@+ && \
41 mv $@+ $@
43 $(GITGUI_BUILT_INS): git-gui
44 $(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
46 # These can record GITGUI_VERSION
47 $(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE
49 all:: $(ALL_PROGRAMS)
51 install: all
52 $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
53 $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
54 $(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
56 dist-version:
57 @mkdir -p $(TARDIR)
58 @echo $(GITGUI_VERSION) > $(TARDIR)/version
60 clean::
61 rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE
63 .PHONY: all install dist-version clean
64 .PHONY: .FORCE-GIT-VERSION-FILE