GYP(1)
π GYP β the manual page, but make it a group chat π
okay bestie, sit down, hydrate, because we're talking about gyp β the cross-platform makefile generator for Chromium. yes THAT one. the build-file whisperer. the one that turns your cute little .gyp files into actual build scripts your computer can understand. she's giving β¨ project-file factory β¨ and we're obsessed.
πΈ SYNOPSIS πΈ
gyp [options] [build_file...]
that's it. that's the whole vibe. options, then optionally some build files. slay.
π¦ DESCRIPTION π¦
so what does she actually DO? she takes the build files you hand her and generates build scripts or project files in whatever format your current platform speaks natively. that's the whole job. iconic behavior.
and if you're like "bestie I'm not specifying any build files"? no worries. she just grabs every file in the current directory with a .gyp suffix and uses those. she's self-sufficient like that. main character energy fr fr π
β¨ OPTIONS β¨
okay here's the full menu, no skips, no skims, we're listing EVERYTHING because we don't gatekeep:
-D<variable>=<value>β hands a default value to the variable you name. it's a supplement to whatever's already chillin' in theGYP_DEFINESenvironment variable, which btw should be a space-separated list of<variable>=<value>pairs. teamwork makes the dream work π«Ά-f<format>[(,<format>)...],--format=<format>[(,<format>)...]β generate output in the format(s) you list. valid formats includemake(GNU makefile),xcode(Xcode project file),msvs(Visual Studio project file),scons(SCons rule set), andgypd(gyp input, for debugging β yes, gyp's debug outfit is justβ¦ itself). and you can stack multiple formats with commas, go off.
defaults to whatever's in the GYP_GENERATORS environment variable (comma-separated list of formats, bestie), or the platform's native format if that's unset: xcode for Mac OS X, msvs for Windows (including Cygwin), and make for other Unix. she knows her audience π
-I<path>,--include=<path>β implicitly smooshes the contents of the<path>file into ALL loaded.gypfiles. like a group project where everyone gets the same handout. no one's left out. π--depth=<path>β okay so for Chromium specifically, the gyp "depth" variable is supposed to always be a relative path to Chromium's top-levelsrcdirectory. this option lets you specify a path that theDEPTHvariable gets set relative to.
defaults to the first directory named src that's found as an ancestor of one of the build files you passed on the command line. she goes looking for her roots. respect. π±
-d<debug mode>,--debug=<debug mode>β turns on debugging output. valid debug modes are"general"(lists the options used),"variables"(traces variable expansion), and"includes"(traces build file include directives). it's giving detective era π-S<suffix>,--suffix=<suffix>β sticks your chosen string into the names of generated files, right before the standard extension. for example: with the make backend and a suffix of.foo, gyp writes the main makefile toMakefile.fooand target-specific snippets totarget.foo.mk. customized. personalized. her little signature π-G<flag>=<value>β sets a "generator flag," which is an option specific to a particular output format. all generator flags have names beginning with the name of the output format. this supplements theGYP_GENERATOR_FLAGSenvironment variable, which should be a space-separated list of<flag>=<value>pairs. yes another env var, keep up bestie π--generator-output=<dir>β writes the generated build files under the<dir>directory and adjusts paths accordingly. this is the "build somewhere that isn't where my source lives" option, and honestly? valid. separate your spaces, queen.
this overrides the GYP_GENERATOR_OUTPUT environment variable. env var found irrelevant. π
--ignore-environmentβ do NOT read options from environment variables. the environment is silenced. blocked. unfollowed. π--checkβ takes extra time to verify the syntax of each build_file. slower but thorough, and honestly we love a perfectionist.--parallelβ uses multiprocessing for speed. and yes, it is marked (experimental), so treat it like a new friendship: promising, exciting, maybe a little chaotic. π₯--toplevel-dir=<dir>β the directory to use as the root of the source tree. that's the whole description, bestie, she said what she said.--build=<configs>β configuration for build after project generation. so, like, what happens next π--no-circular-checkβ disables the check for circular relationships between.gypfiles. now listen: those relationships should not exist, okay? but they've only ever been observed to be harmful with the Xcode output format. Chromium's.gypfiles currently have some circular relationships on non-Mac platforms, which is why this option exists β it lets you keep the strict behavior on Macs and the lenient behavior everywhere else. flexibility, but make it slightly cursed.
heads up bestie: this option is likely to be removed once all the circular relationships in Chromium are eliminated. so don't get too attached. π
π ENVIRONMENT π
GYP_DEFINES,GYP_GENERATORS,GYP_GENERATOR_FLAGS,GYP_GENERATOR_OUTPUTβ these four icons. go read the-D,--format,-G, and--generator-outputoptions above, because that's literally what they map to. iykyk. β
π FILES π
~/.gyp/include.gypiβ implicitly included before anything else in every.gypfile. she's first in line, always, no exceptions, main character, periodt. π
π SEE ALSO π
qmake(1)cmake(1)
the other build-system girlies. we love them, we respect them, we are simply built different. no cap. π§
and that's the whole page, bestie!! this was the GYP(1) manual β source and version GYP(1), dated 01/26/2025 β so go forth, generate those build files, and remember: every .gyp you feed her is a little act of self-care. slay, stay hydrated, and don't forget the --check if you're feeling thorough πβ¨ππ¦πΈπ«Ά
π¦ where this page comes from
- debian trixie: gyp 0.16.2-2 Β· BSD-3-clause~Google
- ubuntu questing: gyp 0.16.2-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms