Hi,

> Great - let's try to deal with [1] first, then.
> 
> Does anyone wish to object to me committing that part?

I have no objection to commiting this, too. But some fix would be
needed.

===
Generated lwlocknames.[ch] don't have header comment because
generate-lwlocknames.pl writes them into wrong place.

lmgr/Makefile looks to have some mistakes.

 - lwlocknames.c is not generated from (or using) lwlocknames.c
   so the entry "lwlocknames.c: lwlocknames.h" doesn't looks to
   be appropriate.

 - maintainer-clean in lmgr/Makefile forgets to remove lwlocknames.c.

lwlock.c now includes lwlockname.c so such entry would be
needed. (But might not be needed because it is naturally
generated along with .h)

Perhaps uncommenting in pg_config_manual.h is left alone.
(This is not included in the diff below)


regards,


At Tue, 8 Sep 2015 13:01:23 -0400, Robert Haas <robertmh...@gmail.com> wrote in 
<ca+tgmoakyg2p5ni_hevxp-7u7aj3b9k3rqpshmcba6zp1he...@mail.gmail.com>
> On Mon, Sep 7, 2015 at 7:33 AM, Ildus Kurbangaliev
> <i.kurbangal...@postgrespro.ru> wrote:
> >> > Ildus, could you please review Amit & Robert's patch?
> >> [1] -
> >> http://www.postgresql.org/message-id/caa4ek1kdec1tm5ya9gkv85vtn4qqsrxzkjru-tu70g_tl1x...@mail.gmail.com
> > About [1] and [2]. They are slightly conflicting, but if [1] is
> > going to be committed I can easily use it in [2]. And it will simplify
> > my patch, so I have no objections here. And the same time [3] can be
> > significantly simplified and improved on top of [1] and [2].
> 
> Great - let's try to deal with [1] first, then.
> 
> Does anyone wish to object to me committing that part?


========================
--- generate-lwlocknames.pl.org 2015-09-10 15:46:02.291079423 +0900
+++ generate-lwlocknames.pl     2015-09-10 15:53:22.177903045 +0900
@@ -8,5 +8,6 @@
 
-print
-  "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit 
*/\n";
-print "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n";
+my $head_comment_c = 
+       "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not 
edit */\n\n";
+my $head_comment_h = $head_comment_c .
+  "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n";
 
@@ -23,2 +24,6 @@
 
+# Write the caution comment at the beginning of the files
+print H $head_comment_h;
+print C $head_comment_c;
+
 print C "static char *MainLWLockNames[] = {";

--- Makefile.org        2015-09-10 16:16:38.610660526 +0900
+++ Makefile    2015-09-10 16:39:09.718916378 +0900
@@ -26,6 +26,6 @@
 
-# see explanation in ../../parser/Makefile
-lwlocknames.c: lwlocknames.h ;
+lwlock.c: lwlocknames.c
 
-lwlocknames.h,lwlocknames.c: 
$(top_srcdir)/src/backend/storage/lmgr/lwlocknames.txt generate-lwlocknames.pl
+# see explanation in ../../parser/Makefile
+lwlocknames.h lwlocknames.c: 
$(top_srcdir)/src/backend/storage/lmgr/lwlocknames.txt generate-lwlocknames.pl
        $(PERL) $(srcdir)/generate-lwlocknames.pl $<
@@ -39,2 +39,2 @@
 maintainer-clean: clean
-       rm -f lwlocknames.h
+       rm -f lwlocknames.[ch]

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to