diff options
author | James Youngman <jay@gnu.org> | 2008-01-25 16:05:52 +0000 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-02-13 14:37:22 +0100 |
commit | 167b8025aca487de001da2448c1aebc2747bc1d3 (patch) | |
tree | 8c0317373fe16fedf407e468d79d914c860e3ece /src/Makefile.am | |
parent | 0601086bd8bc923e9a3eb91201428e2a30b43852 (diff) | |
download | coreutils-167b8025aca487de001da2448c1aebc2747bc1d3.tar.xz |
Replace groups.sh with groups.c.
* src/groups.c (main): New file, replacing groups.sh.
* src/group-list.c, src/group-list.h: New files, factored out of id.c,
implementing the functionality that "id" and "groups" have in common.
* src/id.c (print_full_info): Avoid a segfault when trying to print
an error message if getgroups fails.
(print_group_list): Move to group-list.c.
(print_group): Likewise.
* man/Makefile.am: When building groups.1, obtain the help text
from src/groups.c, not src/groups.sh.
(noinst_HEADERS): Add group-list.h.
(group): Remove rule.
(dist_man_MANS): Remove groups.1.
* doc/coreutils.texi (groups: Print group names a user is in):
Explain why "groups" and "groups $(id -un)" give different results
in existing login sessions after you change the group database.
(id: Print user identity): Likewise for "id".
* po/POTFILES.in: Add src/group-list.c and src/groups.c.
* NEWS: mention this.
* AUTHORS: Update.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a0b1d0c0c..155f22bf3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ EXTRA_PROGRAMS = \ ginstall link ln dir vdir ls mkdir \ mkfifo mknod mktemp \ mv nohup readlink rm rmdir shred stat sync touch unlink \ - cat cksum comm csplit cut expand fmt fold head join md5sum \ + cat cksum comm csplit cut expand fmt fold head join groups md5sum \ nl od paste pr ptx sha1sum sha224sum sha256sum sha384sum sha512sum \ shuf sort split sum tac tail tr tsort unexpand uniq wc \ basename date dirname echo env expr factor false \ @@ -42,7 +42,6 @@ EXTRA_PROGRAMS = \ test true tty whoami yes \ base64 -bin_SCRIPTS = groups bin_PROGRAMS = $(OPTIONAL_BIN_PROGS) noinst_PROGRAMS = setuidgid @@ -53,6 +52,7 @@ noinst_HEADERS = \ cp-hash.h \ dircolors.h \ fs.h \ + group-list.h \ ls.h \ remove.h \ system.h \ @@ -61,7 +61,7 @@ noinst_HEADERS = \ uname.h EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \ - groups.sh wheel-gen.pl extract-magic c99-to-c89.diff + wheel-gen.pl extract-magic c99-to-c89.diff BUILT_SOURCES = CLEANFILES = $(SCRIPTS) su @@ -142,20 +142,6 @@ RELEASE_YEAR = \ `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \ $(top_srcdir)/lib/version-etc.c` -# This depends on 'Makefile', so that version changes -#(reflected in Makefile's VERSION definition) -# are reflected into groups --version also between releases. -groups: groups.sh Makefile - rm -f $@ $@-t - sed \ - -e 's!@''bindir''@!$(bindir)!' \ - -e 's/@''RELEASE_YEAR'@/$(RELEASE_YEAR)/ \ - -e 's/@''PACKAGE_NAME''@/$(PACKAGE_NAME)/' \ - -e 's/@''PACKAGE_BUGREPORT''@/$(PACKAGE_BUGREPORT)/' \ - -e 's/@''VERSION''@/$(VERSION)/' $(srcdir)/groups.sh > $@-t - chmod +x $@-t - mv $@-t $@ - all-local: su$(EXEEXT) installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'` @@ -225,6 +211,8 @@ __SOURCES = lbracket.c cp_SOURCES = cp.c $(copy_sources) dir_SOURCES = ls.c ls-dir.c vdir_SOURCES = ls.c ls-vdir.c +id_SOURCES = id.c group-list.c +groups_SOURCES = groups.c group-list.c ln_SOURCES = ln.c ls_SOURCES = ls.c ls-ls.c chown_SOURCES = chown.c chown-core.c |