aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/fpm_command_line.f9018
-rw-r--r--test/new_test/new_test.f907
3 files changed, 16 insertions, 11 deletions
diff --git a/README.md b/README.md
index 4786c63..70d1d89 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ To build manually using the single source distribution, run the following code (
```
mkdir _tmp
-curl -LJ https://github.com/fortran-lang/fpm/releases/download/v0.3.0/fpm-0.3.0.F90 > _tmp/fpm.F90
+curl -LJ https://github.com/fortran-lang/fpm/releases/download/v0.4.0/fpm-0.4.0.F90 > _tmp/fpm.F90
gfortran -J _tmp _tmp/fpm.F90 -o _tmp/fpm
_tmp/fpm install --flag "-g -fbacktrace -O3"
rm -r _tmp
diff --git a/src/fpm_command_line.f90 b/src/fpm_command_line.f90
index df27695..4fce58a 100644
--- a/src/fpm_command_line.f90
+++ b/src/fpm_command_line.f90
@@ -119,13 +119,14 @@ character(len=20),parameter :: manual(*)=[ character(len=20) ::&
character(len=:), allocatable :: val_runner, val_compiler, val_flag, val_cflag, val_ldflag, &
val_profile
+! '12345678901234567890123456789012345678901234567890123456789012345678901234567890',&
character(len=80), parameter :: help_text_compiler(*) = [character(len=80) :: &
' --compiler NAME Specify a compiler name. The default is "gfortran"',&
' unless set by the environment variable FPM_FC.',&
- ' --c-compiler NAME Specify the C compiler name. By default automatic determined',&
- ' unless set by the environment variable FPM_CC.',&
- ' --archiver NAME Specify the archiver name. By default automatic determined',&
- ' unless set by the environment variable FPM_AR.'&
+ ' --c-compiler NAME Specify the C compiler name. Automatically determined by ',&
+ ' default unless set by the environment variable FPM_CC.',&
+ ' --archiver NAME Specify the archiver name. Automatically determined by ',&
+ ' default unless set by the environment variable FPM_AR.'&
]
character(len=80), parameter :: help_text_flag(*) = [character(len=80) :: &
@@ -136,10 +137,11 @@ character(len=80), parameter :: help_text_flag(*) = [character(len=80) :: &
' Note object and .mod directory locations are always',&
' built in.',&
' --c-flag CFLAGS selects compile arguments specific for C source in the build.',&
- ' The default value is set by the FPM_CFLAGS environment variable.',&
+ ' The default value is set by the FPM_CFLAGS environment',&
+ ' variable.',&
' --link-flag LDFLAGS',&
- ' select arguments passed to the linker for the build.',&
- ' The default value is set by the FPM_LDFLAGS environment variable.'&
+ ' select arguments passed to the linker for the build. The',&
+ ' default value is set by the FPM_LDFLAGS environment variable.'&
]
@@ -1219,7 +1221,7 @@ contains
character(len=*), parameter :: fpm_prefix = "FPM_"
- val = get_env(fpm_prefix//val, default)
+ val = get_env(fpm_prefix//env, default)
end function get_fpm_env
end module fpm_command_line
diff --git a/test/new_test/new_test.f90 b/test/new_test/new_test.f90
index a6c859b..f191015 100644
--- a/test/new_test/new_test.f90
+++ b/test/new_test/new_test.f90
@@ -36,6 +36,8 @@ character(len=:),allocatable :: shortdirs(:)
character(len=:),allocatable :: expected(:)
logical,allocatable :: tally(:)
logical :: IS_OS_WINDOWS
+character(len=*),parameter :: dirs_to_be_removed = 'fpm_scratch_* name-with-hyphens'
+character(len=:),allocatable :: rm_command
write(*,'(g0:,1x)')'TEST new SUBCOMMAND (draft):'
cmdpath = get_command_path()
@@ -146,10 +148,11 @@ logical :: IS_OS_WINDOWS
! clean up scratch files; might want an option to leave them for inspection
select case (get_os_type())
case (OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD)
- call execute_command_line('rm -rf fpm_scratch_*',exitstat=estat,cmdstat=cstat,cmdmsg=message)
+ rm_command = 'rm -rf ' // dirs_to_be_removed
case (OS_WINDOWS)
- call execute_command_line('rmdir fpm_scratch_* /s /q',exitstat=estat,cmdstat=cstat,cmdmsg=message)
+ rm_command = 'rmdir ' // dirs_to_be_removed // ' /s /q'
end select
+ call execute_command_line(rm_command, exitstat=estat,cmdstat=cstat,cmdmsg=message)
write(*,'("new TEST TALLY=",*(g0))')tally
if(all(tally))then