]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
OS400: don't delete source files when building with debug
authorJon Rumsey <jrumsey@uk.ibm.com>
Mon, 28 Oct 2024 17:53:01 +0000 (17:53 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 29 Oct 2024 14:44:05 +0000 (15:44 +0100)
Debugger not able to work against curl *SRVPGM when using temporary
source files.

Fixes #15445
Closes #15446

packages/OS400/initscript.sh

index 2f6d78c24503ae36891843c6f1d80cde6585f68d..69a354ab0d0c1440414811f952316d7de0b664a4 100755 (executable)
@@ -189,8 +189,8 @@ make_module()
                 echo "#pragma convert(819)"
                 echo "#line 1"
                 cat "${2}"
-        } > __tmpsrcf.c
-        CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('__tmpsrcf.c')"
+        } > "${1}"__819.c
+        CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('${1}__819.c')"
         CMD="${CMD} SYSIFCOPT(*IFS64IO *ASYNCSIGNAL)"
 #       CMD="${CMD} OPTION(*INCDIRFIRST *SHOWINC *SHOWSYS)"
         CMD="${CMD} OPTION(*INCDIRFIRST)"
@@ -228,7 +228,9 @@ make_module()
         fi
 
         CLcommand "${CMD}"
-        rm -f __tmpsrcf.c
+        if [ "${DEBUG}" = "*NONE" ]
+        then    rm -f "${1}"__819.c
+        fi
         # shellcheck disable=SC2034
         LINK=YES
 }