[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH/RFC 01/17] Makefile: A variable for options used by
From: Ævar Arnfjörð Bjarmason <avarab () gmail ! com>
Date: 2010-08-31 16:36:16
Message-ID: AANLkTim6fjMKcULn08G0NqWRhoRRv_J63KtARq6G5ZbG () mail ! gmail ! com
[Download RAW message or body]
On Tue, Aug 31, 2010 at 14:51, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
> > +++ b/Makefile
> > @@ -2008,10 +2008,11 @@ cscope:
> > $(RM) cscope*
> > $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
> >
> > +XGETTEXT_OPTIONS = --add-comments
> > pot:
> > - $(XGETTEXT) --add-comments --keyword=_ --keyword=N_ --output=po/git.pot \
> > --language=C $(C_OBJ:o=c) t/t0200/test.c
> > - $(XGETTEXT) --add-comments --join-existing --output=po/git.pot \
> > --language=Shell $(SCRIPT_SH) t/t0200/test.sh
> > - $(XGETTEXT) --add-comments --join-existing --keyword=__ --output=po/git.pot \
> > --language=Perl $(SCRIPT_PERL) t/t0200/test.perl + $(XGETTEXT) \
> > $(XGETTEXT_OPTIONS) --keyword=_ --keyword=N_ --output=po/git.pot --language=C \
> > $(C_OBJ:o=c) t/t0200/test.c + $(XGETTEXT) $(XGETTEXT_OPTIONS) --join-existing \
> > --output=po/git.pot --language=Shell $(SCRIPT_SH) t/t0200/test.sh + \
> > $(XGETTEXT) $(XGETTEXT_OPTIONS) --join-existing --keyword=__ --output=po/git.pot \
> > --language=Perl $(SCRIPT_PERL) t/t0200/test.perl
>
> The long lines are a bit scary. :)
>
> Maybe more of it could be pulled out into variables. As a
> side-effect, users could override some settings from the command line.
> Maybe something like this?
>
> LOCALIZED_C = $(C_OBJ:o=c) t/t0200/test.c
> LOCALIZED_SH = $(SCRIPT_SH) t/t0200/test.sh
> LOCALIZED_PERL = $(SCRIPT_PERL) t/t0200/test.perl
>
> XGETTEXT_OPTIONS = --add-comments
> XGETTEXT_OPTIONS_C = $(XGETTEXT_OPTIONS) -k_ -kN_ -LC
> XGETTEXT_OPTIONS_SH = $(XGETTEXT_OPTIONS) -LShell
> XGETTEXT_OPTIONS_PERL = $(XGETTEXT_OPTIONS) -k__ -LPerl
>
> po/git.pot:
> rm -f $@+
> $(XGETTEXT) -o$@+ $(XGETTEXT_OPTIONS_C) $(LOCALIZED_C)
> $(XGETTEXT) -j -o$@+ $(XGETTEXT_OPTIONS_SH) $(LOCALIZED_SH)
> $(XGETTEXT) -j -o$@+ $(XGETTEXT_OPTIONS_PERL) $(LOCALIZED_PERL)
> mv $@+ $@
Thanks. I worked that into v2.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic