From: Samuel Thibault Date: Sun, 4 Nov 2007 15:54:27 +0000 (+0000) Subject: build-sys: non-linux support X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bbc9320791e2768eb0ddda3823cb55ad63f79e1;p=util-linux build-sys: non-linux support Here is a patch that disables linux-specific tools on non-linux targets. Signed-Off-By: Samuel Thibault Signed-Off-By: Karel Zak --- diff --git a/Makefile.am b/Makefile.am index f00f51a6..0915ba40 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,17 +5,21 @@ SUBDIRS = \ disk-utils \ fdisk \ getopt \ - hwclock \ login-utils \ misc-utils \ - mount \ - partx \ po \ schedutils \ sys-utils \ text-utils \ tests +if LINUX +SUBDIRS += \ + hwclock \ + mount \ + partx +endif + ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ diff --git a/configure.ac b/configure.ac index 1ea72c6b..dacc7962 100644 --- a/configure.ac +++ b/configure.ac @@ -292,6 +292,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.]) ]) +case ${host_os} in + *linux*) + AM_CONDITIONAL([LINUX], [true]) + ;; + *) + AM_CONDITIONAL([LINUX], [false]) + ;; +esac dnl UTIL_SET_ARCH(ARCHNAME, PATTERN) dnl --------------------------------- diff --git a/disk-utils/Makefile.am b/disk-utils/Makefile.am index 397d8efb..eadc89d6 100644 --- a/disk-utils/Makefile.am +++ b/disk-utils/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/include-Makefile.am -man_MANS = blockdev.8 fdformat.8 isosize.8 mkfs.8 mkswap.8 \ +man_MANS = blockdev.8 isosize.8 mkfs.8 mkswap.8 \ fsck.minix.8 mkfs.minix.8 mkfs.bfs.8 sbin_PROGRAMS = mkfs mkswap blockdev fsck.minix mkfs.minix mkfs.bfs @@ -10,7 +10,12 @@ mkfs_bfs_SOURCES = mkfs.bfs.c mkswap_SOURCES = mkswap.c swapheader.h ../lib/linux_version.c ../lib/blkdev.c blockdev_SOURCES = blockdev.c ../lib/linux_version.c ../lib/blkdev.c -usrbinexec_PROGRAMS = fdformat isosize +usrbinexec_PROGRAMS = isosize + +if LINUX +man_MANS += fdformat.8 +usrbinexec_PROGRAMS += fdformat +endif if BUILD_ELVTUNE sbin_PROGRAMS += elvtune diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am index 45ee3ccc..e01f586a 100644 --- a/misc-utils/Makefile.am +++ b/misc-utils/Makefile.am @@ -34,8 +34,10 @@ script_LDADD = -lutil endif if HAVE_NCURSES +if LINUX usrbinexec_PROGRAMS += setterm man_MANS += setterm.1 +endif if HAVE_TINFO setterm_LDADD = -ltinfo else diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am index 4ef94d4d..7d5195a1 100644 --- a/sys-utils/Makefile.am +++ b/sys-utils/Makefile.am @@ -1,14 +1,25 @@ include $(top_srcdir)/config/include-Makefile.am -bin_PROGRAMS = dmesg +bin_PROGRAMS = +if LINUX +bin_PROGRAMS += dmesg +endif -usrbinexec_PROGRAMS = cytune flock ipcrm ipcs renice setsid setarch +usrbinexec_PROGRAMS = flock ipcrm ipcs renice setsid +if LINUX +usrbinexec_PROGRAMS += cytune setarch +endif cytune_SOURCES = cytune.c cyclades.h +if LINUX sbin_PROGRAMS = ctrlaltdel +endif -usrsbinexec_PROGRAMS = readprofile tunelp rtcwake +usrsbinexec_PROGRAMS = readprofile +if LINUX +usrsbinexec_PROGRAMS += tunelp rtcwake +endif tunelp_SOURCES = tunelp.c lp.h