diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fpm.f90 | 2 | ||||
-rw-r--r-- | src/fpm_command_line.f90 | 11 | ||||
-rw-r--r-- | src/fpm_filesystem.F90 | 19 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90 index 0dd723c..6084a11 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -287,7 +287,7 @@ else call build_package(targets,model) endif -end subroutine +end subroutine cmd_build subroutine cmd_run(settings,test) class(fpm_run_settings), intent(in) :: settings diff --git a/src/fpm_command_line.f90 b/src/fpm_command_line.f90 index ed99e58..db5d7c7 100644 --- a/src/fpm_command_line.f90 +++ b/src/fpm_command_line.f90 @@ -864,7 +864,7 @@ contains help_text_flag, & ' --runner CMD A command to prefix the program execution paths with. ', & ' see "fpm help runner" for further details. ', & - ' --list list pathname of candidates instead of running them. Note ', & + ' --list list basenames of candidates instead of running them. Note ', & ' out-of-date candidates will still be rebuilt before being ', & ' listed. ', & ' -- ARGS optional arguments to pass to the program(s). The same ', & @@ -876,7 +876,9 @@ contains ' fpm(1) - run or display project applications: ', & ' ', & ' fpm run # run a target when only one exists or list targets ', & - ' fpm run --list # list all targets, running nothing. ', & + ' fpm run --list # list basename of all targets, running nothing. ', & + ' fpm run "demo*" --list # list target basenames starting with "demo*".', & + ' fpm run "psi*" --runner # list target pathnames starting with "psi*".', & ' fpm run --all # run all targets, no matter how many there are. ', & ' ', & ' # run default program built or to be built with the compiler command ', & @@ -885,7 +887,7 @@ contains ' fpm run --compiler f90 ', & ' ', & ' # run example programs instead of the application programs. ', & - ' fpm run --example ''*'' ', & + ' fpm run --example "*" ', & ' ', & ' # run a specific program and pass arguments to the command ', & ' fpm run myprog -- -x 10 -y 20 --title "my title line" ', & @@ -1110,7 +1112,8 @@ contains help_text_flag, & ' --runner CMD A command to prefix the program execution paths with. ', & ' see "fpm help runner" for further details. ', & - ' --list list candidates instead of building or running them ', & + ' --list list candidate basenames instead of running them. Note they', & + ' --list will still be built if not currently up to date. ', & ' -- ARGS optional arguments to pass to the test program(s). ', & ' The same arguments are passed to all test names ', & ' specified. ', & diff --git a/src/fpm_filesystem.F90 b/src/fpm_filesystem.F90 index 102d6c5..83cffe7 100644 --- a/src/fpm_filesystem.F90 +++ b/src/fpm_filesystem.F90 @@ -94,21 +94,18 @@ function basename(path,suffix) result (base) with_suffix = suffix end if - if (with_suffix) then - call split(path,file_parts,delimiters='\/') - if(size(file_parts).gt.0)then - base = trim(file_parts(size(file_parts))) - else - base = '' - endif + call split(path,file_parts,delimiters='\/') + if(size(file_parts).gt.0)then + base = trim(file_parts(size(file_parts))) else - call split(path,file_parts,delimiters='\/.') + base = '' + endif + if(.not.with_suffix)then + call split(base,file_parts,delimiters='.') if(size(file_parts).ge.2)then base = trim(file_parts(size(file_parts)-1)) - else - base = '' endif - end if + endif end function basename |