Re: [PATCHv5 2/6] Gitweb: add support for minifying gitweb.css

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10-04-14 9:02 PM, Jakub Narebski wrote:
> Junio C Hamano wrote:
>> Jakub Narebski <jnareb@xxxxxxxxx> writes:
>>
>>>> -gitweb.cgi: gitweb.perl $(GITWEB_JS) $(GITWEB_CSS)
>>>> +gitweb.cgi: gitweb.perl
>>> ...
>>> That makes gitweb.cgi not depend on gitweb.min.js, not gitweb.min.css.
>>
>> That is what I inteded to do.
>>
>> Unless you are including gitweb.cgi (iow, the contents of the generated
>> file depends on the _contents_ of gitweb.min.js (or gitweb.js), gitweb.cgi
>> does _not_ depend on these files.  Of course if you generate gitweb.cgi
>> out of gitweb.perl with one setting of GITWEB_JS and then change your
>> mind, then you need to regenerate it, but that is not something you can do
>> by comparing file timestamp of gitweb.cgi and the file timestamp of
>> $(GITWEB_JS) anyway.  You would need to imitate something like how
>> GIT-BUILD-OPTIONS is used by the primary Makefile.
> 
> Right.  I agree.
> 
> P.S. This is nt the case with git-instaweb, which literally include 
> gitweb.js or gitweb.min.js...
> 

I believe we can just change the variable names as planned before as well
as the dependancies, and that should fix up instaweb as far as will need
to be fixed, the rest has to happen at gitweb.cgi generation time.

My understanding (please correct me if I am wrong) is that comparing the
mtimes of the files is not reliable. So can't we just make gitweb.cgi
depend on source .js and .css files, since any modifications there will
also cause the minified versions to be regenerated? Can Junio's patch just
be updated to subst the suffix of GITWEB_JS and GITWEB_CSS, which makes sure
the correct version is being used?



-- 
Mark Rada
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]