REMAKE(1)
π REMAKE(1) β the group chat edition π
okay bestie, welcome to the User Commands section, this is remake, the GNU make utility for maintaining groups of programs, and I am SO ready to tell you about it π«Ά
β¨ NAME β¨
remake β GNU make utility to maintain groups of programs πΈ
π SYNOPSIS π
remake [OPTION]... [TARGET]...
π DESCRIPTION π
okay so. The remake utility will determine automatically which pieces of a large program need to be recompiled, and then it issues the commands to recompile them. Iconic behavior, honestly. π
The manual describes the GNU implementation of make from which remake is derived, which was written by Richard Stallman and Roland McGrath, and is currently maintained by Paul Smith. The extended error reporting, debugger, and profiling extensions were written by Rocky Bernstein. π§
Our examples show C programs, since they are very common, but you can use remake with any programming language whose compiler can be run with a shell command. And fr fr β remake or make are not limited to programs. You can use it to describe any task where some files must be updated automatically from others whenever the others change. It's giving "universal build tool" energy and we're obsessed. β¨
To prepare to use remake, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file. In a program, typically the executable file is updated from object files, which are in turn made by compiling source files. No cap. π¦
Once a suitable makefile exists, each time you change some source files, this simple shell command:
remake
suffices to perform all necessary recompilations. Like, that's it. That's the whole thing. π
The remake program uses the makefile description and the last-modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the makefile.
remake executes commands in the makefile to update one or more target names, where name is typically a program. If no -f option is present, remake will look for the makefiles GNUmakefile, makefile, and Makefile, in that order. π
Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the beginning of a directory listing, right near other important files such as README.) The first name checked, GNUmakefile, is not recommended for most makefiles. You should use this name if you have a makefile that is specific to GNU remake, and will not be understood by other versions of remake. If makefile is -, the standard input is read. π
remake updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist. Simple as that, bestie. π
πΈ OPTIONS πΈ
Below we give options that are specific to remake. For the other options, please refer to the GNU Make documentation. (yes, go read it, I'll wait π
)
-c,--search-parentβ if a Makefile or goal target isn't found in the current directory,remakewill search in the parent directory for a Makefile. On finding a parent β the closest parent directory with a Makefile βremakewill set its current working directory to the directory where the Makefile was found.
In this respect the short option -c, is like -C except no directory need to be specified. cute right?? π₯°
-!,--post-mortemβ Go into the debugger on an error. This is the Same as options:--debugger --debugger-stop=error. it's giving "autopsy but make it software" π-P,--profile [=TYPE]β Enables timing and dependency profiling output using the specified TYPE for formatting. TYPE can be eithercallgrindorjson. If omitted, it defaults tocallgrind. Files generated usingcallgrindcan be analyzed withkcachegrind,callgrind_annotate, orgprof2dot. Files generated withjsonhave the format specified in the info manual. π--profile-directory=[PATH]β Specifies the PATH that profiling files should be written to. Must exist before running make. It is assumed to be a relative path to the initial directory wheremakeis called, unless it begins with a~or/. β οΈ (yes bestie, it must exist, I said what I said)--targetsβ Print a list of explicitly-named targets found in read-in makefiles. π―--tasksβ Print a list of explicitly-named targets found in read-in makefiles which have description comments. A description comment is added by putting a single comment before the target that starts with'#:'. π-x,--trace [=FLAGS]β Set trace flags. If the FLAGS are omitted, then the behavior is the same as if--trace=normalwas specified. FLAGS may bereadfor tracing Makefiles read in,noshellwhich is likenormalbut shell tracing is disabled, orfullfor maximum tracing. π-X,--debugger [=TYPE]β Enter debugger with. If the TYPE are omitted, then the behavior is the same as if--debugger=normalwas specified. TYPE may begoalfor all tracing Makefiles readprereadwhich stop before any Makefiles are readgoalwhich stops after the goal target is builtnormalwhich is the same as given no optionpreactionwhich is likenormalbut shell tracing is disabledfullfor maximum tracing. It is the same as giving all of the options except"normal".fatalfor entering the debugger on a fatal error,errorfor entering the debugger on an error. π (yes the list is a little chaotic, I just work here, I'm telling you exactly what it says β)
π¦ SEE ALSO π¦
The full documentation for remake is maintained as a Texinfo manual. If the info and remake programs are properly installed at your site, the command
info remake
should give you access to the remake manual. go read it bestie, it's free β¨
π BUGS π
Since this is derived from GNU Make, it most of its bugs. π
See the chapter ``Problems and Bugs'' in The GNU Make Manual.
For remake -specifc bugs see https://github.com/rocky/remake/issues/. (yes, go file them, they want to know π)
π AUTHORS π
The GNU make from which remake is derived, was written by Richard Stallman and Roland McGrath, and is currently maintained by Paul Smith.
However remake is the brainstorm of Rocky Bernstein. The help of others though has been, and is, greatly appreciated. Michael Lord Welles however thought of the name, remake. π (naming rights legend, honestly)
π COPYRIGHT π
Copyright Β© 1992-1993, 1996-2020 Free Software Foundation, Inc. This file is part of GNU make.
GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
and that's the whole page bestie!! ππ This one's from GNU, dated 5 June 2020, filed under REMAKE(1) β k bye, go build something gorgeous π«Άβ¨π
π¦ where this page comes from
- arch rolling: remake 4.3+dbg1.6-3 Β· GPL3
- debian bookworm: remake 4.3+dbg-1.6+dfsg-1 Β· GPL-3.0-or-later
- debian trixie: remake 4.3+dbg-1.6+dfsg-2 Β· GPL-3.0-or-later
- nixos 26.05: remake 4.3+dbg-1.6
- nixpkgs unstable: remake 4.3+dbg-1.6
- ubuntu noble: remake 4.3+dbg-1.6+dfsg-1build2 Β· GPL-3.0-or-later
- ubuntu questing: remake 4.3+dbg-1.6+dfsg-3
- ubuntu resolute: remake 4.3+dbg-1.6+dfsg-5 Β· GPL-3.0-or-later
- ubuntu stonking: remake 4.3+dbg-1.6+dfsg-5 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms