diff options
author | John S. Urban <urbanjost@comcast.net> | 2021-03-01 22:31:15 -0500 |
---|---|---|
committer | John S. Urban <urbanjost@comcast.net> | 2021-03-01 22:49:27 -0500 |
commit | 59837ec4eb1ca6533fd82c84a0d5d7fe7e7a233d (patch) | |
tree | b5df9394b004375e22fb6619b6e80acb59c8e932 | |
parent | ab57ec6b225edf848229e8f9f1cabecb6e508ade (diff) | |
download | fpm-59837ec4eb1ca6533fd82c84a0d5d7fe7e7a233d.tar.gz fpm-59837ec4eb1ca6533fd82c84a0d5d7fe7e7a233d.zip |
finish . and ..
finish ..
document
-rw-r--r-- | fpm/src/fpm.f90 | 4 | ||||
-rw-r--r-- | fpm/src/fpm_command_line.f90 | 35 |
2 files changed, 26 insertions, 13 deletions
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90 index 4ee9642..24ad471 100644 --- a/fpm/src/fpm.f90 +++ b/fpm/src/fpm.f90 @@ -301,7 +301,7 @@ subroutine cmd_run(settings,test) & (size(settings%name).eq.0 .and. size(executables).gt.1 .and. .not.test) .and.& & .not.settings%list) then line=join(settings%name) - if(line.ne.'.'.and. line.ne.'..')then ! do not report these special strings + if(line.ne.'.')then ! do not report these special strings if(any(.not.found))then write(stderr,'(A)',advance="no")'fpm::run<ERROR> specified names ' do j=1,size(settings%name) @@ -340,7 +340,7 @@ subroutine cmd_run(settings,test) end do write(stderr,*) - if(line.eq.'.' .or. line.eq.' '.or. line.eq.'..')then ! do not report these special strings + if(line.eq.'.' .or. line.eq.' ')then ! do not report these special strings stop else stop 1 diff --git a/fpm/src/fpm_command_line.f90 b/fpm/src/fpm_command_line.f90 index 31bb05f..6a790ec 100644 --- a/fpm/src/fpm_command_line.f90 +++ b/fpm/src/fpm_command_line.f90 @@ -172,6 +172,12 @@ contains names=[character(len=max(len(names),len(tnames))) :: names,tnames] endif + ! convert special string '..' to equivalent (shorter) '*' + ! to allow for a string that does not require shift-key and quoting + do i=1,size(names) + if(names(i).eq.'..')names(i)='*' + enddo + allocate(fpm_run_settings :: cmd_settings) val_runner=sget('runner') cmd_settings=fpm_run_settings(& @@ -375,6 +381,12 @@ contains names=[character(len=max(len(names),len(tnames))) :: names,tnames] endif + ! convert special string '..' to equivalent (shorter) '*' + ! to allow for a string that does not require shift-key and quoting + do i=1,size(names) + if(names(i).eq.'..')names(i)='*' + enddo + allocate(fpm_test_settings :: cmd_settings) val_runner=sget('runner') cmd_settings=fpm_test_settings(& @@ -699,16 +711,17 @@ contains ' are automatically rebuilt before being run if they are out of date. ', & ' ', & 'OPTIONS ', & - ' --target NAME(s) list of specific application names to execute. ', & - ' No name is required if only one application exists.', & - ' If no name is supplied and more than one candidate ', & - ' exists or a name has no match a list is produced ', & - ' and fpm(1) exits. ', & - ' Simple "globbing" is supported where "?" represents', & - ' any single character and "*" represents any string. ', & - ' Therefore a quoted asterisk ''*'' runs all programs. ', & - ' The special string "." also causes all targets to ', & - ' be listed, even if only a single target exists. ', & + ' --target NAME(s) list of specific application names to execute. ', & + ' No name is required if only one target exists. ', & + ' If no name is supplied and more than one candidate ', & + ' exists or a name has no match a list is produced ', & + ' and fpm(1) exits. ', & + ' Basic "globbing" is supported where "?" represents', & + ' any single character and "*" represents any string. ', & + ' The special string "." causes all targets to ', & + ' be listed, even if only a single target exists. ', & + ' The special string ".." causes all targets to ', & + ' be executed. ', & ' --example Run example programs instead of applications. ', & ' --release selects the optimized build instead of the debug build. ', & ' --compiler COMPILER_NAME Specify a compiler name. The default is ', & @@ -726,8 +739,8 @@ contains ' fpm(1) - run or display project applications: ', & ' ', & ' fpm run # run a target when only one exists or list targets ', & - ' fpm run ''*'' # run all targets ', & ' fpm run . # list all targets, running nothing ', & + ' fpm run .. # run all targets, no matter how many there are ', & ' ', & ' # run default program built or to be built with the compiler command ', & ' # "f90". If more than one app exists a list displays and target names', & |