From 22d2322eb1202f6961041b8fcacbe6e6856fb6b0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 26 Jun 2012 17:53:09 +0200 Subject: build-sys: convert term-utils/ to module Signed-off-by: Karel Zak --- Makefile.am | 11 +++--- configure.ac | 2 - term-utils/Makefile.am | 79 -------------------------------------- term-utils/Makemodule.am | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ text-utils/Makefile.am | 62 ------------------------------ 5 files changed, 105 insertions(+), 148 deletions(-) delete mode 100644 term-utils/Makefile.am create mode 100644 term-utils/Makemodule.am delete mode 100644 text-utils/Makefile.am diff --git a/Makefile.am b/Makefile.am index a68ecfca9..d604e24eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,9 @@ dist_man_MANS = man_MANS = pkgconfig_DATA = usrlib_exec_LTLIBRARIES = +bin_PROGRAMS = +sbin_PROGRAMS = +dist_usrbin_exec_SCRIPTS = INSTALL_EXEC_HOOKS = UNINSTALL_HOOKS = @@ -32,10 +35,7 @@ SUBDIRS = \ misc-utils \ po \ sys-utils \ - term-utils \ - tests \ - text-utils - + tests RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \ -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o @@ -71,7 +71,8 @@ include libblkid/Makemodule.am include libmount/Makemodule.am include schedutils/Makemodule.am - +include text-utils/Makemodule.am +include term-utils/Makemodule.am # Arrange so that .tarball-version appears only in the distribution # tarball, and never in a checked-out repository. diff --git a/configure.ac b/configure.ac index ad69170d4..fc5d3de56 100644 --- a/configure.ac +++ b/configure.ac @@ -1321,11 +1321,9 @@ mount/Makefile partx/Makefile po/Makefile.in sys-utils/Makefile -term-utils/Makefile tests/Makefile tests/commands.sh tests/helpers/Makefile -text-utils/Makefile ]) diff --git a/term-utils/Makefile.am b/term-utils/Makefile.am deleted file mode 100644 index 378676f80..000000000 --- a/term-utils/Makefile.am +++ /dev/null @@ -1,79 +0,0 @@ -include $(top_srcdir)/config/include-Makefile.am - -bin_PROGRAMS = -usrbin_exec_PROGRAMS = script scriptreplay -sbin_PROGRAMS = -usrsbin_exec_PROGRAMS = - -dist_man_MANS = script.1 scriptreplay.1 - -script_LDADD = - -if HAVE_UTIL -script_LDADD += -lutil -endif - -if HAVE_UTEMPTER -script_LDADD += -lutempter -endif - -if BUILD_AGETTY -sbin_PROGRAMS += agetty -dist_man_MANS += agetty.8 -agetty_SOURCES = agetty.c -if !HAVE_LANGINFO -agetty_SOURCES += $(top_srcdir)/lib/langinfo.c -endif -endif - -if HAVE_NCURSES -if LINUX -usrbin_exec_PROGRAMS += setterm -dist_man_MANS += setterm.1 -endif -if HAVE_TINFO -setterm_LDADD = -ltinfo -else -setterm_LDADD = @NCURSES_LIBS@ -endif -endif - -if BUILD_RESET -dist_usrbin_exec_SCRIPTS = reset -dist_man_MANS += reset.1 -endif -EXTRA_DIST = reset.033c - -if BUILD_MESG -usrbin_exec_PROGRAMS += mesg -dist_man_MANS += mesg.1 -endif - -if BUILD_WALL -usrbin_exec_PROGRAMS += wall -wall_SOURCES = wall.c ttymsg.c ttymsg.h $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c -dist_man_MANS += wall.1 -wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -endif - -if BUILD_WRITE -usrbin_exec_PROGRAMS += write -dist_man_MANS += write.1 -write_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -endif - -if USE_TTY_GROUP -if MAKEINSTALL_DO_CHOWN -install-exec-hook:: -if BUILD_WALL - chgrp tty $(DESTDIR)$(usrbin_execdir)/wall - chmod g+s $(DESTDIR)$(usrbin_execdir)/wall -endif -if BUILD_WRITE - chgrp tty $(DESTDIR)$(usrbin_execdir)/write - chmod g+s $(DESTDIR)$(usrbin_execdir)/write -endif -endif -endif diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am new file mode 100644 index 000000000..419aec535 --- /dev/null +++ b/term-utils/Makemodule.am @@ -0,0 +1,99 @@ + +usrbin_exec_PROGRAMS += script +dist_man_MANS += term-utils/script.1 +script_SOURCES = term-utils/script.c +script_LDADD = +if HAVE_UTIL +script_LDADD += -lutil +endif +if HAVE_UTEMPTER +script_LDADD += -lutempter +endif + + +usrbin_exec_PROGRAMS += scriptreplay +dist_man_MANS += term-utils/scriptreplay.1 +scriptreplay_SOURCES = term-utils/scriptreplay.c + + +if BUILD_AGETTY +sbin_PROGRAMS += agetty +dist_man_MANS += term-utils/agetty.8 +agetty_SOURCES = term-utils/agetty.c +if !HAVE_LANGINFO +agetty_SOURCES += lib/langinfo.c +endif +endif # BUILD_AGETTY + + +# TODO: add BUILD_SETTERM to configure.am +if HAVE_NCURSES +if LINUX +usrbin_exec_PROGRAMS += setterm +dist_man_MANS += term-utils/setterm.1 +setterm_SOURCES = term-utils/setterm.c +endif +if HAVE_TINFO +setterm_LDADD = -ltinfo +else +setterm_LDADD = @NCURSES_LIBS@ +endif +endif + + +if BUILD_RESET +dist_usrbin_exec_SCRIPTS += term-utils/reset +dist_man_MANS += term-utils/reset.1 +endif +EXTRA_DIST += term-utils/reset.033c + + +if BUILD_MESG +usrbin_exec_PROGRAMS += mesg +dist_man_MANS += term-utils/mesg.1 +mesg_SOURCES = term-utils/mesg.c +endif + + +if BUILD_WALL +usrbin_exec_PROGRAMS += wall +wall_SOURCES = \ + term-utils/wall.c \ + term-utils/ttymsg.c \ + term-utils/ttymsg.h \ + lib/strutils.c \ + lib/fileutils.c + +dist_man_MANS += term-utils/wall.1 +wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) +wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + +if USE_TTY_GROUP +if MAKEINSTALL_DO_CHOWN +install-exec-hook-wall:: + chgrp tty $(DESTDIR)$(usrbin_execdir)/wall + chmod g+s $(DESTDIR)$(usrbin_execdir)/wall + +INSTALL_EXEC_HOOKS += install-exec-hook-wall +endif +endif +endif # BUILD_WALL + + +if BUILD_WRITE +usrbin_exec_PROGRAMS += write +dist_man_MANS += term-utils/write.1 +write_SOURCES = term-utils/write.c +write_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) +write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + +if USE_TTY_GROUP +if MAKEINSTALL_DO_CHOWN +install-exec-hook-write:: + chgrp tty $(DESTDIR)$(usrbin_execdir)/write + chmod g+s $(DESTDIR)$(usrbin_execdir)/write + +INSTALL_EXEC_HOOKS += install-exec-hook-write +endif +endif +endif # BUILD_WRITE diff --git a/text-utils/Makefile.am b/text-utils/Makefile.am deleted file mode 100644 index e495cdfaf..000000000 --- a/text-utils/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -include $(top_srcdir)/config/include-Makefile.am - -usrbin_exec_PROGRAMS = \ - col \ - colcrt \ - colrm \ - column \ - hexdump \ - rev \ - tailf - -column_SOURCES = column.c $(top_srcdir)/lib/strutils.c - -col_SOURCES = col.c $(top_srcdir)/lib/strutils.c - -colrm_SOURCES = colrm.c $(top_srcdir)/lib/strutils.c - -hexdump_SOURCES = \ - conv.c \ - display.c \ - hexdump.c \ - hexdump.h \ - hexsyntax.c \ - parse.c \ - $(top_srcdir)/lib/strutils.c - -tailf_SOURCES = tailf.c $(top_srcdir)/lib/strutils.c - -dist_man_MANS = \ - col.1 \ - colcrt.1 \ - colrm.1 \ - column.1 \ - hexdump.1 \ - rev.1 \ - tailf.1 - -if BUILD_LINE -usrbin_exec_PROGRAMS += line -dist_man_MANS += line.1 -endif - -if HAVE_NCURSES -bin_PROGRAMS = more -usrbin_exec_PROGRAMS += ul pg -if HAVE_TINFO -more_LDADD = -ltinfo -pg_LDADD = -ltinfo @NCURSES_LIBS@ -ul_LDADD = -ltinfo -else -more_LDADD = @NCURSES_LIBS@ -pg_LDADD = @NCURSES_LIBS@ -ul_LDADD = @NCURSES_LIBS@ -endif -dist_man_MANS += ul.1 more.1 pg.1 -else -if HAVE_TERMCAP -bin_PROGRAMS = more -more_LDADD = -ltermcap -dist_man_MANS += more.1 -endif -endif -- cgit v1.2.3-55-g7522