mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-11 09:51:56 +02:00
New program: arch
* NEWS: Mention arch. * README: Add arch to the list of programs. * AUTHORS: Add arch. * src/uname.c: Include "uname.h". (PROGRAM_NAME): Handle arch, too. (ARCH_AUTHORS): Define. (uname_long_options, arch_long_options): Renamed and new globals. (usage): Handle arch-mode as well as uname-mode. (decode_switches): New function, extracted from main, to handle arch-mode as well as uname-mode. (main): Handle both modes. * src/uname-arch.c: New program, alias for "uname -m". * src/uname-uname.c: New file, default uname mode. * src/uname.h: New file, uname modes. * src/Makefile.am (EXTRA_PROGRAMS): Add arch. (uname_SOURCES, arch_SOURCES): Define. * man/arch.x: New file. * man/Makefile.am (dist_man_MANS): Add arch.1. (arch.1): New dependency. * tests/misc/arch: New test, compare "arch" with "uname -m" * configure.ac (OPTIONAL_BIN_PROGS): Add arch. (MAN): Add arch.1. * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c from the always-include-<config.h> rule. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Jim Meyering <jim@meyering.net>
This commit is contained in:
@@ -32,7 +32,7 @@ dist_man_MANS = \
|
||||
tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
|
||||
whoami.1 yes.1 $(MAN)
|
||||
optional_mans = \
|
||||
chroot.1 hostid.1 nice.1 pinky.1 stty.1 uname.1 uptime.1 users.1 who.1
|
||||
arch.1 chroot.1 hostid.1 nice.1 pinky.1 stty.1 uname.1 uptime.1 users.1 who.1
|
||||
|
||||
|
||||
man_aux = $(dist_man_MANS:.1=.x) $(optional_mans:.1=.x)
|
||||
@@ -43,6 +43,9 @@ MAINTAINERCLEANFILES = $(dist_man_MANS)
|
||||
# Depend on configure.ac to get version number changes.
|
||||
common_dep = $(top_srcdir)/configure.ac
|
||||
|
||||
# Note that arch depends on uname.c
|
||||
arch.1: $(common_dep) $(srcdir)/arch.x ../src/uname.c
|
||||
|
||||
base64.1: $(common_dep) $(srcdir)/base64.x ../src/base64.c
|
||||
basename.1: $(common_dep) $(srcdir)/basename.x ../src/basename.c
|
||||
cat.1: $(common_dep) $(srcdir)/cat.x ../src/cat.c
|
||||
|
||||
6
man/arch.x
Normal file
6
man/arch.x
Normal file
@@ -0,0 +1,6 @@
|
||||
[NAME]
|
||||
arch \- print machine hardware name (same as uname -m)
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
uname(1), uname(2)
|
||||
@@ -3,4 +3,4 @@ uname \- print system information
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
uname(2)
|
||||
arch(1), uname(2)
|
||||
|
||||
Reference in New Issue
Block a user