]> err.no Git - util-linux/commitdiff
build-sys: do not build convenience libraries in lib/
authorStepan Kasal <skasal@redhat.com>
Tue, 15 May 2007 18:46:08 +0000 (20:46 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 16 May 2007 09:43:29 +0000 (11:43 +0200)
Build lib/*.c individually for each project which uses it, so that the
right set of flags is applied each time.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
Makefile.am
configure.ac
disk-utils/Makefile.am
lib/Makefile.am [deleted file]
login-utils/Makefile.am
misc-utils/Makefile.am
mount/Makefile.am

index b1ab4e2405196fadcd6ebc16ef119499670747b8..feb98d952fef7ff02be45c876b3db1c365b5e89d 100644 (file)
@@ -1,6 +1,6 @@
 include $(top_srcdir)/config/include-Makefile.am
 
-SUBDIRS = lib \
+SUBDIRS = \
        include \
        disk-utils \
        fdisk \
index 3d702666c7b9de35f7729b3c9ebbf8f0175208aa..d008e9312db059b903c28e75a7b06e2974790854 100644 (file)
@@ -415,7 +415,6 @@ fdisk/Makefile
 getopt/Makefile
 hwclock/Makefile
 include/Makefile
-lib/Makefile
 login-utils/Makefile
 misc-utils/Makefile
 mount/Makefile
index 95082021b8d244da0d65c08028f1668feba12292..ab44a3309665a5e4db0c311326f66950a600d7db 100644 (file)
@@ -26,9 +26,9 @@ endif
 if BUILD_CRAMFS
 sbin_PROGRAMS += fsck.cramfs mkfs.cramfs
 fsck_cramfs_SOURCES = fsck.cramfs.c cramfs.h
-mkfs_cramfs_SOURCES = mkfs.cramfs.c cramfs.h
+mkfs_cramfs_SOURCES = mkfs.cramfs.c cramfs.h ../lib/md5.c
 fsck_cramfs_LDADD = -lz
-mkfs_cramfs_LDADD = -lz $(top_srcdir)/lib/libmd5.a
+mkfs_cramfs_LDADD = -lz
 endif
 
 mkswap_LDADD =
diff --git a/lib/Makefile.am b/lib/Makefile.am
deleted file mode 100644 (file)
index b52561e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(top_srcdir)/config/include-Makefile.am
-
-noinst_LIBRARIES = libmd5.a libenv.a libsetproctitle.a
-
-libmd5_a_SOURCES = md5.c
-libenv_a_SOURCES = env.c
-libsetproctitle_a_SOURCES = setproctitle.c
\ No newline at end of file
index f6698217587210e69aea22708a02d9924de9174e..efdba27c0b76d3b8c98e20d99df7b7f837b0d49c 100644 (file)
@@ -40,14 +40,17 @@ usrbinexec_PROGRAMS += chfn chsh newgrp
 usrsbinexec_PROGRAMS += vipw
 man_MANS += chfn.1 chsh.1 login.1 newgrp.1 vipw.8 vigr.8
 
-chfn_SOURCES = chfn.c islocal.c setpwnam.c islocal.h my_crypt.h setpwnam.h
-chsh_SOURCES = chsh.c islocal.c setpwnam.c islocal.h my_crypt.h setpwnam.h
+chfn_SOURCES = chfn.c $(chfn_chsh_common)
+chsh_SOURCES = chsh.c $(chfn_chsh_common)
+chfn_chsh_common = islocal.c setpwnam.c islocal.h my_crypt.h setpwnam.h \
+       ../lib/env.c
+login_SOURCES = login.c login.h my_crypt.h ../lib/setproctitle.c
 newgrp_SOURCES = newgrp.c my_crypt.h
 vipw_SOURCES = vipw.c setpwnam.h
 
-chfn_LDADD = ../lib/libenv.a
-chsh_LDADD = ../lib/libenv.a
-login_LDADD = ../lib/libsetproctitle.a
+chfn_LDADD =
+chsh_LDADD =
+login_LDADD =
 newgrp_LDADD =
 vipw_LDADD =
 
@@ -70,9 +73,8 @@ if HAVE_PAM
 chfn_LDADD += -lpam -lpam_misc
 chsh_LDADD += -lpam -lpam_misc
 login_LDADD += -lpam -lpam_misc
-login_SOURCES = login.c login.h my_crypt.h
 else
-login_SOURCES = login.c checktty.c login.h my_crypt.h
+login_SOURCES += checktty.c
 endif
 
 if HAVE_AUDIT
index a772a28bd5d419b508beac41c22fbfea283b435a..26a8819f1bc8dc86ab11fdd7be2008bfc203ec84 100644 (file)
@@ -11,7 +11,7 @@ bin_PROGRAMS =
 usrbinexec_PROGRAMS = cal ddate logger look mcookie \
        namei script whereis
 
-mcookie_LDADD = $(top_srcdir)/lib/libmd5.a
+mcookie_SOURCES = mcookie.c ../lib/md5.c
 
 usrbinexec_SCRIPTS = chkdupexe scriptreplay
 
index 6dbda45ab3cbf3534a3ab34b4048208ebba7783a..2734945a7490ce9ef15663dd46ca44fcfc9c1f64 100644 (file)
@@ -13,16 +13,16 @@ MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \
        sundries.h
 mount_common = fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \
        getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \
-       lomount.c $(MNTHDRS)
+       lomount.c $(MNTHDRS) ../lib/env.c
 
-mount_SOURCES = mount.c $(mount_common) \
+mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c \
        mount_guess_fstype.c
-mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a
+mount_LDADD =
 mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
 mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
 
 umount_SOURCES = umount.c $(mount_common)
-umount_LDADD = $(top_srcdir)/lib/libenv.a
+umount_LDADD =
 umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
 umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)