]> err.no Git - util-linux/commitdiff
build-sys: non-linux support
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 4 Nov 2007 15:54:27 +0000 (15:54 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 8 Nov 2007 01:26:36 +0000 (02:26 +0100)
Here is a patch that disables linux-specific tools on non-linux targets.

Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-Off-By: Karel Zak <kzak@redhat.com>
Makefile.am
configure.ac
disk-utils/Makefile.am
misc-utils/Makefile.am
sys-utils/Makefile.am

index f00f51a628b2f697f798d583069f4ea6d9cea6c5..0915ba403c362af183a9e1870532ba05949eb6d4 100644 (file)
@@ -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 = \
index 1ea72c6b965e4192f350ddaa38edf44a0f7182a1..dacc79625e6797924a7fb1657bf1e52cdc2411e6 100644 (file)
@@ -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 ---------------------------------
index 397d8efb453b52d62cd08298f4a0d001785db22f..eadc89d6df002d307bf607ec52a7dc223cbac9de 100644 (file)
@@ -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
index 45ee3cccfe8604b4ab89a7a151efa2b735b189a9..e01f586a8e7fdb73d50c2ebe0d971551331fd1f2 100644 (file)
@@ -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
index 4ef94d4d37ece82603f43546bcec1597983d37cb..7d5195a1d20782b358559ca1d583a60464e9db96 100644 (file)
@@ -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