glusterfs/Makefile.am
Jeff Darcy d8ee72b922 build: add site.h as a place to put environment-specific defines
Most people consume Gluster in one of two ways:

 * From packages provided by their OS/distribution vendor

 * By building themselves from source

For the first group it doesn't matter whether configuration is done in
a configure script, via command-line options to that configure script,
or in a header file.  All of these end up as edits to some file under
the packager's control, which is then run through their tools and
process (e.g. rpmbuild) to create the packages that users will
install.

For the second group, convenience matters.  Such users might not even
have a script wrapped around the configure process, and editing one
line in a header file is a lot easier than editing several in the
configure script.  This also prevents a messy profusion of configure
options, dozens of which might need to be added to support a single
such user's preferences.  This comes back around as greater simplicity
for packagers as well.

This patch defines site.h as the header file for options and
parameters that someone building the code for themselves might want to
tweak.  The project can ship one version to reflect the developers'
guess at the best defaults for most users, and sophisticated users
with unusual needs can override many options at once just by
maintaining their own version of that file.  Everybody wins.  Further
guidelines for how to determine whether an option should go in
configure.ac or site.h are explained within site.h itself.

Fixes #201

Change-Id: I5b8fb518d42450737423c4c1f43ebeb3130b4ff6
Signed-off-by: Jeff Darcy <jdarcy@fb.com>
Reviewed-on: https://review.gluster.org/17206
Tested-by: Jeff Darcy <jeff@pl.atyp.us>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2017-05-10 12:25:10 +00:00

67 lines
2.3 KiB
Makefile

SOURCES = site.h
EXTRA_DIST = autogen.sh \
COPYING-GPLV2 COPYING-LGPLV3 \
INSTALL README.md AUTHORS THANKS NEWS \
glusterfs.spec glusterfs-api.pc.in libgfchangelog.pc.in libgfdb.pc.in \
run-tests.sh \
build-aux/pkg-version \
contrib/argp-standalone \
contrib/umountd \
contrib/uuid \
$(shell find $(top_srcdir)/tests -type f -print)
SUBDIRS = $(ARGP_STANDALONE_DIR) rpc/xdr/gen libglusterfs rpc api xlators \
glusterfsd $(FUSERMOUNT_SUBDIR) doc extras cli heal \
@SYNCDAEMON_SUBDIR@ @UMOUNTD_SUBDIR@ tools events
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = glusterfs-api.pc libgfchangelog.pc
if USE_GFDB
pkgconfig_DATA += libgfdb.pc
endif
CLEANFILES = glusterfs-api.pc libgfchangelog.pc libgfdb.pc \
tests/env.rc contrib/umountd/Makefile{,.in}
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
gitclean: distclean
find . -name Makefile.in -exec rm -f {} \;
find . -name mount.glusterfs -exec rm -f {} \;
rm -fr autom4te.cache
rm -f missing aclocal.m4 config.h.in config.guess config.sub ltmain.sh install-sh configure depcomp
-rm -fr $(CONTRIBDIR)/argp-standalone/autom4te.cache
-rm -f $(CONTRIBDIR)/argp-standalone/aclocal.m4
-rm -f $(CONTRIBDIR)/argp-standalone/config.h.in
-rm -f $(CONTRIBDIR)/argp-standalone/configure
-rm -f $(CONTRIBDIR)/argp-standalone/config.status
-rm -f $(CONTRIBDIR)/argp-standalone/config.log
-rm -f $(CONTRIBDIR)/argp-standalone/depcomp
-rm -fr $(CONTRIBDIR)/argp-standalone/.deps
-rm -f $(CONTRIBDIR)/argp-standalone/install-sh
-rm -f $(CONTRIBDIR)/argp-standalone/missing
dist-hook: gen-VERSION gen-ChangeLog
-rm -fr $(distdir)/contrib/argp-standalone/autom4te.cache
-rm -fr $(distdir)/contrib/argp-standalone/.deps
-rm -fr $(distdir)/contrib/umountd/.deps
-cp -f $(top_srcdir)/build-aux/config.sub.dist $(distdir)/config.sub
-cp -f $(top_srcdir)/build-aux/config.guess.dist $(distdir)/config.guess
.PHONY: gen-VERSION gen-ChangeLog clang-check
clang-check:
@$(top_srcdir)/extras/clang-checker.sh
gen-ChangeLog:
(cd $(srcdir) && git diff && echo ===== git log ==== && git log) > $(distdir)/ChangeLog
.PHONY : gen-VERSION
gen-VERSION:
if test -d $(top_srcdir)/.git; then \
cd $(top_srcdir); \
./build-aux/pkg-version --full \
> $(abs_top_builddir)/$(distdir)/VERSION; \
fi