diff options
author | init current directory[i] <urbanjost@comcast.net> | 2020-10-09 21:54:34 -0400 |
---|---|---|
committer | init current directory[i] <urbanjost@comcast.net> | 2020-10-09 21:54:34 -0400 |
commit | 22ddc545cec0821e8328a2cb657fee2cc453e9ef (patch) | |
tree | fb6ae93a451efcae05248b988729aa677dc479a2 | |
parent | e546dfb7d5952abf8331cb9c1c9e687745fdf580 (diff) | |
download | fpm-22ddc545cec0821e8328a2cb657fee2cc453e9ef.tar.gz fpm-22ddc545cec0821e8328a2cb657fee2cc453e9ef.zip |
tweek documentation
-rw-r--r-- | fpm/src/fpm_command_line.f90 | 488 |
1 files changed, 244 insertions, 244 deletions
diff --git a/fpm/src/fpm_command_line.f90 b/fpm/src/fpm_command_line.f90 index fc76e05..fc08f65 100644 --- a/fpm/src/fpm_command_line.f90 +++ b/fpm/src/fpm_command_line.f90 @@ -74,14 +74,14 @@ contains call set_help() ! text for --version switch, select case (get_os_type()) - case (OS_LINUX); os_type = "OS Type: Linux" - case (OS_MACOS); os_type = "OS Type: macOS" - case (OS_WINDOWS); os_type = "OS Type: Windows" - case (OS_CYGWIN); os_type = "OS Type: Cygwin" - case (OS_SOLARIS); os_type = "OS Type: Solaris" - case (OS_FREEBSD); os_type = "OS Type: FreeBSD" - case (OS_UNKNOWN); os_type = "OS Type: Unknown" - case default ; os_type = "OS Type: UNKNOWN" + case (OS_LINUX); os_type = "OS Type: Linux" + case (OS_MACOS); os_type = "OS Type: macOS" + case (OS_WINDOWS); os_type = "OS Type: Windows" + case (OS_CYGWIN); os_type = "OS Type: Cygwin" + case (OS_SOLARIS); os_type = "OS Type: Solaris" + case (OS_FREEBSD); os_type = "OS Type: FreeBSD" + case (OS_UNKNOWN); os_type = "OS Type: Unknown" + case default ; os_type = "OS Type: UNKNOWN" end select version_text = [character(len=80) :: & & 'Version: 0.1.0, Pre-alpha', & @@ -171,7 +171,7 @@ contains if(size(unnamed).lt.2)then unnamed=['help', 'fpm '] endif - widest=256 + widest=256 allocate(character(len=widest) :: help_text(0)) do i=2,size(unnamed) select case(unnamed(i)) @@ -265,16 +265,16 @@ contains subroutine set_help() help_usage=[character(len=80) :: & - ' ', & - 'USAGE: fpm [ SUBCOMMAND [SUBCOMMAND_OPTIONS] ] | [|--help|--version]', & - ' ', & - ' where SUBCOMMAND is commonly new|build|run|test|install|help ', & - ' Enter "fpm --help" or "fpm SUBCOMMAND --help" for more ', & + ' ', & + 'USAGE: fpm [ SUBCOMMAND [SUBCOMMAND_OPTIONS] ] | [|--help|--version] ', & + ' ', & + ' where SUBCOMMAND is commonly new|build|run|test|install|help ', & + ' Enter "fpm --help" or "fpm SUBCOMMAND --help" for more ', & ' information.', & '' ] help_fpm=[character(len=80) :: & - 'NAME', & - ' fpm(1) - A Fortran package manager and build system', & + 'NAME ', & + ' fpm(1) - A Fortran package manager and build system ', & 'OS TYPE' ] help_fpm=[character(len=80) :: help_fpm, & 'SYNOPSIS ', & @@ -292,7 +292,7 @@ contains ' you share your projects with others in a similar manner. ', & ' ', & ' See the fpm(1) repository at https://fortran-lang.org/packages ', & - ' for a listing of such registered projects. ', & + ' for a listing of registered projects. ', & ' ', & ' All output goes into the directory "build/". ', & ' ', & @@ -301,7 +301,7 @@ contains ' ', & ' build [--release] [--list] ', & ' Compile the packages into the "build/" directory. ', & - ' new NAME [--lib] [--app] [--test] ', & + ' new NAME [--lib] [--app] [--test] [--backfill] ', & ' Create a new Fortran package directory ', & ' with sample files ', & ' run [NAME(s)] [--release] [--list] [-- ARGS] ', & @@ -325,251 +325,251 @@ contains 'EXAMPLES ', & ' sample commands: ', & ' ', & + ' fpm new mypackage --app --test ', & ' fpm build ', & ' fpm test ', & ' fpm run ', & ' fpm new --help ', & - ' fpm new mypackage --app --test ', & ' fpm run myprogram --release -- -x 10 -y 20 --title "my title" ', & 'SEE ALSO ', & ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & ''] help_run=[character(len=80) :: & - 'NAME ', & - ' run(1) - the fpm(1) subcommand to run project applications ', & - ' ', & - 'SYNOPSIS ', & - ' fpm run [NAME(s)] [--release] [-- ARGS] ', & - ' ', & - ' fpm run --help|--version ', & - ' ', & - 'DESCRIPTION ', & - ' Run applications you have built in your fpm(1) project. ', & - ' ', & - 'OPTIONS ', & - ' NAME(s) optional list of specific names to execute. ', & - ' The default is to run all the applications in app/ ', & - ' or the programs listed in the "fpm.toml" file. ', & - ' --release selects the optimized build instead of the debug ', & - ' build. ', & - ' --list list candidates instead of building or running them', & - ' -- ARGS optional arguments to pass to the program(s). ', & - ' The same arguments are passed to all names ', & - ' specified. ', & - ' ', & - 'EXAMPLES ', & - 'run fpm(1) project applications ', & - ' ', & - ' # run default programs in /app or as specified in "fpm.toml" ', & - ' fpm run ', & - ' ', & - ' # run a specific program and pass arguments to the command ', & - ' fpm run mytest -- -x 10 -y 20 --title "my title line" ', & - ' ', & - ' # production version of two applications ', & - ' fpm run tst1 tst2 --release ', & - 'SEE ALSO ', & - ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & + 'NAME ', & + ' run(1) - the fpm(1) subcommand to run project applications ', & + ' ', & + 'SYNOPSIS ', & + ' fpm run [NAME(s)] [--release] [-- ARGS] ', & + ' ', & + ' fpm run --help|--version ', & + ' ', & + 'DESCRIPTION ', & + ' Run applications you have built in your fpm(1) project. ', & + ' ', & + 'OPTIONS ', & + ' NAME(s) optional list of specific names to execute. ', & + ' The default is to run all the applications in app/ ', & + ' or the programs listed in the "fpm.toml" file. ', & + ' --release selects the optimized build instead of the debug ', & + ' build. ', & + ' --list list candidates instead of building or running them ', & + ' -- ARGS optional arguments to pass to the program(s). ', & + ' The same arguments are passed to all names ', & + ' specified. ', & + ' ', & + 'EXAMPLES ', & + ' run fpm(1) project applications ', & + ' ', & + ' # run default programs in /app or as specified in "fpm.toml" ', & + ' fpm run ', & + ' ', & + ' # run a specific program and pass arguments to the command ', & + ' fpm run mytest -- -x 10 -y 20 --title "my title line" ', & + ' ', & + ' # production version of two applications ', & + ' fpm run tst1 tst2 --release ', & + 'SEE ALSO ', & + ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & '' ] help_build=[character(len=80) :: & - 'NAME ', & - ' build(1) - the fpm(1) subcommand to build a project ', & - 'SYNOPSIS ', & - ' fpm build [--release]|[-list] ', & - ' ', & - ' fpm build --help|--version ', & - ' ', & - 'DESCRIPTION ', & - ' The "fpm build" command ', & - ' o Fetches any dependencies ', & - ' o Scans your sources ', & - ' o Builds them in the proper order ', & - ' ', & - ' The Fortran source files are assumed to be in app/, test/, and src/ ', & - ' by default. The changed or new files found are rebuilt. ', & - ' The results are placed in the build/ directory. ', & - ' ', & - ' Non-default pathnames and remote dependencies are used if ', & - ' specified in the "fpm.toml" file. ', & - ' ', & - 'OPTIONS ', & - ' --release build in build/*_release instead of build/*_debug with ', & - ' high optimization instead of full debug options. ', & - ' --list list candidates instead of building or running them ', & - ' --help print this help and exit ', & - ' --version print program version information and exit ', & - ' ', & - 'EXAMPLES ', & - ' Sample commands: ', & - ' ', & - ' fpm build # build with debug options ', & - ' fpm build --release # build with high optimization ', & - 'SEE ALSO ', & - ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & + 'NAME ', & + ' build(1) - the fpm(1) subcommand to build a project ', & + 'SYNOPSIS ', & + ' fpm build [--release]|[-list] ', & + ' ', & + ' fpm build --help|--version ', & + ' ', & + 'DESCRIPTION ', & + ' The "fpm build" command ', & + ' o Fetches any dependencies ', & + ' o Scans your sources ', & + ' o Builds them in the proper order ', & + ' ', & + ' The Fortran source files are assumed to be in app/, test/, and src/ ', & + ' by default. The changed or new files found are rebuilt. ', & + ' The results are placed in the build/ directory. ', & + ' ', & + ' Non-default pathnames and remote dependencies are used if ', & + ' specified in the "fpm.toml" file. ', & + ' ', & + 'OPTIONS ', & + ' --release build in build/*_release instead of build/*_debug with ', & + ' high optimization instead of full debug options. ', & + ' --list list candidates instead of building or running them ', & + ' --help print this help and exit ', & + ' --version print program version information and exit ', & + ' ', & + 'EXAMPLES ', & + ' Sample commands: ', & + ' ', & + ' fpm build # build with debug options ', & + ' fpm build --release # build with high optimization ', & + 'SEE ALSO ', & + ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & '' ] help_help=[character(len=80) :: & - 'NAME ', & - ' help(1) - the fpm(1) subcommand to display help ', & - ' ', & - 'SYNOPSIS ', & - ' fpm help [fpm] [new] [build] [run] [test] [help] [version] [manual]', & - ' ', & - ' fpm help [fortran|fortrnmanual][FORTRAN_INTRINSIC_NAME] ', & - ' ', & - 'DESCRIPTION ', & - ' The "fpm help" command is an alternative to the --help parameter ', & - ' on the fpm(1) command and its subcommands. ', & - ' ', & - 'OPTIONS ', & - ' NAME(s) A list of topic names to display. All the subcommands ', & - ' have their own page (new, build, run, test, ...). ', & - ' ', & - ' The special name "manual" displays all the fpm(1) ', & - ' built-in documentation. ', & - ' ', & - ' The default is to display help for the fpm(1) command ', & - ' itself. ', & - ' INTRINSIC(s) In addition, Fortran intrinsics can be described. ', & - ' The special name "fortran" prints a list of available', & - ' topics. "fortranmanual" displays all the built-in ', & - ' fortran documentation. Entries should be in ', & - ' uppercase to avoid conflicts with fpm(1) topics; ', & - ' but can be in lowercase if there is no conflict. ', & - 'EXAMPLES ', & - ' Sample usage: ', & - ' ', & - ' fpm help # general fpm(1) command help ', & - ' fpm help version # show program version ', & - ' fpm help new # display help for "new" subcommand ', & - ' fpm help manual # All fpm(1) built-in documentation ', & - ' ', & - ' FORTRAN INTRINSICS ', & - ' Additional general Fortran documentation ', & - ' ', & - ' fpm help SIN COS TAN # selected Fortran Intrinsic help ', & - ' fpm help fortran # index of Fortran documentation ', & - ' fpm help fortranmanual # all Fortran documentation ', & - ' ', & - 'SEE ALSO ', & - ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & + 'NAME ', & + ' help(1) - the fpm(1) subcommand to display help ', & + ' ', & + 'SYNOPSIS ', & + ' fpm help [fpm] [new] [build] [run] [test] [help] [version] [manual] ', & + ' ', & + ' fpm help [fortran|fortran_manual][FORTRAN_INTRINSIC_NAME] ', & + ' ', & + 'DESCRIPTION ', & + ' The "fpm help" command is an alternative to the --help parameter ', & + ' on the fpm(1) command and its subcommands. ', & + ' ', & + 'OPTIONS ', & + ' NAME(s) A list of topic names to display. All the subcommands ', & + ' have their own page (new, build, run, test, ...). ', & + ' ', & + ' The special name "manual" displays all the fpm(1) ', & + ' built-in documentation. ', & + ' ', & + ' The default is to display help for the fpm(1) command ', & + ' itself. ', & + ' INTRINSIC(s) In addition, Fortran intrinsics can be described. ', & + ' The special name "fortran" prints a list of available ', & + ' topics. "fortran_manual" displays all the built-in ', & + ' fortran documentation. Entries should be in ', & + ' uppercase to avoid conflicts with fpm(1) topics; ', & + ' but can be in lowercase if there is no conflict. ', & + 'EXAMPLES ', & + ' Sample usage: ', & + ' ', & + ' fpm help # general fpm(1) command help ', & + ' fpm help version # show program version ', & + ' fpm help new # display help for "new" subcommand ', & + ' fpm help manual # All fpm(1) built-in documentation ', & + ' ', & + ' FORTRAN INTRINSICS ', & + ' Additional general Fortran documentation ', & + ' ', & + ' fpm help SIN COS TAN # selected Fortran Intrinsic help ', & + ' fpm help fortran # index of Fortran documentation ', & + ' fpm help fortran_manual # all Fortran documentation ', & + ' ', & + 'SEE ALSO ', & + ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & '' ] - help_new=[character(len=80) :: & - 'NAME ', & - ' new(1) - the fpm(1) subcommand to initialize a new project ', & - 'SYNOPSIS ', & - ' fpm new NAME [--lib] [--app] [--test] [--backfill] ', & - ' ', & - ' fpm new --help|--version ', & - ' ', & - 'DESCRIPTION ', & - ' "fpm new" creates a new programming project in a new directory.', & - ' ', & - ' The "new" subcommand creates a directory with the specified ', & - ' name and runs the command "git init" in that directory and ', & - ' populates it with an example "fpm.toml" file, a src/, test/, ', & - ' and app/ directory with trivial example Fortran source files ', & - ' and a ".gitignore" file for ignoring the build/ directory ', & - ' (where fpm-generated output will be placed): ', & - ' ', & - ' NAME/ ', & - ' fpm.toml ', & - ' .gitignore ', & - ' src/ ', & - ' NAME.f90 ', & - ' app/ ', & - ' main.f90 ', & - ' test/ ', & - ' main.f90 ', & - ' ', & - ' Remember to update the information in the sample "fpm.toml" ', & - ' file with such information as your name and e-mail address. ', & - ' ', & - 'OPTIONS ', & - ' NAME the name of the project directory to create. The name ', & - ' must be a valid Fortran name composed of 1 to 63 ', & - ' ASCII alphanumeric characters and underscores, ', & - ' starting with a letter. ', & - ' ', & - ' The default is to create all of the src/, app/, and test/ ', & - ' directories. If any of the following options are specified ', & - ' then only specified subdirectories are generated: ', & - ' ', & - ' --lib create directory src/ and a placeholder module ', & - ' named "NAME.f90" for use with subcommand "build". ', & - ' --app create directory app/ and a placeholder main ', & - ' program for use with subcommand "run". ', & - ' --test create directory test/ and a placeholder program ', & - ' for use with the subcommand "test". Note that sans ', & - ' "--lib" it really does not have anything to test. ', & - ' ', & - ' So the default is equivalent to "fpm NAME --lib --app --test". ', & - ' ', & - ' --backfill By default the directory must not exist. If this ', & - ' option is present the directory may pre-exist and ', & - ' only subdirectories and files that do not ', & - ' already exist will be created. For example, if you ', & - ' previously entered "fpm new myname --lib" entering ', & - ' "fpm new myname --backfill" will create the missing', & - ' app/ and test/ directories and missing programs. ', & - ' ', & - ' --help print this help and exit ', & - ' --version print program version information and exit ', & - ' ', & - 'EXAMPLES ', & - ' Sample use ', & - ' ', & - ' fpm new myproject # create new project directory and seed it', & - ' cd myproject # Enter the new directory ', & - ' # and run commands such as ', & - ' fpm build ', & - ' fpm run # run example application program ', & - ' fpm test # run example test program ', & - 'SEE ALSO ', & - ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & - ' ', & - ' Registered packages are at https://fortran-lang.org/packages ', & + help_new=[character(len=80) :: & + 'NAME ', & + ' new(1) - the fpm(1) subcommand to initialize a new project ', & + 'SYNOPSIS ', & + ' fpm new NAME [--lib] [--app] [--test] [--backfill] ', & + ' ', & + ' fpm new --help|--version ', & + ' ', & + 'DESCRIPTION ', & + ' "fpm new" creates a new programming project in a new directory .', & + ' ', & + ' The "new" subcommand creates a directory with the specified ', & + ' name and runs the command "git init" in that directory and ', & + ' populates it with an example "fpm.toml" file, a src/, test/, ', & + ' and app/ directory with trivial example Fortran source files ', & + ' and a ".gitignore" file for ignoring the build/ directory ', & + ' (where fpm-generated output will be placed): ', & + ' ', & + ' NAME/ ', & + ' fpm.toml ', & + ' .gitignore ', & + ' src/ ', & + ' NAME.f90 ', & + ' app/ ', & + ' main.f90 ', & + ' test/ ', & + ' main.f90 ', & + ' ', & + ' Remember to update the information in the sample "fpm.toml" ', & + ' file with your name and e-mail address. ', & + ' ', & + 'OPTIONS ', & + ' NAME the name of the project directory to create. The name ', & + ' must be a valid Fortran name composed of 1 to 63 ', & + ' ASCII alphanumeric characters and underscores, ', & + ' starting with a letter. ', & + ' ', & + ' The default is to create all of the src/, app/, and test/ ', & + ' directories. If any of the following options are specified ', & + ' then only specified subdirectories are generated: ', & + ' ', & + ' --lib create directory src/ and a placeholder module ', & + ' named "NAME.f90" for use with subcommand "build". ', & + ' --app create directory app/ and a placeholder main ', & + ' program for use with subcommand "run". ', & + ' --test create directory test/ and a placeholder program ', & + ' for use with the subcommand "test". Note that sans ', & + ' "--lib" it really does not have anything to test. ', & + ' ', & + ' So the default is equivalent to "fpm NAME --lib --app --test". ', & + ' ', & + ' --backfill By default the directory must not exist. If this ', & + ' option is present the directory may pre-exist and ', & + ' only subdirectories and files that do not ', & + ' already exist will be created. For example, if you ', & + ' previously entered "fpm new myname --lib" entering ', & + ' "fpm new myname --backfill" will create the missing ', & + ' app/ and test/ directories and programs. ', & + ' ', & + ' --help print this help and exit ', & + ' --version print program version information and exit ', & + ' ', & + 'EXAMPLES ', & + ' Sample use ', & + ' ', & + ' fpm new myproject # create new project directory and seed it ', & + ' cd myproject # Enter the new directory ', & + ' # and run commands such as ', & + ' fpm build ', & + ' fpm run # run example application program ', & + ' fpm test # run example test program ', & + 'SEE ALSO ', & + ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & + ' ', & + ' Registered packages are at https://fortran-lang.org/packages ', & '' ] help_test=[character(len=80) :: & - 'NAME ', & - ' test(1) - the fpm(1) subcommand to run project tests ', & - ' ', & - 'SYNOPSIS ', & - ' fpm test [NAME(s)] [--release] [--list] [-- ARGS] ', & - ' ', & - ' fpm test --help|--version ', & - ' ', & - 'DESCRIPTION ', & - ' Run applications you have built to test your project. ', & - ' ', & - 'OPTIONS ', & - ' NAME(s) optional list of specific test names to execute. ', & - ' The default is to run all the tests in test/ ', & - ' or the tests listed in the "fpm.toml" file. ', & - ' --release selects the optimized build instead of the debug ', & - ' build. ', & - ' --list list candidates instead of building or running them', & - ' -- ARGS optional arguments to pass to the test program(s). ', & - ' The same arguments are passed to all test names ', & - ' specified. ', & - ' ', & - 'EXAMPLES ', & - 'run tests ', & - ' ', & - ' # run default tests in /test or as specified in "fpm.toml" ', & - ' fpm test ', & - ' ', & - ' # run a specific test and pass arguments to the command ', & - ' fpm test mytest -- -x 10 -y 20 --title "my title line" ', & - ' ', & - ' fpm test tst1 tst2 --release # production version of two tests', & - 'SEE ALSO ', & - ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & + 'NAME ', & + ' test(1) - the fpm(1) subcommand to run project tests ', & + ' ', & + 'SYNOPSIS ', & + ' fpm test [NAME(s)] [--release] [--list] [-- ARGS] ', & + ' ', & + ' fpm test --help|--version ', & + ' ', & + 'DESCRIPTION ', & + ' Run applications you have built to test your project. ', & + ' ', & + 'OPTIONS ', & + ' NAME(s) optional list of specific test names to execute. ', & + ' The default is to run all the tests in test/ ', & + ' or the tests listed in the "fpm.toml" file. ', & + ' --release selects the optimized build instead of the debug ', & + ' build. ', & + ' --list list candidates instead of building or running them ', & + ' -- ARGS optional arguments to pass to the test program(s). ', & + ' The same arguments are passed to all test names ', & + ' specified. ', & + ' ', & + 'EXAMPLES ', & + 'run tests ', & + ' ', & + ' # run default tests in /test or as specified in "fpm.toml" ', & + ' fpm test ', & + ' ', & + ' # run a specific test and pass arguments to the command ', & + ' fpm test mytest -- -x 10 -y 20 --title "my title line" ', & + ' ', & + ' fpm test tst1 tst2 --release # production version of two tests ', & + 'SEE ALSO ', & + ' The fpm(1) home page at https://github.com/fortran-lang/fpm ', & '' ] help_install=[character(len=80) :: & - ' fpm(1) subcommand "install" ', & - ' ', & - ' Usage: fpm install NAME ', & + ' fpm(1) subcommand "install" ', & + ' ', & + ' Usage: fpm install NAME ', & '' ] end subroutine set_help |