From 87271c5a55ad6412114c4b153c1a8d0bd37156f5 Mon Sep 17 00:00:00 2001 From: "John S. Urban" Date: Sun, 11 Jul 2021 18:16:52 -0400 Subject: some more STOP to FPM_STOP conversions --- src/fpm_command_line.f90 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/fpm_command_line.f90') diff --git a/src/fpm_command_line.f90 b/src/fpm_command_line.f90 index 3146c56..2ed7ac6 100644 --- a/src/fpm_command_line.f90 +++ b/src/fpm_command_line.f90 @@ -31,7 +31,8 @@ use M_CLI2, only : get_subcommand, CLI_RESPONSE_FILE use fpm_strings, only : lower, split, fnv_1a, to_fortran_name, is_fortran_name use fpm_filesystem, only : basename, canon_path, which use fpm_environment, only : run, get_command_arguments_quoted -use fpm_compiler, only : get_default_compile_flags +use fpm_compiler, only : get_default_compile_flags +use fpm_error, only : fpm_stop use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, & & stdout=>output_unit, & & stderr=>error_unit @@ -139,7 +140,6 @@ contains end select version_text = [character(len=80) :: & & 'Version: 0.3.0, alpha', & - & 'PR: 511', & & 'Program: fpm(1)', & & 'Description: A Fortran package manager and build system', & & 'Home Page: https://github.com/fortran-lang/fpm', & @@ -245,17 +245,15 @@ contains & help_new, version_text) select case(size(unnamed)) case(1) - write(stderr,'(*(g0,/))')' directory name required' write(stderr,'(*(7x,g0,/))') & & ' fpm new NAME [[--lib|--src] [--app] [--test] [--example]]|[--full|--bare] [--backfill]' - stop 1 + call fpm_stop(1,'directory name required') case(2) name=trim(unnamed(2)) case default - write(stderr,'(g0)')' only one directory name allowed' write(stderr,'(7x,g0)') & & ' fpm new NAME [[--lib|--src] [--app] [--test] [--example]]| [--full|--bare] [--backfill]' - stop 2 + call fpm_stop(2,'only one directory name allowed') end select !*! canon_path is not converting ".", etc. name=canon_path(name) @@ -263,7 +261,7 @@ contains write(stderr,'(g0)') [ character(len=72) :: & & ' the fpm project name must be made of up to 63 ASCII letters,', & & ' numbers, underscores, or hyphens, and start with a letter.'] - stop 4 + call fpm_stop(4,' ') endif allocate(fpm_new_settings :: cmd_settings) @@ -272,13 +270,13 @@ contains write(stderr,'(*(a))')& &' --full and any of [--src|--lib,--app,--test,--example,--bare]', & &' are mutually exclusive.' - stop 5 + call fpm_stop(5,' ') elseif (any( specified([character(len=10) :: 'src','lib','app','test','example','full'])) & & .and.lget('bare') )then write(stderr,'(*(a))')& &' --bare and any of [--src|--lib,--app,--test,--example,--full]', & &' are mutually exclusive.' - stop 3 + call fpm_stop(3,' ') elseif (any( specified([character(len=10) :: 'src','lib','app','test','example']) ) )then cmd_settings=fpm_new_settings(& & backfill=lget('backfill'), & -- cgit v1.2.3