aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* bin/sh: Fix the buildLexi Winter2025-09-301-0/+2
| | | | | | | Removing <bsd.prog.mk> was unintentional; put it back. Fixes: d31e342bcc8e ("sh: Remove /.profile") MFC after: 1 day
* sh: Remove /.profileLexi Winter2025-09-301-9/+0
| | | | | | | | | | | | | root's home directory was moved to /root many years ago, so there's no reason to keep this old link. This brings sh in line with csh, where /.cshrc was removed in dcb65c5a94d4. Relnotes: yes Approved by: re (cperciva) MFC after: 1 day PR: 289097 Reviewed by: cperciva, jilles, bapt, emaste Differential Revision: https://reviews.freebsd.org/D52161
* sh: Fix non-NO_ROOT installconfigLexi Winter2025-09-021-1/+1
| | | | | | | | | When building without NO_ROOT, ${TAG_ARGS} is not set, which means we pass ",config" as an install(1) argument. Only add the config tag if ${TAG_ARGS} is defined to begin with. Fixes: aa730a66bc74 ("sh: Add config tag to /.profile") Reported by: bz
* sh: Add config tag to /.profileLexi Winter2025-09-021-1/+1
| | | | | | | | | | | | | | | The file /.profile is installed as a hard link to /root/.profile. The file in /root has the config tag, but the file in / does not, which causes it to be overwritten by pkg upgrade. Since they're linked, this also overwrites the file in /root. Add the config tag to the file in / as well, so pkg treates both links as config files and won't overwrite them. PR: 289097 MFC after: 3 days Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D52162
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* bin: Remove ancient SCCS tags.Warner Losh2023-11-271-1/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Fix /root permissions after 'make installworld'Thomas Eberhardt2023-11-161-0/+1
| | | | | | | | | | | | | | | | | According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Separate dependencies on tools built for host.Simon J. Gerraty2023-06-301-3/+6
| | | | | | | | | When generated files depend on tools that need to be built for host, we need to carefully separate them for the DIRDEPS_BUILD so we only build them once. Reviewed by: stevek Sponsored by: Juniper Networks, Inc.
* Fix building host tools for hostSimon J. Gerraty2023-04-201-2/+5
| | | | | | | | | | | | | | | Several makefile depend on tools built for host. At least when using DIRDEPS_BUILD we can build these for the pseudo machine "host" to facilitate building on older host versions. Ideally we would build these tools in their own directories to avoid building more than needed. For now, setting an appropriate default for BTOOLSPATH will suffice Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39708
* sh: install hard link with same mode as targetEd Maste2022-11-231-0/+1
| | | | | | | | | | Previously when using NO_ROOT we recorded a METALOG entry for the /.profile hard link with a different mode than the link target, which is not permitted. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37476
* Bump WARNS for sh(1).Edward Tomasz Napierala2020-04-011-2/+0
| | | | | | | | | | Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24181 Notes: svn path=/head/; revision=359511
* Fix .depend files to work for build tools.Bryan Drewery2019-06-151-0/+1
| | | | | | | | | | This is somewhat of a follow-up to r335746. MFC after: 2 weeks Sponsored by: DellEMC Notes: svn path=/head/; revision=349062
* Install .shrc for root, and set PS1 for the toor account.Edward Tomasz Napierala2019-01-241-3/+6
| | | | | | | | | | Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18872 Notes: svn path=/head/; revision=343416
* Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/.Brad Davis2018-08-291-1/+9
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16770 Notes: svn path=/head/; revision=338374
* Revert parts of r337849 and r337857Brad Davis2018-08-151-9/+1
| | | | | | | | | | | | This fixes the build and I will redo these changes as part of a future review that organizes them differently. The way I tried to do it here could be done better. Sorry for the noise. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16737 Notes: svn path=/head/; revision=337882
* Fix build after r337849Brad Davis2018-08-151-1/+3
| | | | | | | | | | | | This moves the symlink creation to after where the files are installed. This also inverts the shell change so that it only happens if MK_TCSH is on. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16725 Notes: svn path=/head/; revision=337857
* Move all sh and csh files into bin/sh/ or bin/csh/Brad Davis2018-08-151-0/+7
| | | | | | | | | | | This simplifies pkgbase by migrating these to CONFS so they are properly tagged as config files. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16708 Notes: svn path=/head/; revision=337849
* Stop building intermediate .o files.Bryan Drewery2018-06-271-9/+2
| | | | | | | | | | | | These are not used to link the final tool anymore. At some point in the past the suffix rules changed to not link these in. The original reason for this in r19176 is unclear but seems to be related to mkdep. The .depend handling is still broken here as it is for all build tool patterns like this. Sponsored by: Dell EMC Notes: svn path=/head/; revision=335746
* MFhead@r321912Enji Cooper2017-08-021-1/+1
|\ | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321913
| * Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* | Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiomEnji Cooper2017-08-021-3/+2
|/ | | | Notes: svn path=/projects/make-check-sandbox/; revision=321911
* bin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-3/+3
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314655
* WITH_META_MODE: Don't expect meta files for side-effect generated files.Bryan Drewery2016-06-031-0/+3
| | | | | | | | | | | | The first file in these lists will generate everything else so only it should be getting a .meta file. With bmake's missing=yes meta feature these would otherwise cause a rebuild without the .NOMETA hint. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301285
* DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.Bryan Drewery2016-05-091-2/+2
| | | | | | | | | This avoids running target binaries. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299289
* MFHGlen Barber2016-04-161-3/+3
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * META_MODE: Don't rebuild build-tools targets during normal build.Bryan Drewery2016-04-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297997
* | Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
|/ | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Convert bin/ to LIBADD, reduce overlinking allow to build all components asBaptiste Daroussin2014-11-251-2/+1
| | | | | | | static Notes: svn path=/head/; revision=275028
* Replace all uses of libncurses and libtermcap with their wide characterBrooks Davis2014-07-171-2/+2
| | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=268804
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* Migrate tools/regression/bin/ tests to the new layout.Julio Merino2013-12-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Notes: svn path=/head/; revision=259210
* sh: Remove mkinit.Jilles Tjoelker2013-07-251-8/+3
| | | | | | | | | | | | | | | | | Replace the RESET blocks with regular functions and a reset() function that calls them all. This code generation tool is unusual and does not appear to provide much benefit. I do not think isolating the knowledge about which modules need to be reset is worth an almost 500-line build tool and wider scope for variables used by the reset functions. Also, relying on reset functions is often wrong: the cleanup should be done in exception handlers so that no stale state remains after 'command eval' and the like. Notes: svn path=/head/; revision=253650
* Work better with how make/bmake works:Marcel Moolenaar2012-05-241-1/+1
| | | | | | | | | | | | | | | 1. Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to. 2. Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to get sources from (= ${.CURDIR}). This to compensate for point 1. This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to expand to "." after changing cwd, not taking into account that the target is pretty much undoing that and not getting the full path to the object tree anymore. Notes: svn path=/head/; revision=235927
* sh: Import arithmetic expression code from dash.Jilles Tjoelker2011-02-081-5/+5
| | | | | | | | | | | | | | | | | | | New features: * proper lazy evaluation of || and && * ?: ternary operator * executable is considerably smaller (8K on i386) because lex and yacc are no longer used Differences from dash: * arith_t instead of intmax_t * imaxdiv() not used * unset or null variables default to 0 * let/exp builtin (undocumented, will probably be removed later) Obtained from: dash Notes: svn path=/head/; revision=218466
* sh: Add kill builtin.Jilles Tjoelker2010-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | This allows specifying a %job (which is equivalent to the corresponding process group). Additionally, it improves reliability of kill from sh in high-load situations and ensures "kill" finds the correct utility regardless of PATH, as required by POSIX (unless the undocumented %builtin mechanism is used). Side effect: fatal errors (any error other than kill(2) failure) now return exit status 2 instead of 1. (This is consistent with other sh builtins, but not in NetBSD.) Code size increases about 1K on i386. Obtained from: NetBSD Notes: svn path=/head/; revision=216629
* sh: Add printf builtin.Jilles Tjoelker2010-11-191-2/+3
| | | | | | | | | | | | | | | | | | | | This was removed in 2001 but I think it is appropriate to add it back: * I do not want to encourage people to write fragile and non-portable echo commands by making printf much slower than echo. * Recent versions of Autoconf use it a lot. * Almost no software still wants to support systems that do not have printf(1) at all. * In many other shells printf is already a builtin. Side effect: printf is now always the builtin version (which behaves identically to /usr/bin/printf) and cannot be overridden via PATH (except via the undocumented %builtin mechanism). Code size increases about 5K on i386. Embedded folks might want to replace /usr/bin/printf with a hard link to /usr/bin/alias. Notes: svn path=/head/; revision=215520
* We only need to look as far as '..' to find 'test/'.David E. O'Brien2010-10-131-1/+1
| | | | Notes: svn path=/head/; revision=213815
* In the spirit of r90111, depend on c89 and remove the "STATIC" macroDavid E. O'Brien2010-10-131-1/+1
| | | | | | | and its usage. Notes: svn path=/head/; revision=213811
* If one wishes to set breakpoints of static the functions here, theyDavid E. O'Brien2010-10-131-1/+1
| | | | | | | | | cannot be inlined. Submitted by: jhb Notes: svn path=/head/; revision=213798
* Suggest that DEBUG_FLAGS be used to enable extra debugging rather thanJohn Baldwin2010-10-131-1/+1
| | | | | | | | | | frobbing CFLAGS directly. DEBUG_FLAGS is something that can be specified on the make command line without having to edit the Makefile directly. Submitted by: Garrett Cooper Notes: svn path=/head/; revision=213774
* If DEBUG is 3 or greater, disable STATICization of functions.David E. O'Brien2010-10-121-1/+1
| | | | | | | Also correct the documented location of the trace file. Notes: svn path=/head/; revision=213744
* Allow one to regression test 'sh' changes without having to installDavid E. O'Brien2010-10-121-0/+3
| | | | | | | a potentially bad /bin/sh first. Notes: svn path=/head/; revision=213738
* Reduce the WARNS level to avoid a compiler warning about a variableJohn Birrell2007-11-181-1/+1
| | | | | | | possibly being clobbered by a longjmp or a fork with gcc4. Notes: svn path=/head/; revision=173718
* Whitespace nits.Jens Schweikhardt2006-04-171-1/+1
| | | | Notes: svn path=/head/; revision=157811
* Recent cleanups made it possible to bump WARNS to 3.Stefan Farfeleder2005-08-141-1/+1
| | | | Notes: svn path=/head/; revision=149046
* Install /bin/sh safely. This allows a shell script to be usedRuslan Ermilov2004-03-181-0/+1
| | | | | | | | | | to strip binaries by specifying it in the STRIPBIN environment variable honoured by install(1). MFC after: 3 days Notes: svn path=/head/; revision=127167
* style.Makefile:Johan Karlsson2004-02-231-1/+1
| | | | | | | Use WARNS?= instead of WARNS= Notes: svn path=/head/; revision=126173
* Fixed style of DPADD and LDADD assignments as per style.Makefile(5).Ruslan Ermilov2004-02-051-2/+2
| | | | Notes: svn path=/head/; revision=125503
* Removed duplicate y.tab.h from SRCS and CLEANFILES.Ruslan Ermilov2004-01-201-1/+1
| | | | Notes: svn path=/head/; revision=124751