| 1 |
#------------------------------------------------------------------------- |
| 2 |
# |
| 3 |
# src/tools/pg_bsd_indent/Makefile |
| 4 |
# |
| 5 |
# Copyright (c) 2017-2025, PostgreSQL Global Development Group |
| 6 |
# |
| 7 |
#------------------------------------------------------------------------- |
| 8 |
|
| 9 |
PGFILEDESC = "pg_bsd_indent - indent C code nicely" |
| 10 |
PGAPPICON = win32 |
| 11 |
|
| 12 |
subdir = src/tools/pg_bsd_indent |
| 13 |
top_builddir = ../../.. |
| 14 |
include $(top_builddir)/src/Makefile.global |
| 15 |
|
| 16 |
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) |
| 17 |
|
| 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 |
| 27 |
|
| 28 |
$(OBJS): CFLAGS += $(PERMIT_MISSING_VARIABLE_DECLARATIONS) |
| 29 |
|
| 30 |
all: pg_bsd_indent |
| 31 |
|
| 32 |
pg_bsd_indent: $(OBJS) | submake-libpgport |
| 33 |
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) |
| 34 |
|
| 35 |
install: all installdirs |
| 36 |
$(INSTALL_PROGRAM) pg_bsd_indent$(X) '$(DESTDIR)$(bindir)/pg_bsd_indent$(X)' |
| 37 |
|
| 38 |
installdirs: |
| 39 |
$(MKDIR_P) '$(DESTDIR)$(bindir)' |
| 40 |
|
| 41 |
uninstall: |
| 42 |
rm -f '$(DESTDIR)$(bindir)/pg_bsd_indent$(X)' |
| 43 |
|
| 44 |
clean distclean: |
| 45 |
rm -f pg_bsd_indent$(X) $(OBJS) |
| 46 |
rm -rf log/ tmp_check/ |
| 47 |
|
| 48 |
check: pg_bsd_indent |
| 49 |
$(prove_check) |
| 50 |
|
| 51 |
installcheck: |
| 52 |
$(prove_installcheck) |
| 53 |
|
| 54 |
# Provide this alternate test name to allow testing pg_bsd_indent |
| 55 |
# without building all of the surrounding Postgres installation. |
| 56 |
.PHONY: test |
| 57 |
|
| 58 |
test: pg_bsd_indent |
| 59 |
$(prove_installcheck) |