Fix a compiler warning in initStringInfo().
[pgsql.git] / src / tools / pg_bsd_indent / Makefile
blob1d6aa76df9474af995c44e9157610bd3ca9ebd56
1 #-------------------------------------------------------------------------
3 # src/tools/pg_bsd_indent/Makefile
5 # Copyright (c) 2017-2025, PostgreSQL Global Development Group
7 #-------------------------------------------------------------------------
9 PGFILEDESC = "pg_bsd_indent - indent C code nicely"
10 PGAPPICON = win32
12 subdir = src/tools/pg_bsd_indent
13 top_builddir = ../../..
14 include $(top_builddir)/src/Makefile.global
16 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
18 OBJS = \
19 $(WIN32RES) \
20 args.o \
21 err.o \
22 indent.o \
23 io.o \
24 lexi.o \
25 parse.o \
26 pr_comment.o
28 $(OBJS): CFLAGS += $(PERMIT_MISSING_VARIABLE_DECLARATIONS)
30 all: pg_bsd_indent
32 pg_bsd_indent: $(OBJS) | submake-libpgport
33 $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
35 install: all installdirs
36 $(INSTALL_PROGRAM) pg_bsd_indent$(X) '$(DESTDIR)$(bindir)/pg_bsd_indent$(X)'
38 installdirs:
39 $(MKDIR_P) '$(DESTDIR)$(bindir)'
41 uninstall:
42 rm -f '$(DESTDIR)$(bindir)/pg_bsd_indent$(X)'
44 clean distclean:
45 rm -f pg_bsd_indent$(X) $(OBJS)
46 rm -rf log/ tmp_check/
48 check: pg_bsd_indent
49 $(prove_check)
51 installcheck:
52 $(prove_installcheck)
54 # Provide this alternate test name to allow testing pg_bsd_indent
55 # without building all of the surrounding Postgres installation.
56 .PHONY: test
58 test: pg_bsd_indent
59 $(prove_installcheck)