CommandLineOptions topic
Commandline options
Declaration
CommandLineOptionsDescription
The fpmkunit unit takes control of parsing the command-line to decide what to do and what options to set.
The command-line takes a mandatory command name followed by options controlling the behaviour.
fpmake command [options]
The command must be one of the following:
- compile
- Compile all units in the selected package or packages.
- build
- Force a build of all units in the selected package or packages.
- install
- Install all units in the selected package or packages.
- buildinstall
- Build and install all units in the selected package or packages.
- uninstall
- Uninstall the selected package or packages.
- clean
- Remove all generated files in the selected package or packages for current CPU-OS target.
- distclean
- Remove all generated files in the selected package or packages for all targets.
- archive
- Create archive (zip) with all units in the selected package or packages.
- manifest
- Create a manifest suitable for import in repository.
- zipinstall
- Install all units in the selected package or packages into an archive.
- pkglist
- Create list of all packages suitable for FPC installer.
- fpdocproject
- Create fpdoc project file(s) for all packages
The behaviour of the command can be controlled by specifying one of the many options:
-
-hor--help - Shows a help message
-
-lc--list-commands - list commands instead of actually executing them.
-
-n--nofpccfg - Compiler will not use fpc.cfg
-
-v--verbose - Be verbose when working.
-
-d--debug - Add debug information when working.
-
-I--interactive - Allow to interact with child processes.
-
-e--useenv - Use environment to pass options to compiler.
-
-ie--installexamples - Install the example-sources.
-
-bu--buildunit - Compile package in Build-unit mode.
-
-sap--skipallprograms - Skip all programs even if native-compiling/installing.
-
-scp--skipcrossprograms - Skip programs when cross-compiling/installing.
-
-io--ignoreinvalidoption - Ignore further invalid options.
-
-C--cpu=Value - Compile for indicated CPU.
-
-O--os=Value - Compile for indicated OS.
-
-s--subtarget=Value - Compile for indicated subtarget.
-
-t--target=Value - Compile for indicated target, string in the form CPU-OS(-subtarget).
-
-P--prefix=Value - Use indicated prefix directory for all commands.
-
-B--baseinstalldir=Value - Use indicated directory as base install dir.
-
-BI--bininstalldir=Value - Use indicated directory as base install dir.
-
-LI--libinstalldir=Value - Use indicated directory as base install dir.
-
-UL--localunitdir=Value - Use indicated directory as local (user) unit dir.
-
-UG--globalunitdir=Value - Use indicated directory as global unit dir.
-
-sp--searchpath=Value - Add search directory for packages.
-
-U--unitinstalldir=Value - Use indicated directory to install units into.
-
-r--compiler=Value - Use indicated binary as compiler.
-
-f--config=Value - Use indicated config file when compiling.
-
-o--options=Value - Pass extra options to the compiler.
-
-df--doc-folder=Value - Use indicated directory as fpdoc output folder.
-
-sd--single-docfile=Value - Create a single fpdoc project file for all projects.
-
-do--doc-options=Value - Name=Value File with options for fpdoc project file.
-
-fsp--fpunitsrcpath=Value - Sourcepath to replace in fpunits.cfg on installation.
-
-zp--zipprefix=Value - Use indicated prefix for generated archives.
-
-T--threads=Value - Enable the indicated amount of worker threads.
-
--data2inc=Value - Use indicated data2inc executable.
Packages can come in variants. To add a package-variant to all packages:
+[variantname]+=[variant1],variant2,...
To add a package-variant to all packages which other packages will inherit:
+[variantname]*=[variant1],variant2,...
To add specific options for one package-variant:
--options_[variantname]_[variant1]=Value
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
