* [PATCH 1/5] Makefile: regenerate assembler listings when asked
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
@ 2010-01-06 8:04 ` Jonathan Nieder
2010-01-06 8:05 ` [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc Jonathan Nieder
` (4 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-06 8:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
'make var.s' fails to regenerate an assembler listing if var.c
has not changed but a header it includes has:
$ make var.s
CC var.s
$ touch cache.h
$ make var.s
$
The corresponding problem for 'make var.o' does not occur because
the Makefile lists dependencies for each .o target explicitly;
analogous dependency rules for the .s targets are not present.
Rather than add some, it seems better to force 'make' to always
regenerate assembler listings, since the assembler listing
targets are only invoked when specifically requested on the make
command line.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index c11719c..ba4d071 100644
--- a/Makefile
+++ b/Makefile
@@ -1633,7 +1633,7 @@ git.o git.spec \
%.o: %.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-%.s: %.c GIT-CFLAGS
+%.s: %.c GIT-CFLAGS .FORCE-LISTING
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
@@ -1978,7 +1978,7 @@ endif
.PHONY: all install clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
-.PHONY: .FORCE-GIT-BUILD-OPTIONS
+.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING
### Check documentation
#
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
2010-01-06 8:04 ` [PATCH 1/5] Makefile: regenerate assembler listings when asked Jonathan Nieder
@ 2010-01-06 8:05 ` Jonathan Nieder
2010-01-07 7:42 ` Jonathan Nieder
2010-01-06 8:06 ` [PATCH 3/5] Makefile: learn to generate listings for targets requiring special flags Jonathan Nieder
` (3 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-06 8:05 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
This allows reusing the standard %.o: %.c pattern rule even for
targets that require special flags to be set. Thus after this
change, any changes in the command for compilation only have to
be performed in one place.
Target-specific variables have been supported in GNU make since
version 3.77, which has been available since 1998.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Makefile | 41 ++++++++++++++++++-----------------------
1 files changed, 18 insertions(+), 23 deletions(-)
diff --git a/Makefile b/Makefile
index ba4d071..81190a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1467,20 +1467,19 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
-git.o: git.c common-cmds.h GIT-CFLAGS
- $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
- '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
- $(ALL_CFLAGS) -o $@ -c $(filter %.c,$^)
+git.o: common-cmds.h
+git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
+ '-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
-builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
- '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
- '-DGIT_MAN_PATH="$(mandir_SQ)"' \
- '-DGIT_INFO_PATH="$(infodir_SQ)"' $<
+builtin-help.o: common-cmds.h
+builtin-help.o: ALL_CFLAGS += \
+ '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
+ '-DGIT_MAN_PATH="$(mandir_SQ)"' \
+ '-DGIT_INFO_PATH="$(infodir_SQ)"'
$(BUILT_INS): git$X
$(QUIET_BUILT_IN)$(RM) $@ && \
@@ -1638,25 +1637,21 @@ git.o git.spec \
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-exec_cmd.o: exec_cmd.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
- '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
- '-DBINDIR="$(bindir_relative_SQ)"' \
- '-DPREFIX="$(prefix_SQ)"' \
- $<
+exec_cmd.o: ALL_CFLAGS += \
+ '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
+ '-DBINDIR="$(bindir_relative_SQ)"' \
+ '-DPREFIX="$(prefix_SQ)"'
-builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
+builtin-init-db.o: ALL_CFLAGS += \
+ -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
-config.o: config.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $<
+config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
-http.o: http.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
+http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
-http-walker.o: http-walker.c http.h GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
+http-walker.o: http.h
+http-walker.o: ALL_CFLAGS += -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc
2010-01-06 8:05 ` [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc Jonathan Nieder
@ 2010-01-07 7:42 ` Jonathan Nieder
0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-07 7:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Jonathan Nieder wrote:
> diff --git a/Makefile b/Makefile
> index ba4d071..81190a6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1467,20 +1467,19 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
> strip: $(PROGRAMS) git$X
> $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
>
> -git.o: git.c common-cmds.h GIT-CFLAGS
> - $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
> - '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
> - $(ALL_CFLAGS) -o $@ -c $(filter %.c,$^)
> +git.o: common-cmds.h
> +git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
> + '-DGIT_HTML_PATH="$(htmldir_SQ)"'
>
[...]
One annoying feature I wasn't thinking of: the values of
target-specific variables propagate to the dependencies of a target
(why? I can't imagine), and GIT-CFLAGS keeps on changing because of
this.
Maybe a new CMD_CFLAGS variable is needed for this, i.e. something
like the following squashed in.
diff --git a/Makefile b/Makefile
index 2580e23..d20e456 100644
--- a/Makefile
+++ b/Makefile
@@ -1468,7 +1468,7 @@ strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
-git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
+git.o: CMD_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
@@ -1476,7 +1476,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
builtin-help.o: common-cmds.h
-builtin-help.o: ALL_CFLAGS += \
+builtin-help.o: CMD_CFLAGS += \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1630,28 +1630,31 @@ git.o git.spec \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE
+# This can vary by target
+CMD_CFLAGS = $(ALL_CFLAGS)
+
%.o: %.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+ $(QUIET_CC)$(CC) -o $*.o -c $(CMD_CFLAGS) $<
%.s: %.c GIT-CFLAGS .FORCE-LISTING
- $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
+ $(QUIET_CC)$(CC) -S $(CMD_CFLAGS) $<
%.o: %.S GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+ $(QUIET_CC)$(CC) -o $*.o -c $(CMD_CFLAGS) $<
-exec_cmd.o: ALL_CFLAGS += \
+exec_cmd.o: CMD_CFLAGS += \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'
-builtin-init-db.o: ALL_CFLAGS += \
+builtin-init-db.o: CMD_CFLAGS += \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
-config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
+config.o: CMD_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
-http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
+http.o: CMD_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
http-walker.o: http.h
-http-walker.o: ALL_CFLAGS += -DNO_EXPAT
+http-walker.o: CMD_CFLAGS += -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/5] Makefile: learn to generate listings for targets requiring special flags
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
2010-01-06 8:04 ` [PATCH 1/5] Makefile: regenerate assembler listings when asked Jonathan Nieder
2010-01-06 8:05 ` [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc Jonathan Nieder
@ 2010-01-06 8:06 ` Jonathan Nieder
2010-01-06 8:06 ` [PATCH 4/5] Makefile: consolidate .FORCE-* targets Jonathan Nieder
` (2 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-06 8:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
'make git.s' to debug code generation of main() fails because
git.c makes use of preprocessor symbols such as GIT_VERSION that
are not set. make does not generate code listings for
builtin_help.c, exec_cmd.c, builtin-init-db.c, config.c, http.c,
or http-walker.c either, for the same reason.
So pass the flags used to generate each .o file when generating
the corresponding assembler listing.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Makefile | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 81190a6..3d774c6 100644
--- a/Makefile
+++ b/Makefile
@@ -1468,7 +1468,7 @@ strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
-git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
+git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
@@ -1476,7 +1476,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
builtin-help.o: common-cmds.h
-builtin-help.o: ALL_CFLAGS += \
+builtin-help.s builtin-help.o: ALL_CFLAGS += \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1637,21 +1637,21 @@ git.o git.spec \
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-exec_cmd.o: ALL_CFLAGS += \
+exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'
-builtin-init-db.o: ALL_CFLAGS += \
+builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
-config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
+config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
-http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
+http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
http-walker.o: http.h
-http-walker.o: ALL_CFLAGS += -DNO_EXPAT
+http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/5] Makefile: consolidate .FORCE-* targets
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
` (2 preceding siblings ...)
2010-01-06 8:06 ` [PATCH 3/5] Makefile: learn to generate listings for targets requiring special flags Jonathan Nieder
@ 2010-01-06 8:06 ` Jonathan Nieder
2010-01-06 8:16 ` [PATCH git-gui 5/5] git-gui/Makefile: " Jonathan Nieder
2010-01-06 9:07 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Linus Torvalds
5 siblings, 0 replies; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-06 8:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Providing multiple targets to force a rebuild is unnecessary
complication.
Avoid using a name that could conflict with future special
targets in GNU make (a leading period followed by uppercase
letters).
The corresponding change to the git-gui Makefile is left for
another patch.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/Makefile | 4 ++--
Makefile | 15 ++++++---------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 4797b2d..8a8a395 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -204,7 +204,7 @@ install-pdf: pdf
install-html: html
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
-../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+../GIT-VERSION-FILE: FORCE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
-include ../GIT-VERSION-FILE
@@ -337,4 +337,4 @@ quick-install-man:
quick-install-html:
'$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
-.PHONY: .FORCE-GIT-VERSION-FILE
+.PHONY: FORCE
diff --git a/Makefile b/Makefile
index 3d774c6..fd79cd6 100644
--- a/Makefile
+++ b/Makefile
@@ -222,7 +222,7 @@ all::
# DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
# DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
-GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
-include GIT-VERSION-FILE
@@ -1632,7 +1632,7 @@ git.o git.spec \
%.o: %.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-%.s: %.c GIT-CFLAGS .FORCE-LISTING
+%.s: %.c GIT-CFLAGS FORCE
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
@@ -1723,7 +1723,7 @@ cscope:
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
-GIT-CFLAGS: .FORCE-GIT-CFLAGS
+GIT-CFLAGS: FORCE
@FLAGS='$(TRACK_CFLAGS)'; \
if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
echo 1>&2 " * new build flags or prefix"; \
@@ -1733,7 +1733,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
# We need to apply sq twice, once to protect from the shell
# that runs GIT-BUILD-OPTIONS, and then again to protect it
# and the first level quoting from the shell that runs "echo".
-GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
+GIT-BUILD-OPTIONS: FORCE
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@@ -1745,14 +1745,12 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
ifndef NO_TCLTK
TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
-GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
+GIT-GUI-VARS: FORCE
@VARS='$(TRACK_VARS)'; \
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
echo 1>&2 " * new Tcl/Tk interpreter location"; \
echo "$$VARS" >$@; \
fi
-
-.PHONY: .FORCE-GIT-GUI-VARS
endif
### Testing rules
@@ -1972,8 +1970,7 @@ endif
.PHONY: all install clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
-.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
-.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING
+.PHONY: FORCE TAGS tags cscope
### Check documentation
#
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH git-gui 5/5] git-gui/Makefile: consolidate .FORCE-* targets
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
` (3 preceding siblings ...)
2010-01-06 8:06 ` [PATCH 4/5] Makefile: consolidate .FORCE-* targets Jonathan Nieder
@ 2010-01-06 8:16 ` Jonathan Nieder
2010-01-07 2:20 ` Shawn O. Pearce
2010-01-06 9:07 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Linus Torvalds
5 siblings, 1 reply; 20+ messages in thread
From: Jonathan Nieder @ 2010-01-06 8:16 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Junio C Hamano
Providing multiple targets to force a rebuild is unnecessary
complication.
Avoid using a name that could conflict with future special
targets in GNU make (a leading period followed by uppercase
letters).
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
This is my first git-gui patch, so it is likely I have missed some
conventions. If that is the case, please let me know.
Thanks,
Jonathn
Makefile | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index b3580e9..197b55e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ all::
# TCL_PATH must be vaild for this to work.
#
-GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
-include GIT-VERSION-FILE
@@ -270,7 +270,7 @@ TRACK_VARS = \
GITGUI_MACOSXAPP=$(GITGUI_MACOSXAPP) \
#end TRACK_VARS
-GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
+GIT-GUI-VARS: FORCE
@VARS='$(TRACK_VARS)'; \
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
echo 1>&2 " * new locations or Tcl/Tk interpreter"; \
@@ -340,5 +340,4 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
.PHONY: all install uninstall dist-version clean
-.PHONY: .FORCE-GIT-VERSION-FILE
-.PHONY: .FORCE-GIT-GUI-VARS
+.PHONY: FORCE
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH git-gui 5/5] git-gui/Makefile: consolidate .FORCE-* targets
2010-01-06 8:16 ` [PATCH git-gui 5/5] git-gui/Makefile: " Jonathan Nieder
@ 2010-01-07 2:20 ` Shawn O. Pearce
0 siblings, 0 replies; 20+ messages in thread
From: Shawn O. Pearce @ 2010-01-07 2:20 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Junio C Hamano
Jonathan Nieder <jrnieder@gmail.com> wrote:
> Providing multiple targets to force a rebuild is unnecessary
> complication.
>
> Avoid using a name that could conflict with future special
> targets in GNU make (a leading period followed by uppercase
> letters).
>
> Cc: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks, applied.
--
Shawn.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 0/5] Makefile: fix generation of assembler listings
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
` (4 preceding siblings ...)
2010-01-06 8:16 ` [PATCH git-gui 5/5] git-gui/Makefile: " Jonathan Nieder
@ 2010-01-06 9:07 ` Linus Torvalds
5 siblings, 0 replies; 20+ messages in thread
From: Linus Torvalds @ 2010-01-06 9:07 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Junio C Hamano, git, Shawn O. Pearce
On Wed, 6 Jan 2010, Jonathan Nieder wrote:
>
> Patch 1 fixes a problem I noticed when tweaking the Makefile to
> automatically generate dependencies for the %.o targets. The problem
> is that the dependencies for the corresponding %.s (code listing)
> targets are not included in the Makefile at all, automatically or not.
Patches 1-3 (which were the ones I was cc'd on) look sane to me. Having
real dependencies might be prettier, but I agree that since a *.s file is
only generated on demand (and useful mainly to see code generation), just
forcing the build makes sense.
Linus
^ permalink raw reply [flat|nested] 20+ messages in thread