From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@redhat.com, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 3/5] mkfs: hoist mkfs configfile dir string generation to build system
Date: Wed, 13 Jun 2018 12:32:05 -0700 [thread overview]
Message-ID: <152891832515.3968.9067729692865604405.stgit@magnolia> (raw)
In-Reply-To: <152891829964.3968.4760134019673731615.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Move the generation of MKFS_XFS_CONF_DIR to the build system; in the
next few patches we're going to use that to install a (disabled) default
config file.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
include/builddefs.in | 4 +++-
mkfs/Makefile | 5 +++++
mkfs/config.h | 3 ---
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/builddefs.in b/include/builddefs.in
index e1ee9f7b..06cb71a6 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -65,6 +65,9 @@ PKG_MAN_DIR = @mandir@
PKG_ETC_DIR = @sysconfdir@
PKG_DOC_DIR = @datadir@/doc/@pkg_name@
PKG_LOCALE_DIR = @datadir@/locale
+PKG_CFG_DIR = $(PKG_ETC_DIR)/xfs
+PKG_MKFS_CFG_DIR = $(PKG_CFG_DIR)/mkfs
+PKG_MKFS_DEFAULT_CFGFILE = default
CC = @cc@
BUILD_CC = @BUILD_CC@
@@ -197,7 +200,6 @@ endif
GCFLAGS = $(DEBUG) \
-DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
- -DROOT_SYSCONFDIR=\"$(PKG_ETC_DIR)\" \
-DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
ifeq ($(ENABLE_GETTEXT),yes)
diff --git a/mkfs/Makefile b/mkfs/Makefile
index 5af8a6cc..102f5214 100644
--- a/mkfs/Makefile
+++ b/mkfs/Makefile
@@ -10,6 +10,9 @@ LTCOMMAND = mkfs.xfs
HFILES =
CFILES = proto.c xfs_mkfs.c config.c defaults.c
+CFGFILE_CFLAGS = -DMKFS_XFS_CONF_DIR=\"$(PKG_MKFS_CFG_DIR)\" \
+ -DMKFS_XFS_DEFAULT_CONFIG=\"$(PKG_MKFS_DEFAULT_CFGFILE)\"
+LCFLAGS += $(CFGFILE_CFLAGS)
LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBFROG) $(LIBRT) $(LIBPTHREAD) $(LIBBLKID) \
$(LIBUUID)
LTDEPENDENCIES += $(LIBXFS) $(LIBXCMD) $(LIBFROG)
@@ -22,6 +25,8 @@ include $(BUILDRULES)
install: default
$(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
+ $(INSTALL) -m 755 -d $(PKG_CFG_DIR)
+ $(INSTALL) -m 755 -d $(PKG_MKFS_CFG_DIR)
install-dev:
-include .dep
diff --git a/mkfs/config.h b/mkfs/config.h
index f00849e9..69f44405 100644
--- a/mkfs/config.h
+++ b/mkfs/config.h
@@ -19,9 +19,6 @@
#ifndef _XFS_MKFS_CONFIG_H
#define _XFS_MKFS_CONFIG_H
-#define MKFS_XFS_CONF_DIR ROOT_SYSCONFDIR "/xfs/mkfs"
-#define MKFS_XFS_DEFAULT_CONFIG "default"
-
struct fsxattr;
/*
next prev parent reply other threads:[~2018-06-13 19:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 19:31 [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements Darrick J. Wong
2018-06-13 19:31 ` [PATCH 1/5] mkfs: move build-time defaults to a separate file Darrick J. Wong
2018-06-14 2:34 ` Eric Sandeen
2018-06-13 19:31 ` [PATCH 2/5] mkfs: move config file enums to config.h Darrick J. Wong
2018-06-14 2:51 ` Eric Sandeen
2018-06-14 16:24 ` Luis R. Rodriguez
2018-06-13 19:32 ` Darrick J. Wong [this message]
2018-06-14 2:54 ` [PATCH 3/5] mkfs: hoist mkfs configfile dir string generation to build system Eric Sandeen
2018-06-13 19:32 ` [PATCH 4/5] mkfs: emit config file from builtin defaults Darrick J. Wong
2018-06-14 3:05 ` Eric Sandeen
2018-06-13 19:32 ` [PATCH 5/5] mkfs: generate mkfs config file in man page Darrick J. Wong
2018-06-14 3:17 ` Eric Sandeen
2018-06-14 4:06 ` [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements Dave Chinner
2018-06-14 4:23 ` Eric Sandeen
2018-06-14 5:08 ` Dave Chinner
2018-06-14 6:29 ` Darrick J. Wong
2018-06-14 17:46 ` Luis R. Rodriguez
2018-06-14 17:59 ` Darrick J. Wong
2018-06-14 18:16 ` Luis R. Rodriguez
2018-06-14 18:35 ` Darrick J. Wong
2018-06-16 0:04 ` Luis R. Rodriguez
2018-06-14 19:05 ` Eric Sandeen
2018-06-14 22:22 ` Dave Chinner
2018-06-14 23:33 ` Dave Chinner
2018-06-14 23:38 ` Eric Sandeen
2018-06-14 14:31 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=152891832515.3968.9067729692865604405.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.