Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Make (software)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Use== In general, based on a makefile, Make updates target files from source files if any source file has a newer [[timestamp]] than the target file or the target file does not exist. For example, this could include compiling [[C (programming language)|C]] files ({{Code|*.c}}) into [[object file]]s, then linking the object files into an executable program. Or this could include compiling [[TypeScript]] files ({{Code|*.ts}}) to [[JavaScript]] for use in a browser. Other examples include: convert a source image file to another format, copy a file to a content management system, and send e-mail about build status. A makefile defines targets where each is either a file to generate or is a user-defined concept, called a ''phony'' target. Make updates the targets passed as arguments: <syntaxhighlight lang="bash"> make [-f makefile] [options] [targets] </syntaxhighlight> If no target is specified, Make updates the first target in the makefile which is often a phony target to perform the most commonly used action. Make skips build actions if the target file timestamp is after that of the source files.<ref>[http://alvinalexander.com/linux/unix-linux-ls-command-file-sort-sorting How to sort Linux ls command file output] {{webarchive |url=https://web.archive.org/web/20160913020855/http://alvinalexander.com/linux/unix-linux-ls-command-file-sort-sorting |date=September 13, 2016 }}</ref> Doing so optimizes the build process by skipping actions when the target file is up-to-date, but sometimes updates are skipped erroneously due to file timestamp issues including restoring an older version of a source file, or when a [[Network File System|network filesystem]] is a source of files and its clock or time zone is not synchronized with the machine running Make. Also, if a source file's timestamp is in the future, make repeatedly triggers unnecessary actions, causing longer build time. When Make starts, it uses the makefile specified on the command-line or if not specified, then uses the one found by via specific search rules. Generally, Make defaults to using the file in the [[working directory]] named {{mono|Makefile}}. GNU Make searches for the first file matching: {{mono|GNUmakefile}}, {{mono|makefile}}, or {{mono|Makefile}}. Make processes the options of the command-line based on the loaded makefile.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Make (software)
(section)
Add topic