Re: pg_bsd_indent compiles bytecode - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_bsd_indent compiles bytecode
Date
Msg-id 446077.1593481124@sss.pgh.pa.us
Whole thread Raw
In response to pg_bsd_indent compiles bytecode  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> It's easy enough to fix by just adding a ifndef PROGRAM around the piece
> adding the depency to the .bc files:

> ifeq ($(with_llvm), yes)
> ifndef PROGRAM
> all: $(addsuffix .bc, $(MODULES)) $(patsubst %.o,%.bc, $(OBJS))
> endif # PROGRAM
> endif # with_llvm

> but it's not particularly pretty. But given the way pgxs.mk is
> structured, I'm not sure there's really a great answer?

Yeah.  The only other plausible alternative I see is like this:

ifeq ($(with_llvm), yes)
ifdef MODULES
all: $(addsuffix .bc, $(MODULES))
endif # MODULES
ifdef MODULE_big
all: $(patsubst %.o,%.bc, $(OBJS))
endif # MODULE_big
endif # with_llvm

which might be a little nicer because it squares better with,
eg, the install/uninstall rules.  But it's not much better.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_bsd_indent compiles bytecode
Next
From: Etsuro Fujita
Date:
Subject: Re: POC: postgres_fdw insert batching