mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-13 09:57:02 +08:00
Versions of flex before 2.5.36 might generate code that results in an "unused variable" warning, when using %option reentrant. Historically we've worked around that by specifying -Wno-error, but that's an unsatisfying solution. The official "fix" for this was just to insert a dummy reference to the variable, so write a small perl script that edits the generated C code similarly. The MSVC side of this is untested, but the buildfarm should soon reveal if I broke that. Discussion: https://postgr.es/m/25456.1487437842@sss.pgh.pa.us
53 lines
1.3 KiB
Makefile
53 lines
1.3 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile for src/fe_utils
|
|
#
|
|
# This makefile generates a static library, libpgfeutils.a,
|
|
# for use by client applications
|
|
#
|
|
# Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
|
#
|
|
# IDENTIFICATION
|
|
# src/fe_utils/Makefile
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
subdir = src/fe_utils
|
|
top_builddir = ../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
|
|
|
|
OBJS = mbprint.o print.o psqlscan.o simple_list.o string_utils.o
|
|
|
|
all: libpgfeutils.a
|
|
|
|
libpgfeutils.a: $(OBJS)
|
|
rm -f $@
|
|
$(AR) $(AROPT) $@ $^
|
|
|
|
psqlscan.c: FLEXFLAGS = -Cfe -p -p
|
|
psqlscan.c: FLEX_NO_BACKUP=yes
|
|
psqlscan.c: FLEX_FIX_WARNING=yes
|
|
|
|
distprep: psqlscan.c
|
|
|
|
# libpgfeutils could be useful to contrib, so install it
|
|
install: all installdirs
|
|
$(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
|
|
|
|
installdirs:
|
|
$(MKDIR_P) '$(DESTDIR)$(libdir)'
|
|
|
|
uninstall:
|
|
rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
|
|
|
|
clean distclean:
|
|
rm -f libpgfeutils.a $(OBJS) lex.backup
|
|
|
|
# psqlscan.c is supposed to be in the distribution tarball,
|
|
# so do not clean it in the clean/distclean rules
|
|
maintainer-clean: distclean
|
|
rm -f psqlscan.c
|