From: Jakub Narebski <jnareb@gmail.com>
To: "J.H." <warthog9@kernel.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/6] GITWEB - Makefile changes
Date: Fri, 11 Dec 2009 17:41:51 +0100 [thread overview]
Message-ID: <200912111741.51760.jnareb@gmail.com> (raw)
In-Reply-To: <4B2271B4.2010301@kernel.org>
On Fri, 11 Dec 2009, J.H. wrote:
>> IMPORTANT!
>>
>> A note about this change: I think it would be better to move creating
>> gitweb.cgi (and optionally gitweb.min.js) to gitweb/Makefile, and make
>> main Makefile call gitweb/Makefile, and not vice versa like in your
>> solution.
>>
>> If it is possible.
>
> It's quite possible, and I'm fine with doing that. If no one has any
> objections I can re-work those with the understanding that the build
> process for gitweb shift to the gitweb/ directory instead of the main
> Makefile.
In my opinion it would be better solution because it would reduce size
of main (master) Makefile, and not be much larger than this solution.
git-gui/, Documentation/, perl/ all have their own makefiles, which do
the work, and are called from main (master) Makefile.
>>> diff --git a/Makefile b/Makefile
>>> index 4a1e5bc..8db9d01 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -1509,6 +1509,8 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
>>> chmod +x $@+ && \
>>> mv $@+ $@
>>>
>>> +.PHONY: gitweb
>>
>> Why it is here, and not with the .PHONY block at line 1924 of
>> Makefile? It would be nice to have comment supporting this choice in
>> email with this patch (or in commit message).
>
> There are 6 other instances of .PHONY in the makefile, having the .PHONY
> localized seemed to make it the most obvious since it was right next to
> the actual target.
I was thinking here about this large block of .PHONY declarations,
the one which is not inside conditional.
>>> +gitweb: gitweb/gitweb.cgi
>>> ifdef JSMIN
>>> OTHER_PROGRAMS += gitweb/gitweb.cgi gitweb/gitweb.min.js
>>> gitweb/gitweb.cgi: gitweb/gitweb.perl gitweb/gitweb.min.js
>>> @@ -1537,7 +1539,7 @@ endif
>>> -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
>>> -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
>>> -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
>>> - $< >$@+ && \
>>> + $(patsubst %.cgi,%.perl,$@) >$@+ && \
>>
>> Why this change?
>
> Preparation for a later change. The change could happen all at the same
> time if it makes more logical sense.
Please at least describe this change in commit message.
But I think it could be moved to other patch, or put in separate patch.
This change has nothing to do with easier gitweb generation.
>>> chmod +x $@+ && \
>>> mv $@+ $@
>>>
>>> diff --git a/gitweb/Makefile b/gitweb/Makefile
>>> new file mode 100644
>>> index 0000000..8d318b3
>>> --- /dev/null
>>> +++ b/gitweb/Makefile
>>> @@ -0,0 +1,14 @@
>>> +SHELL = /bin/bash
>>
>> Why is this needed?
Why do you need to define SHELL?
>>> +
>>> +FILES = gitweb.cgi
>>> +
>>> +.PHONY: $(FILES)
>>
>> Why .PHONY? $(FILES) are created.
>
> From this makefile I wanted to explicitly call up to the main makefile
> no matter what, the main makefile doesn't consider the targets .PHONY
> and it has all the dependencies that it would expect.
What is the reason of this phony .PHONY? If gitweb.cgi is newer than
gitweb.perl (and other sources), then without .PHONY it wouldn't be
regenerated. With .PHONY it would call master Makefile... which would
notice that gitweb.cgi is newer than gitweb.perl and do not regenerate.
So what this .PHONY does is unnecessary call make on master Makefile...
But I guess this issue would be moot if it was the other way around,
i.e. master Makefile calling gitweb/Makefile.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2009-12-11 16:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 23:45 [PATCH 0/6] Gitweb caching changes v2 John 'Warthog9' Hawley
2009-12-10 23:45 ` [PATCH 1/6] GITWEB - Load Checking John 'Warthog9' Hawley
2009-12-10 23:45 ` [PATCH 2/6] GITWEB - Missmatching git w/ gitweb John 'Warthog9' Hawley
2009-12-10 23:45 ` [PATCH 3/6] GITWEB - Add git:// link to summary pages John 'Warthog9' Hawley
2009-12-10 23:45 ` [PATCH 4/6] GITWEB - Makefile changes John 'Warthog9' Hawley
[not found] ` <1260488743-25855-6-git-send-email-warthog9@kernel.org>
2009-12-10 23:45 ` [PATCH 6/6] GITWEB - Separate defaults from main file John 'Warthog9' Hawley
2009-12-11 15:46 ` Jakub Narebski
2009-12-11 15:58 ` J.H.
2009-12-11 22:53 ` Jakub Narebski
2009-12-16 1:22 ` Junio C Hamano
2009-12-16 2:00 ` J.H.
2009-12-16 19:52 ` Jakub Narebski
2009-12-16 20:04 ` J.H.
2009-12-16 2:22 ` Jakub Narebski
2009-12-11 14:28 ` [PATCH 4/6] GITWEB - Makefile changes Jakub Narebski
2009-12-11 16:22 ` J.H.
2009-12-11 16:41 ` Jakub Narebski [this message]
2009-12-19 13:32 ` [PATCH/RFCv2 4/6] gitweb: Makefile improvements Jakub Narebski
2009-12-11 12:52 ` [PATCH 3/6] GITWEB - Add git:// link to summary pages Johannes Schindelin
2009-12-11 13:44 ` Jakub Narebski
2009-12-18 21:02 ` [PATCHv2 3/6] gitweb: Optionally add "git" links in project list page Jakub Narebski
2009-12-11 10:52 ` [PATCH 2/6] GITWEB - Missmatching git w/ gitweb Jakub Narebski
2009-12-18 19:18 ` [RFC/PATCHv2 2/6] gitweb: Add option to force version match Jakub Narebski
2009-12-11 12:49 ` [PATCH 2/6] GITWEB - Missmatching git w/ gitweb Johannes Schindelin
2009-12-10 23:54 ` [PATCH 1/6] GITWEB - Load Checking Sverre Rabbelier
2009-12-11 0:52 ` Jakub Narebski
2009-12-11 1:10 ` Junio C Hamano
2009-12-11 2:19 ` J.H.
2009-12-11 2:50 ` Junio C Hamano
2009-12-11 2:58 ` J.H.
2009-12-11 3:07 ` J.H.
2009-12-11 3:09 ` Junio C Hamano
2009-12-11 10:09 ` Jakub Narebski
2009-12-18 16:36 ` [PATCHv2 1/6] gitweb: Load checking Jakub Narebski
2009-12-11 13:53 ` [PATCH 1/6] GITWEB - Load Checking Mihamina Rakotomandimby
2009-12-10 23:53 ` [PATCH 0/6] Gitweb caching changes v2 Sverre Rabbelier
2009-12-11 15:51 ` Jakub Narebski
[not found] ` <4B226D56.7000004@kernel.org>
2009-12-11 18:01 ` Jakub Narebski
2009-12-11 18:26 ` J.H.
2009-12-12 1:37 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200912111741.51760.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=warthog9@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.