diff options
| author | John Naylor <john.naylor@postgresql.org> | 2022-09-04 11:33:31 +0700 |
|---|---|---|
| committer | John Naylor <john.naylor@postgresql.org> | 2022-09-04 12:09:01 +0700 |
| commit | dac048f71ebbcf2f980d280711f8ff8001331c5d (patch) | |
| tree | 48311f22d4636b6fb12cf2bb43925622521e758a /src/backend/utils/misc | |
| parent | 80e8450a744b1f6fa75663f37f1db3388995dc67 (diff) | |
| download | postgresql-dac048f71ebbcf2f980d280711f8ff8001331c5d.tar.gz | |
Build all Flex files standalone
The proposed Meson build system will need a way to ignore certain
generated files in order to coexist with the autoconf build system,
and C files generated by Flex which are #include'd into .y files make
this more difficult. In similar vein to 72b1e3a21, arrange for all Flex
C files to compile to their own .o targets.
Reviewed by Andres Freund
Discussion: https://www.postgresql.org/message-id/20220810171935.7k5zgnjwqzalzmtm%40awork3.anarazel.de
Discussion: https://www.postgresql.org/message-id/CAFBsxsF8Gc2StS3haXofshHCzqNMRXiSxvQEYGwnFsTmsdwNeg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/misc')
| -rw-r--r-- | src/backend/utils/misc/Makefile | 5 | ||||
| -rw-r--r-- | src/backend/utils/misc/guc-file.l | 8 | ||||
| -rw-r--r-- | src/backend/utils/misc/guc.c | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile index 1d5327cf64..cf7ce9bc83 100644 --- a/src/backend/utils/misc/Makefile +++ b/src/backend/utils/misc/Makefile @@ -16,6 +16,7 @@ override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) OBJS = \ guc.o \ + guc-file.o \ help_config.o \ pg_config.o \ pg_controldata.o \ @@ -37,10 +38,6 @@ endif include $(top_srcdir)/src/backend/common.mk -# guc-file is compiled as part of guc -guc.o: guc-file.c - # Note: guc-file.c is not deleted by 'make clean', # since we want to ship it in distribution tarballs. clean: - @rm -f lex.yy.c diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l index 8b5b299efd..4f43430db4 100644 --- a/src/backend/utils/misc/guc-file.l +++ b/src/backend/utils/misc/guc-file.l @@ -1,4 +1,4 @@ -/* -*-pgsql-c-*- */ +%top{ /* * Scanner for the configuration file * @@ -7,8 +7,6 @@ * src/backend/utils/misc/guc-file.l */ -%{ - #include "postgres.h" #include <ctype.h> @@ -19,8 +17,12 @@ #include "mb/pg_wchar.h" #include "miscadmin.h" #include "storage/fd.h" +#include <sys/stat.h> +#include "utils/memutils.h" +} +%{ /* * flex emits a yy_fatal_error() function that it calls in response to * critical errors like malloc failure, file I/O errors, and detection of diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0e6c13fa2a..c336698ad5 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -13333,5 +13333,3 @@ check_default_with_oids(bool *newval, void **extra, GucSource source) return true; } - -#include "guc-file.c" |
