build-sys: clean up partx Makefile

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2011-03-16 17:39:54 +01:00
parent b1ef3ad66b
commit b98ae9c2e8
3 changed files with 22 additions and 17 deletions

View File

@ -41,7 +41,7 @@ if BUILD_HWCLOCK
SUBDIRS += hwclock
endif
if LINUX
if BUILD_PARTX
SUBDIRS += partx
endif

View File

@ -367,6 +367,22 @@ AC_ARG_ENABLE([fsck],
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
AC_ARG_ENABLE([partx],
AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
[], enable_partx=check
)
build_partx=yes
if test "x$enable_partx" = xcheck; then
if test "x$linux_os" = xno; then
AC_MSG_WARN([non-linux system; do not build partx utilities])
build_partx=no
fi
elif test "x$enable_partx" = xno; then
build_partx=no
fi
AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
AC_ARG_ENABLE([libuuid],
AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
[], enable_libuuid=yes
@ -419,6 +435,9 @@ else
if test "x$enable_fsck" = xyes; then
AC_MSG_ERROR([libblkid is needed to build util-linux fsck])
fi
if test "x$build_partx" = xyes; then
AC_MSG_ERROR([libblkid is needed to build util-linux partx])
fi
fi
@ -976,13 +995,6 @@ AC_ARG_ENABLE([mesg],
AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
AC_ARG_ENABLE([partx],
AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
[], enable_partx=no
)
AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
AC_ARG_ENABLE([raw],
AS_HELP_STRING([--enable-raw], [build raw]),
[], enable_raw=no

View File

@ -3,22 +3,15 @@ include $(top_srcdir)/config/include-Makefile.am
usrsbin_exec_PROGRAMS = addpart delpart
dist_man_MANS = addpart.8 delpart.8
if BUILD_PARTX
if BUILD_LIBBLKID
usrsbin_exec_PROGRAMS += partx
partx_SOURCES = partx.c partx.h \
$(top_srcdir)/lib/blkdev.c \
$(top_srcdir)/lib/tt.c \
$(top_srcdir)/lib/mbsalign.c \
$(top_srcdir)/lib/strutils.c
if LINUX
partx_SOURCES += $(top_srcdir)/lib/linux_version.c
endif
$(top_srcdir)/lib/strutils.c \
$(top_srcdir)/lib/linux_version.c
partx_CFLAGS = -I$(ul_libblkid_incdir)
partx_LDADD = $(ul_libblkid_la)
dist_man_MANS += partx.8
endif
endif