All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Added make options NO_GUI and WITH_P4IMPORT.
@ 2007-03-20 11:45 Eygene Ryabinkin
  2007-03-21  0:35 ` Jakub Narebski
  0 siblings, 1 reply; 47+ messages in thread
From: Eygene Ryabinkin @ 2007-03-20 11:45 UTC (permalink / raw)
  To: git

NO_GUI disables the building and installation of the git GUI part.
WITH_P4IMPORT enables the installation of the Perforce import script.

This patch was originally developed for the FreeBSD port of git,
but I think that it will not harm to integrate this patch into the
development tree.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
---
 Makefile |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 51c1fed..8b142f0 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,10 @@ all::
 # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
 # MakeMaker (e.g. using ActiveState under Cygwin).
 #
+# Define NO_GUI if you do not want Tcl/Tk GUI.
+#
+# Define WITH_P4IMPORT to build and install Python git-p4import script.
+#
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
 	@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -196,9 +200,20 @@ SCRIPT_PERL = \
 	git-svnimport.perl git-cvsexportcommit.perl \
 	git-send-email.perl git-svn.perl
 
+SCRIPT_PYTHON = \
+	git-p4import.py
+
+ifdef WITH_P4IMPORT
+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
+	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
+	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
+	  git-status git-instaweb
+else
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
 	  git-status git-instaweb
+endif
+
 
 # ... and all the rest that could be moved out of bindir to gitexecdir
 PROGRAMS = \
@@ -241,6 +256,9 @@ endif
 ifndef PERL_PATH
 	PERL_PATH = /usr/bin/perl
 endif
+ifndef PYTHON_PATH
+	PYTHON_PATH = /usr/local/bin/python
+endif
 
 export PERL_PATH
 
@@ -646,6 +664,7 @@ prefix_SQ = $(subst ','\'',$(prefix))
 
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
 
 LIBS = $(GITLIBS) $(EXTLIBS)
 
@@ -667,7 +686,9 @@ ifneq (,$X)
 endif
 
 all::
+ifndef NO_GUI
 	$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+endif
 	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
 	$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
 
@@ -699,6 +720,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
 
+$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
+	rm -f $@ $@+
+	sed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \
+	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+	    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+	    $@.py >$@+
+	chmod +x $@+
+	mv $@+ $@
+
 perl/perl.mak: GIT-CFLAGS
 	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 
@@ -892,10 +922,16 @@ install: all
 	$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+ifndef NO_GUI
 	$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
+else
+	$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
+endif
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 	$(MAKE) -C perl prefix='$(prefix_SQ)' install
+ifndef NO_GUI
 	$(MAKE) -C git-gui install
+endif
 	if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
 	then \
 		ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -929,11 +965,17 @@ dist: git.spec git-archive
 	@mkdir -p $(GIT_TARNAME)
 	@cp git.spec $(GIT_TARNAME)
 	@echo $(GIT_VERSION) > $(GIT_TARNAME)/version
+ifndef NO_GUI
 	@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
 	$(TAR) rf $(GIT_TARNAME).tar \
 		$(GIT_TARNAME)/git.spec \
 		$(GIT_TARNAME)/version \
 		$(GIT_TARNAME)/git-gui/version
+else
+	$(TAR) rf $(GIT_TARNAME).tar \
+		$(GIT_TARNAME)/git.spec \
+		$(GIT_TARNAME)/version
+endif
 	@rm -rf $(GIT_TARNAME)
 	gzip -f -9 $(GIT_TARNAME).tar
 
@@ -974,7 +1016,9 @@ clean:
 	rm -f gitweb/gitweb.cgi
 	$(MAKE) -C Documentation/ clean
 	$(MAKE) -C perl clean
+ifndef NO_GUI
 	$(MAKE) -C git-gui clean
+endif
 	$(MAKE) -C templates/ clean
 	$(MAKE) -C t/ clean
 	rm -f GIT-VERSION-FILE GIT-CFLAGS
-- 
1.5.0.3-dirty
-- 
Eygene

^ permalink raw reply related	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2007-04-05 12:50 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 11:45 [PATCH] Added make options NO_GUI and WITH_P4IMPORT Eygene Ryabinkin
2007-03-21  0:35 ` Jakub Narebski
2007-03-21  5:14   ` Eygene Ryabinkin
2007-03-21 11:16     ` Johannes Schindelin
2007-03-21 11:50       ` Eygene Ryabinkin
2007-03-21 14:25         ` Johannes Schindelin
2007-03-21 14:38           ` Paolo Bonzini
2007-03-21 14:42             ` Eygene Ryabinkin
2007-03-21 14:49               ` Paolo Bonzini
2007-03-21 14:58               ` Alex Riesen
2007-03-24 23:16                 ` Jakub Narebski
2007-03-21 14:40           ` Eygene Ryabinkin
2007-03-21 15:35             ` Johannes Schindelin
2007-03-21 16:01               ` Eygene Ryabinkin
2007-03-21 16:17                 ` Junio C Hamano
2007-03-26  7:31                   ` Eygene Ryabinkin
2007-03-26  7:32                     ` [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk Eygene Ryabinkin
2007-03-26  8:27                       ` Junio C Hamano
2007-03-27 10:26                         ` [PATCH] Add the WITH_P4IMPORT knob to the Makefile Eygene Ryabinkin
2007-03-27 10:54                           ` Junio C Hamano
2007-03-27 11:22                             ` Eygene Ryabinkin
2007-03-27 11:25                               ` [PATCH] Added git-p4 package to the list of git RPMs Eygene Ryabinkin
2007-03-27 16:03                                 ` [PATCH] Remove unused WITH_OWN_SUBPROCESS_PY from RPM spec Brian Gernhardt
2007-04-04 18:30                                 ` [PATCH] Added git-p4 package to the list of git RPMs Junio C Hamano
2007-04-05 12:50                                   ` Eygene Ryabinkin
2007-03-26  8:30                       ` [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk Jakub Narebski
2007-03-26  8:36                         ` Junio C Hamano
2007-03-26 10:03                           ` Eygene Ryabinkin
2007-03-27  4:12                             ` Junio C Hamano
2007-03-27  6:59                               ` Eygene Ryabinkin
2007-03-27 10:24                                 ` [PATCH] Added configure options --with-tcltk/--without-tcltk Eygene Ryabinkin
2007-03-27 10:53                                   ` Junio C Hamano
2007-03-27 11:07                                     ` Eygene Ryabinkin
2007-03-28  1:52                                       ` Junio C Hamano
2007-03-28  9:12                                         ` [PATCH] Add --with-tcltk and --without-tcltk to configure Eygene Ryabinkin
2007-03-28  9:13                                           ` [PATCH] Added Tcl/Tk interpreter path rewriting for the GUI tools Eygene Ryabinkin
2007-03-28 19:48                                           ` [PATCH] Add --with-tcltk and --without-tcltk to configure Junio C Hamano
2007-03-29  7:44                                             ` Eygene Ryabinkin
2007-03-29  8:00                                               ` Junio C Hamano
2007-03-29  8:29                                                 ` Eygene Ryabinkin
2007-03-29  8:35                                                   ` Junio C Hamano
2007-03-29  8:58                                                     ` Eygene Ryabinkin
2007-03-29  9:12                                                       ` Tom Prince
2007-03-29 10:06                                                         ` Eygene Ryabinkin
2007-03-29 10:06                                                           ` [PATCH] Eliminate checks of user-specified Tcl/Tk interpreter Eygene Ryabinkin
2007-03-29 10:07                                               ` [PATCH] Added correct Python path to the RPM specfile Eygene Ryabinkin
2007-03-26  8:25                     ` [PATCH] Added make options NO_GUI and WITH_P4IMPORT Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.