LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

m4

macro processor

TLDR

Process file
$ m4 [input.m4]
copy
Output to file
$ m4 [input.m4] > [output.txt]
copy
Define macro
$ m4 -D [NAME=value] [input.m4]
copy
Include directory
$ m4 -I [/path/to/includes] [input.m4]
copy
Prefix builtins
$ m4 -P [input.m4]
copy
Debug output
$ m4 -d [input.m4]
copy

SYNOPSIS

m4 [options] [files]

DESCRIPTION

m4 is a macro processor. It expands macros in text files to generate output.The tool is used to preprocess configuration files and source code. It's part of autoconf.

PARAMETERS

FILES

Input files to process.
-D NAME=VALUE
Define macro.
-U NAME
Undefine macro.
-I DIR
Add include path.
-P
Prefix builtins with m4_.
-d
Enable debug output.
--help
Display help information.

INSTALL

sudo apt install m4
copy
sudo dnf install m4
copy
sudo pacman -S m4
copy
sudo apk add m4
copy
sudo zypper install m4
copy
brew install m4
copy
nix profile install nixpkgs#m4
copy

CAVEATS

POSIX standard. Quoting rules can be tricky. Used by autoconf extensively.

HISTORY

m4 was developed at Bell Labs in the 1970s. The GNU version extends the original POSIX specification.

SEE ALSO

autoconf(1), make(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid