{"id":21970666,"url":"https://github.com/sirwumpus/ioccc-am","last_synced_at":"2025-08-02T08:08:25.201Z","repository":{"id":98631424,"uuid":"90918306","full_name":"SirWumpus/ioccc-am","owner":"SirWumpus","description":"Best Utility (make) - IOCCC 1992 Winner","archived":false,"fork":false,"pushed_at":"2024-07-05T19:30:09.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T21:17:24.427Z","etag":null,"topics":["build-tool","c","ioccc","make","posix"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SirWumpus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-10T23:53:11.000Z","updated_at":"2024-07-05T19:30:13.000Z","dependencies_parsed_at":"2024-07-05T21:28:15.799Z","dependency_job_id":null,"html_url":"https://github.com/SirWumpus/ioccc-am","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SirWumpus/ioccc-am","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirWumpus%2Fioccc-am","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirWumpus%2Fioccc-am/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirWumpus%2Fioccc-am/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirWumpus%2Fioccc-am/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SirWumpus","download_url":"https://codeload.github.com/SirWumpus/ioccc-am/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirWumpus%2Fioccc-am/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268351461,"owners_count":24236411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","c","ioccc","make","posix"],"created_at":"2024-11-29T14:41:41.025Z","updated_at":"2025-08-02T08:08:25.173Z","avatar_url":"https://github.com/SirWumpus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"am - Anthony's Make\n===================\n\n\n## SYNOPSIS\n\n\tam makefile [target]\n\n\n## DESCRIPTION\n\n**am** is a programmer's tool to maintain, update, and regenerate groups\nof files and/or programs.  It is similar to **make** as described by the\nPOSIX.2 draft standard 11.2, and this document parallels the draft in\norder to point out the subtle differences between **am** and **make**.\n\nThe **am** utility can be used as part of software development to update\nfiles that are derived from other files.  A typical case is one where\nobject files are derived from the corresponding source files.  The\n**am** utility examines time relationships and updates those derived\nfiles (targets) that have modified times earlier than the modified times\nof the files (prerequisites) from which they are derived.  A description\nfile (\"makefile\") contains a description of the relationships between\nfiles, and the commands that must be executed to update the targets to\nreflect changes in their prerequisites.  Each specification, or rule,\nshall consist of a target, optional prerequisites, and optional commands\nto be executed when a prerequisite is newer than the target.\n\n\n## OPTIONS\n\nNone.\n\n\n## OPERANDS\n\n`makefile`\tThis required argument, is a pathname of a description\n\t\tfile, which is also referred to as the \"makfile\".  A\n\t\tpathname of \"-\", shall *NOT* denote the standard input.\n\n`target`\tThis optional argument, is the first target to be \n\t\tprocessed.  If no target is specified, when **am** is\n\t\tprocessing the makefile, the first target that **am**\n\t\tencounters shall be used.\n\n\n## EXTERNAL INFLUENCES\n\n### STANDARD INPUT\n\nNot used.\n\n\n### INPUT FILES\n\nThe input file, otherwise known as the makefile, is a text file\ncontaining rules, macro definitions, and comments.\n\n\n### ASYNCHRONOUS EVENTS\n\nAll traps are left to their default actions.  If **am** receives a\n`SIGHUP`, `SIGTERM`, `SIGINT`, or `SIGQUIT` then **am** will terminate\nas per request *WITHOUT* removing the current target.\n\n\n## EXTERNAL EFFECTS\n\n### STANDARD OUTPUT\n\nThe **am** utility shall write all commands to be executed to standard\noutput unless the command is prefixed with an at-sign `(@)`.  If **am**\nis invoked without any work needing to be done, it shall *NOT* write a\nmessage to standard output indicating that no action was taken.\n\n\n### STANDARD ERROR\n\nStandard error is used for diagnostic messages only.\n\n\n### OUTPUT FILES\n\nNone.  However, the utilities invoked by **am** may create additional\nfiles.\n\n\n## EXTENDED DESCRIPTION\n\nThe **am** utility attempts to perform the actions required to ensure\nthat the specified target(s) are up-to-date.  A target is considered\nout-of-date if it is older than any of its prerequisites or it does not\nexist.  The **am** utility shall treat all prerequisites as targets\nthemselves and recursively ensure that they are up-to-date, processing\nthem in the order which they appear in the rule.  The **am** utility\nshall use the modification times of files to determine if the\ncorresponding targets are out-of-date.\n\nAfter **am** has ensured that all of the prerequisites of a target are\nup-to-date, and if the target is out-of-date, the commands associated\nwith the target entry shall be executed.  If there are no commands\nlisted for the target, the target shall be treated as up-to-date.\n\n\n## MAKEFILE SYNTAX\n\nA makefile can contain rules, macro definitions, and comments.  If a\nmacro is defined more than once, the value of the macro shall be the\nlast one specified.  Comments start with a number-sign `(#)` and\ncontinue until an unescaped `\u003cnewline\u003e` is reached.\n\nA backslash before a `\u003cnewline\u003e` serves as a line continuation mark, and\nis used to create long-lines.   A line will continue to be extended\nuntil an unescaped `\u003cnewline\u003e` is reached.\n\nWhen an escaped `\u003cnewline\u003e` (one preceded by a backslash) is found\nanywhere in the makefile, it shall be replaced, along with any leading\nwhite space on the following line, with a single \u003cspace\u003e.\n\n\n## MAKEFILE EXECUTION\n\nCommand lines shall be processed one at a time by writing the command\nline to standard output, unless prefixed with an at-sign `(@)`, and\nexecuting the command(s) in the line.  Commands shall be executed by\npassing the command line to the command interpreter via the system()\nfunction.\n\nThe environment for the command being executed shall contain all of the\nvariables in the environment of **am**.  All macros are considered to be\npart of the environment too.\n\nBy default, when **am** receives a non-zero status from the execution of\na command, it terminates with an error message to standard error.  If\nthe command is prefixed by a hyphen `(-)` then any error found while\nexecuting the command shall be ignored.\n\nCommand lines can have one or more of the following prefixes: a hyphen\n`(-)` to ignore errors, an at-sign `(@)` to be silent, or a plus-sign\n`(+)` if the command is always executed (this prefix is for\ncompatibility with **make** and is ignored).\n\n\n## TARGET RULES\n\nTarget rules are formatted as follows:\n\n\ttarget [target ...] : [prerequisite ...]\n\t[\u003ctab\u003ecommand\n\t \u003ctab\u003ecommand\n\t ...]\n\n\t(line that does not begin with \u003ctab\u003e)\n\nTarget entries are specified by a \u003cblank\u003e-separated, non-null list of\ntargets, then a colon, then a `\u003cblank\u003e`-separated, possibly empty list\nof prerequisites.  All following lines, if any, that begin with a\n`\u003ctab\u003e`, are command lines to be executed to update the target(s).  The\nfirst line that does not begin with a `\u003ctab\u003e` shall begin a new entry.\n\nTarget names can be any character supported by the host system,\nexcluding `\u003cblank\u003es`, `\u003ctab\u003es`, `\u003cnewline\u003e`s, and colons `(:)`, which\nare used for delimiters.\n\nFor any given target there can be only one target rule.  The first\noccurrence of a target in a makefile shall be used.  All subsequent\nrules for the same target are ignored.  There is *no* support for adding\nprerequisites to a target's prerequisite list once a target rule is\ndefined.\n\nThere are no special targets or inference rule support.\n\n\n## MACROS\n\nMacro definitions are in the form:\n\n\tstring1 = [string2]\n\nThe macro named string1 is defined as having the value of string2, where\nstring2 is defined as all characters, if any, after the equal sign up to\nan unescaped `\u003cnewline\u003e`.  Any `\u003cblank\u003es` immediately before or after\nthe equal sign shall be ignored.\n\nSubsequent appearances of $(string1) shall be replaced by string2. The\nparentheses are *NOT* optional if string1 is a single character. The\nmacro `$$` shall be replaced by the single character `$`.\n\nMacro names can be any character that the host system would allow in the\ndefinition of environment variables, excluding parentheses, `(` and `)`,\nwhich are used for delimiters.\n\nMacros can appear anywhere in the makefile, except within other macro\nreferences (ie. no nesting).  Macros in target and command lines shall\nbe evaluated when the line is read.  Macros in macro definition lines\nshall be evaluated *IMMEDIATELY*.  A macro that has not been defined\nshall evaluate to a null string without causing any error condition.\n\nIf a macro is defined more than once, the value of the macro shall be\nthe last one specified prior to it being referenced.\n\nMacro assignments shall be accepted from the sources listed below, in\nthe order shown.  If a macro name already exists at the time it is being\nprocessed, the newer definition shall replace the existing definition.\n\n   1)\tThe contents of the environment, including the variables with\n\tnull values in the order defined in the environment.\n\n   2)\tMacros defined in the makefile, processed in the order specified.\n\nThere are no internal macros supported.  The SHELL macro shall *NOT* be\ntreated specially.\n\n\n## EXIT STATUS\n\n- 0\tSuccessful completion.\n- 1\tGeneral error.\n- 2\tUsage error.\n- 3\tFailed to open makefile.\n- 4\tFailed to allocate memory.\n\n\n## INSTALLATION\n\n**am** can be built on any system providing at least K\u0026R C.  It has been \ntested on \n\n*  SunOS with GCC\n*  ATARI Mega ST with Sozobon C\n*  PC clone with Turbo C\n*  Interactive UNIX System V/386 release 3.2\n\nFor all machines, the compile command line should be\n\n\tcc -O -o am am.c\n\nThe value RULES represents the number of slots available to record\ntarget rules, dependencies, and commands.  The default value chosen\nshould handle most project makefiles.  RULES can be overridden on the\ncommand line with -DRULES=nn, where 0 \u003c nn \u003c INT_MAX.\n\nOn a DOS machine using Turbo C, it may be necessary to add the include\ndirective\n\n\t#include \u003ctime.h\u003e\n\nwith the rest of the includes if sys/stat.h does not properly define or\nuse time_t.  Also, on some older K\u0026R C compilers, stdlib.h may not be \ndefined and so it might be necessary to remove the include directive for \nit. \n\n\n## REFERENCES\n\n* Webb Miller, \"A Software Tools Sampler\", Prentice Hall, 87\n  ISBN 0-13-822305-X, chapter 2\n\n* POSIX.2 draft 11.2 **make**\n\n\n## BUGS\n\nUnknown as of 20 March 1992.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirwumpus%2Fioccc-am","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirwumpus%2Fioccc-am","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirwumpus%2Fioccc-am/lists"}