summaryrefslogtreecommitdiff
path: root/src/Makefile.am
AgeCommit message (Collapse)Author
2010-04-23tests: fix exit status of signal handlers in shell scriptsDmitry V. Levin
The value of `$?' on entrance to signal handlers in shell scripts cannot be relied upon, so set the exit code explicitly. * cfg.mk (sc_always_defined_macros, sc_system_h_headers): Set the exit code in signal handler explicitly to 128 + SIG<SIGNAL>. * src/Makefile.am (sc_tight_scope): Likewise. * tests/test-lib.sh: Likewise.
2010-04-16maint: fix build on platforms that replace strsignalPádraig Brady
* src/Makefile.am (kill_LDADD): Add $(LIBTHREAD) so that we link with the appropriate libraries to provide Thread Local Storage on platforms that replace strsignal (like AIX for example). Tested-by: Daniel Richard G. <danielg@teragram.com>
2010-03-29build: update after change in gnulib's lib-ignore moduleBruno Haible
* src/Makefile.am (AM_LDFLAGS): Define. Use gnulib's new $(IGNORE_UNUSED_LIBRARIES_CFLAGS).
2010-03-18revert "maint: mark makefile "dist-hook" target as PHONY"Ralf Wildenhues
* src/Makefile.am (dist-hook): Do not mark this target as PHONY, explicitly. Automake does it for us.
2010-03-18maint: mark makefile "dist-hook" target as PHONYJim Meyering
* src/Makefile.am (dist-hook): Mark target as PHONY.
2010-02-19maint: clean up the output from syntax-check rulesPádraig Brady
* cfg.mk (sc_tight_scope): Pass the -s (silent) flag to `make` so that it doesn't report about calling sub makes. (sc_check-AUTHORS): Likewise. (sc_strftime_check): Don't display stderr from `info`. * src/Makefile.am (sc_tight_scope): Don't annotate with "GEN". (sc_check-AUTHORS): Likewise.
2010-02-16maint: fix the man page correlation testsPádraig Brady
These checks were not being run as distcheck-hook targets are only supported in the top-level Makefile. Instead these tests are now run during a syntax-check. * cfg.mk (sc_man_file_correlation): A new syntax check to call the 2 existing tests to check the correlation between the programs and man/*.[1x]. * man/Makefile.am (sc_man_file_correlation): Call the 2 existing man page correlation tests. (check-x-vs-1): Remove the "GEN" annotation as it's a bit verbose. (check-programs-vs-x): Likewise. * src/Makefile.am (all_programs.list): Exclude libstdbuf.so from the list of programs. This issue was not noticed as the checks were not actually being run.
2010-02-15doc: fix inconsistent capitalization in --help outputPádraig Brady
* src/base64.c (usage): Don't capitalize the first character in an --option description. * src/stdbuf.c (usage): Likewise. * src/truncate.c (usage): Likewise. * cfg.mk (sc_option_desc_uppercase): A new syntax check to stop this happening in future. * man/Makefile.am (sc_option_desc_uppercase): Ensure all man pages are generated, then search for erroneous uppercase chars. * src/Makefile.am (all_programs): Ensure all commands are built so that all man pages can be generated.
2010-01-01maint: update all FSF copyright year lists to include 2010Jim Meyering
Use this command: git ls-files | grep -v COPYING \ | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \ build-aux/update-copyright
2009-12-26tac: supply link dependencyEric Blake
* src/Makefile.am (tac_LDADD): Add LIB_GETHRXTIME. * THANKS: Update. Reported by Robert Schwebel.
2009-12-01sort: fix link failure on SolarisEric Blake
Commit f9d0bb8481 made sort depend on xnanosleep. * src/Makefile.am (sort_LDADD): Add LIB_NANOSLEEP.
2009-11-06nproc: A new program to count the available processorsGiuseppe Scrivano
* AUTHORS: Add my name. * NEWS: Mention it. * README: Likewise. * bootstrap.conf (gnulib_modules): Add nproc. * doc/coreutils.texi (nproc invocation): Add nproc info. * man/Makefile.am (nproc.1): Add dependency. * man/nproc.x: New template. * man/.gitignore: Ignore generated man page. * po/POTFILES.in: Add src/nproc.c. * src/.gitignore: Exclude nproc. * src/Makefile.am (EXTRA_PROGRAMS): Add nproc. * src/nproc.c: New file. * tests/Makefile.am (TESTS): Add misc/nproc-{avail,positive}. * tests/misc/nproc-avail: New file. * tests/misc/nproc-positive: New file.
2009-10-18maint: factor out duplication in currently unused rulesJim Meyering
* src/Makefile.am (fs_normalize_perl_subst): Define. (fs-magic, fs-kernel-magic): Use it.
2009-10-10maint: touch up previous LDADD patchEric Blake
* src/Makefile.am (dir_LDADD): Delete; the ls_LDADD line covers this.
2009-10-10build: build uname(1) unconditionallyJim Meyering
Before, on a system without the uname function, the build system would detect that and not build/install a uname program. Now that gnulib guarantees a uname function, ... * configure.ac: Don't check for the uname function. * src/Makefile.am (build_if_possible__progs): Move uname... (EXTRA_PROGRAMS): ...to this list.
2009-10-10maint: list program names one per lineJim Meyering
* src/Makefile.am (EXTRA_PROGRAMS): List them one per line. (build_if_possible__progs): Likewise.
2009-10-10build: ls: fix link failure due to missing -laclJim Meyering
* src/Makefile.am (ls_LDADD): Re-add $(LIB_ACL). Inadvertently-removed by commit 78c93601.
2009-10-09maint: touch up previous LDADD patchEric Blake
* src/Makefile.am (stdbuf_LDADD): Add missing primer. (hostname_LDADD, uname_LDADD): Add GETHOSTNAME_LIB. * bootstrap.conf (gnulib_modules): Add uname.
2009-10-09maint: improve additional library trackingEric Blake
* src/Makefile.am (LDADD): Refactor, to make per-library additions to individual programs easier to maintain.
2009-10-08stat: add support for many more file system typesJim Meyering
* src/stat.c (human_fstype): Add the following FS types, from <linux/magic.h>: afs, anon-inode FS, btrfs, cgroupfs, cramfs-wend, debugfs, futexfs, inotifyfs, minux3, securityfs, selinux, xenfs. Also add "nilfs". * src/Makefile.am (fs-kernel-magic): New rule. * NEWS (Bug fixes): Mention this.
2009-10-08stat: recognize CIFS and HFS file system typesJim Meyering
* src/stat.c (human_fstype) [CIFS, HFS]: Add new file system types. Prompted by a report from Stuart Kemp. Normalize the form of a few hexadecimal magic numbers. Alphabetize on S_MAGIC_ case names. * src/Makefile.am (fs-magic-compare, fs-def, fs-magic): New rules, to automate comparison of our list with that in the Linux statfs man page. * NEWS (Bug fixes): Mention it.
2009-09-11rm: rewrite to use ftsJim Meyering
* remove.c: Don't include "unlinkdir.h"; no longer used. Do not include <setjmp.h> or "cycle-check.h". Likewise. Include "xfts.h". (dir_name, dir_len): Remove definitions. (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Likewise. (INODE_SORT_DIR_ENTRIES_THRESHOLD, NEED_REWIND, D_TYPE): Likewise. (struct dirstack_state, Dirstack_state): Likewise. (g_buf, g_n_allocated): Remove declarations. (hash_freer, hash_compare_strings, rm_malloc): Remove functions. (rm_free, push_dir, top_dir, pop_dir, right_justify): Likewise. (full_filename0, xfull_filename, full_filename_): Likewise. (AD_stack_height, AD_stack_top, AD_stack_pop, AD_stack_clear): Likewise. (obstack_init_minimal, ds_init, ds_clear, ds_free): Likewise. (AD_pop_and_chdir, AD_ensure_initialized, AD_mark_helper): Likewise. (AD_mark_as_unremovable, AD_mark_current_as_unremovable): Likewise. (AD_push_initial, AD_push, AD_push, AD_is_removable): Likewise. (write_protected_non_symlink): Change 3rd parameter from dirstack_state "ds" to full_name. (prompt): Adjust parameters. Now, state comes from FTS/FTSENT pair. Those replace fd_cwd and "ds". Remove "filename". Remove pdirent_type in favor of new "is_dir" parameter. Rename is_empty to is_empty_p. (DO_RMDIR, DO_UNLINK): Remove definitions. (remove_entry, fd_to_subdirp, compare_ino): Remove functions. (dirent_count, dirent_inode_sort_may_be_useful): Likewise. (preprocess_dir): Likewise. (fts_skip_tree, mark_ancestor_dirs, excise, rm_fts): New functions. (remove_cwd_entries, remove_dir, rm_1): Remove functions. (rm): Rewrite as a simple loop calling fts_read and dispatching each entry via rm_fts. * src/rm.c (main): Adapt to new signature of rm(). * bootstrap.conf (gnulib_modules): Remove unlinkdir, no longer used. * src/Makefile.am (sc_tight_scope): Also recognize an extern "enum" declaration. * tests/rm/empty-name: Adjust expected output to match new diagnostic. * NEWS (Improvements): Mention it.
2009-08-30build: quiet "make check" in src/Jim Meyering
* src/Makefile.am (check-duplicate-no-install): Use $(AM_V_GEN). (check-README): Likewise. And $(AM_V_at).
2009-08-19build: avoid "make dist" failure in man/Jim Meyering
Now that "make check" no longer builds programs like arch, ... * src/Makefile.am (dist-hook): Depend on $(all_programs), so that the subsequent build in man/ doesn't fail due to lack of a program like arch that is not going to be installed.
2009-08-18build: perform check-AUTHORS via syntax-check, not via "make check"Jim Meyering
* src/Makefile.am (check): Don't depend on check-AUTHORS. That check fails on systems for which a program like stdbuf is not built. Instead, move this check to "make syntax-check". (sc_check-AUTHORS): Rename rule from check-AUTHORS. * cfg.mk (sc_check-AUTHORS): New rule. Reported by Berhnard Voelker.
2009-06-17stdbuf: A new program to run a command with modified stdio bufferingPádraig Brady
* AUTHORS: Register as the author. * NEWS: Mention this change. * README: Add stdbuf command to list. * configure.ac: Only enable on ELF systems with GCC. * cfg.mk (sc_system_h_headers): Use VC_LIST_EXCEPT rather than VC_LIST, so we can add an exception, if needed. * .x-sc_system_h_headers: New file. Exempt libstdbuf.c. * Makefile.am (syntax_check_exceptions): Add .x-sc_system_h_headers. * doc/coreutils.texi (stdbuf invocation): Add stdbuf info. * man/.gitignore: Ignore generated manpage. * src/.gitignore: Ignore stdbuf and libstdbuf.so binaries. * man/Makefile.am (stdbuf.1): Add dependency. * man/stdbuf.x: New file with example usage. * po/POTFILES.in: Reference new command and shared library sources. * src/Makefile.am (build_if_possible__progs): Add stdbuf and libstdbuf, (pkglib_PROGRAMS): Reference optional shared lib, (libstdbuf_so_LDADD): Ensure we don't link with non PIC libcoreutils.a. (libstdbuf_so_LDFLAGS): Add -shared GCC option, (libstdbuf_so_CFLAGS): Add -fPIC GCC option. (check-README): Exclude libstbuf. (check-AUTHORS): ditto. (sc_tight_scope): Exclude functions starting with __. * src/libstdbuf.c: The LD_PRELOAD shared library to control buffering. * src/stdbuf.c: New file to setup env variables before execing command. * tests/Makefile.am: Reference new test file. * tests/misc/help-version: Set expected exit codes. * tests/misc/invalid-opt: ditto. * tests/misc/stdbuf: Add 9 tests.
2009-05-05tests: fix typo in check-AUTHORS ruleAndreas Schwab
* src/Makefile.am (check-AUTHORS): Set locale.
2009-05-03tests: correct the "make check"-run check-AUTHORS testJim Meyering
* src/Makefile.am (check-AUTHORS): Revert back to using en_US.UTF-8, to ease parsing (English-only) text around the list of names, even when .po files are not installed. Reported by Andreas Schwab. Along the way, use $(AM_V_GEN), not "@". (sc_tight_scope): Use $(AM_V_GEN) here, too. * gnulib: Update submodule to latest, for the proper_name_utf8 fix that makes --version output print the UTF-8 rendering of author names in more cases.
2009-04-25build: adjust use of automake's new $(AM_V_GEN) variableJim Meyering
* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, fs.h): (version.c, version.h): Use $(AM_V_GEN) only as a prefix of an existing command. Otherwise, it provokes warnings from some "make" programs. Suggestion from Ralf Wildenhues.
2009-04-25tests: fix check-AUTHORS skip logicRalf Wildenhues
* src/Makefile.am (check-AUTHORS): When this test is skipped, be sure to avoid all commands in the recipe, not just those passed to the first shell.
2009-04-24build: use automake's new $(AM_V_GEN) and $(AM_V_at) variablesJim Meyering
* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, fs.h): (version.c, version.h): Mark with $(AM_V_GEN) and $(AM_V_at), so that the latest automake prints "GEN $@" by default.
2009-04-23tests: make the check-AUTHORS test more portable, now that it's...Jim Meyering
run as part of "make check". * src/Makefile.am (check-AUTHORS): Don't depend on en_US.UTF-8. Instead, use the French UTF8 locale, if configure found one. If not found, just skip the test.
2009-04-23avoid parallel "make distcheck" failure due to two run-in-src/ rulesJim Meyering
Move the check-AUTHORS rule from "syntax-check" to "check". * maint.mk (local-checks-available): Remove check-AUTHORS. (check-AUTHORS): Remove rule. * src/Makefile.am (CLEANFILES): Add $(no_install__progs), since they too are built sometimes. (check-AUTHORS): Split a longer-than-80 sed command. (../AUTHORS): Remove obsolete rule.
2009-04-10build: tight-scope test: don't build excluded programsJim Meyering
* src/Makefile.am (sc_tight_scope): Depend on $(bin_PROGRAMS), not $(all_programs)
2009-03-27tests: fix 'make sc_tight_scope' on cygwinEric Blake
* src/Makefile.am (sc_tight_scope): Ignore leading underscores in symbols.
2009-03-11maint: remove an obsolete FIXME commentJim Meyering
* src/Makefile.am (../AUTHORS): Remove obsolete FIXME comment. There are no longer any installed *.sh programs.
2009-01-29maint: silence some syntax-check rulesJim Meyering
* cfg.mk (sc_strftime_check): Silence the rule. (sc_tight_scope): Likewise. * src/Makefile.am (check-AUTHORS): Likewise.
2009-01-29cp/mv: add xattr supportKamil Dudka
This patch was originally written by Andreas Grünbacher, nowadays available at http://www.suse.de/~agruen/coreutils/5.91/coreutils-xattr.diff * bootstrap.conf: Add gnulib module verror. * po/POTFILES.in: Add lib/verror.c. * m4/xattr.m4: Check for libattr availability, new configure option --disable-xattr. * m4/prereq.m4: Require gl_FUNC_XATTR. * src/Makefile.am: Link cp, mv and ginstall with libattr. * src/copy.h: Add preserve_xattr and require_preserve_xattr to cp_options. * src/copy.c (copy_attr_error): New function to handle errors during xattr copying. (copy_attr_quote): New function to quote file name in error messages printed by libattr. (copy_attr_free): Empty function requested by libattr to free quoted string. (copy_attr_by_fd): New fd-oriented function to copy xattr. (copy_attr_by_name): New name-oriented function to copy xattr. (copy_reg, copy_internal): Call copy_extended_attributes function. * src/cp.c (usage): Mention new --preserve=xattr option. (decode_preserve_arg): Handle new --preserve=xattr option. * src/mv.c: Always attempt to preserve xattr. * src/install.c: Never attempt to preserve xattr. * tests/misc/xattr: New test for xattr support in cp, mv and install. * tests/Makefile.am: Add the new test to list. * doc/coreutils.texi: Mention xattr support, new --preserve=xattr option. * NEWS: Mention the change.
2009-01-01portability: accommodate gnulib's getaddrinfo changeJim Meyering
* src/Makefile.am (pinky_LDADD, who_LDADD): Append $(GETADDRINFO_LIB)
2008-12-23build: do enable $(WERROR_CFLAGS) for src/ files.Jim Meyering
This reverts the more recent commit (of two) entitled "build: add configure-time --enable-gcc-warnings option; avoid warnings". Pádraig Brady spotted the contradiction between the log message and actual change. This reverts commit 292d68565a34b237cd2bf586ace545b7cd3dbfcf.
2008-12-21build: add configure-time --enable-gcc-warnings option; avoid warningsJim Meyering
* bootstrap.conf (gnulib_modules): Add "warnings" module. * configure.ac: Add --enable-gcc-warnings, derived from code in bison. * src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS) * lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS) Don't use $(WERROR_CFLAGS), yet. * src/system.h (usage): Declare. * src/base64.c (usage): Declare to be global, for consistency. * src/timeout.c (usage): Likewise. * src/truncate.c (usage): Likewise. * src/getlimits.c (usage): Likewise. * src/pinky.c (ttyname): Declare with prototype, rather than an empty argument list. * src/who.c (ttyname): Likewise. * src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
2008-12-21build: turn on $(WERROR_CFLAGS) for src/Jim Meyering
2008-12-21build: add configure-time --enable-gcc-warnings option; avoid warningsJim Meyering
* bootstrap.conf (gnulib_modules): Add "warnings" module. * configure.ac: Add --enable-gcc-warnings, derived from code in bison. * src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS) * lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS) Don't use $(WERROR_CFLAGS), yet. * src/system.h (usage): Declare. * src/base64.c (usage): Declare to be global, for consistency. * src/timeout.c (usage): Likewise. * src/truncate.c (usage): Likewise. * src/getlimits.c (usage): Likewise. * src/pinky.c (ttyname): Declare with prototype, rather than an empty argument list. * src/who.c (ttyname): Likewise. * src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
2008-11-21getlimits: A new utility for use in coreutils' testsPádraig Brady
* src/getlimits.c: A utility to print platform dependent limits in a format suitable for use in shell scripts. * src/Makefile.am: Add getlimits to list of utilities to build but not install. Also add it to the list linked with libiconv * po/POTFILES.in: Add getlimits to translation list.
2008-10-12tests: move check-misc targets from src/Makefile.am to maint.mkJim Meyering
* src/Makefile.am (check): Remove check-misc. (check-misc): Remove target. * maint.mk (sc_prohibit_stat_st_blocks): New target. (sc_prohibit_S_IS_definition): New target. * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_stat_st_blocks. * .x-sc_prohibit_stat_st_blocks: New file. Andreas Schwab reported that "make check" could fail to detect violation of the no-S_IS*-definition policy.
2008-09-22fix installation with ./ginstall in srcRalf Wildenhues
* src/Makefile.am (cu_install_program): New variable, set to either ./ginstall or @INSTALL_PROGRAM@ (for cross compilation). (INSTALL_PROGRAM): Override AC_SUBST unconditionally, to avoid warning, and wrong initialization order.
2008-09-14various VPATH-related fixesRalf Wildenhues
* maint.mk (VC_LIST): Prepend '$(srcdir)/'. (patch-check): Fix to make it work with a VPATH build. * src/Makefile.am (sc_tight_scope): Likewise. * man/Makefile.am (.x.1): Do not make outputs unwritable.
2008-09-10simplify installation rules, using new AutomakeRalf Wildenhues
This relies on development Automake to provide multi-file installation, and avoids relying on undocumented Automake interfaces. It also removes special-casing for `['. * configure.ac (AM_INIT_AUTOMAKE): Depend on 1.10a. (CROSS_COMPILING): New Automake conditional. * src/Makefile.am (install-exec-am, filtered_PROGS) (d_bindir, cu-install-binPROGRAMS): Remove. (INSTALL_PROGRAM) [!CROSS_COMPILING]: Set to `./ginstall'.
2008-08-26generate version.c and version.hJim Meyering
* src/Makefile.am (version.c, version.h): New rules. Generate. (nodist_libver_a_SOURCES): Define * .gitignore: Add src/version.c and src/version.h. (DISTCLEANFILES): Add version.c and version.h.
2008-08-26use new global, "Version", rather than macro, VERSIONJim Meyering
With this change, a version-string update no longer forces recompilation of 100+ src/*.o files. * src/version.c (Version): New global. New file. * src/version.h: Declare it. * src/Makefile.am: Put it in a library that everyone links to. (noinst_LIBRARIES, libver_a_SOURCES): Define. (LDADD): Add libver.a. (sc_tight_scope): Use perl (was sed), and a more relaxed regexp to build the global-variable-name-recognizing regexp list. * src/system.h: Include "version.h". (case_GETOPT_VERSION_CHAR): Use Version rather than VERSION. * src/basename.c (main): Use Version rather than VERSION. * src/chroot.c (main): Likewise. * src/cksum.c (main): Likewise. * src/dd.c (main): Likewise. * src/dirname.c (main): Likewise. * src/echo.c (main): Likewise. * src/hostid.c (main): Likewise. * src/hostname.c (main): Likewise. * src/link.c (main): Likewise. * src/logname.c (main): Likewise. * src/nice.c (main): Likewise. * src/nohup.c (main): Likewise. * src/printenv.c (main): Likewise. * src/printf.c (main): Likewise. * src/pwd.c (main): Likewise. * src/setuidgid.c (main): Likewise. * src/sleep.c (main): Likewise. * src/sync.c (main): Likewise. * src/test.c (main): Likewise. * src/timeout.c (main): Likewise. * src/true.c (main): Likewise. * src/tsort.c (main): Likewise. * src/unlink.c (main): Likewise. * src/uptime.c (main): Likewise. * src/users.c (main): Likewise. * src/whoami.c (main): Likewise. * src/yes.c (main): Likewise.