mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-04 10:23:23 +02:00
5dd41f3574
make maintainer-check was obscure and rarely called in practice, and many breakages were missed. Fold everything that make maintainer-check used to do into the normal build. Specifically: - Call duplicate_oids when genbki.pl is called. - Check for tabs in SGML files when the documentation is built. - Run msgfmt with the -c option during the regular build. Add an additional configure check to see whether we are using the GNU version. (make maintainer-check probably used to fail with non-GNU msgfmt.) Keep maintainer-check as around as phony target for the time being in case anyone is calling it. But it won't do anything anymore.
49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
#
|
|
# Common make rules for backend
|
|
#
|
|
# src/backend/common.mk
|
|
#
|
|
|
|
# When including this file, set OBJS to the object files created in
|
|
# this directory and SUBDIRS to subdirectories containing more things
|
|
# to build.
|
|
|
|
ifdef PARTIAL_LINKING
|
|
# old style: linking using SUBSYS.o
|
|
subsysfilename = SUBSYS.o
|
|
else
|
|
# new style: linking all object files at once
|
|
subsysfilename = objfiles.txt
|
|
endif
|
|
|
|
SUBDIROBJS = $(SUBDIRS:%=%/$(subsysfilename))
|
|
|
|
# top-level backend directory obviously has its own "all" target
|
|
ifneq ($(subdir), src/backend)
|
|
all: $(subsysfilename)
|
|
endif
|
|
|
|
SUBSYS.o: $(SUBDIROBJS) $(OBJS)
|
|
$(LD) $(LDREL) $(LDOUT) $@ $^
|
|
|
|
objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS)
|
|
# Don't rebuild the list if only the OBJS have changed.
|
|
$(if $(filter-out $(OBJS),$?),( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@,touch $@)
|
|
|
|
# make function to expand objfiles.txt contents
|
|
expand_subsys = $(foreach file,$(1),$(if $(filter %/objfiles.txt,$(file)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file)))),$(file)))
|
|
|
|
# Parallel make trickery
|
|
$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
|
|
|
|
.PHONY: $(SUBDIRS:%=%-recursive)
|
|
$(SUBDIRS:%=%-recursive):
|
|
$(MAKE) -C $(subst -recursive,,$@) all
|
|
|
|
$(call recurse,clean)
|
|
clean: clean-local
|
|
clean-local:
|
|
rm -f $(subsysfilename) $(OBJS)
|
|
|
|
$(call recurse,coverage)
|