Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2ccc4e9

Browse files
committed
Fix build problems in commit aa65de0.
The previous way didn't work for vpath builds, and make distprep was busted too. Reported off-list by Andres Freund.
1 parent 5cd6538 commit 2ccc4e9

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/backend/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ distprep:
200200
$(MAKE) -C bootstrap bootparse.c bootscanner.c
201201
$(MAKE) -C catalog schemapg.h postgres.bki postgres.description postgres.shdescription
202202
$(MAKE) -C replication repl_gram.c repl_scanner.c
203-
$(MAKE) -C storage lwlocknames.h
203+
$(MAKE) -C storage/lmgr lwlocknames.h
204204
$(MAKE) -C utils fmgrtab.c fmgroids.h errcodes.h
205205
$(MAKE) -C utils/misc guc-file.c
206206
$(MAKE) -C utils/sort qsort_tuple.c

src/backend/storage/lmgr/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ subdir = src/backend/storage/lmgr
1212
top_builddir = ../../../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
OBJS = lmgr.o lock.o proc.o deadlock.o lwlock.o spin.o s_lock.o predicate.o
15+
OBJS = lmgr.o lock.o proc.o deadlock.o lwlock.o lwlocknames.o spin.o \
16+
s_lock.o predicate.o
1617

1718
include $(top_srcdir)/src/backend/common.mk
1819

src/backend/storage/lmgr/generate-lwlocknames.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
print H "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n";
2424
print C $autogen, "\n";
2525

26-
print C "static char *MainLWLockNames[] = {";
26+
print C "char *MainLWLockNames[] = {";
2727

2828
while (<$lwlocknames>)
2929
{

src/backend/storage/lmgr/lwlock.c

-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@
9595
#include "utils/hsearch.h"
9696
#endif
9797

98-
/* Constants for lwlock names */
99-
#include "lwlocknames.c"
100-
10198

10299
/* We use the ShmemLock spinlock to protect LWLockAssign */
103100
extern slock_t *ShmemLock;

src/include/storage/lwlock.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ typedef union LWLockPadded
9090
char pad[LWLOCK_PADDED_SIZE];
9191
} LWLockPadded;
9292
extern PGDLLIMPORT LWLockPadded *MainLWLockArray;
93+
extern char *MainLWLockNames[];
9394

9495
/* Names for fixed lwlocks */
95-
#include "lwlocknames.h"
96+
#include "storage/lwlocknames.h"
9697

9798
/*
9899
* It's a bit odd to declare NUM_BUFFER_PARTITIONS and NUM_LOCK_PARTITIONS

0 commit comments

Comments
 (0)