Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (75 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines






Delete command buggy?
Quite a regular
Joined:
2008/5/2 13:14
From Sweden
Posts: 504
I try to use the normal delete command in a make script, but no matter what I do, make stops if delete can't find the file to delete (already deleted):

delete MyFile
MyFile Not Deleted: object not found
make: *** [target] Error 5

I have tried to add QUIET and/or FORCE, but to no avail. Delete always seems to return WARN (5) when it can't find the file, so the makefile always stops. And QUIET does NOT make it quiet. It still prints
"MyFile Not Deleted: object not found"

Any comments on this?

_________________
Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
   Report Go to top

Re: Delete command buggy?
Just popping in
Joined:
2020/11/17 12:08
From Slough
Posts: 181
set your failat to above 5 then

   Report Go to top

Re: Delete command buggy?
Just popping in
Joined:
2020/11/17 12:08
From Slough
Posts: 181
Delete is doing exactly what it's supposed to, it's setting a return code of 5 - warning - because there's no file to delete. Without a failat threshold set above 5, the script will terminate before the next command.

   Report Go to top

Re: Delete command buggy?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2959
@Deniil

If delete more then one file at once, there is no problem
Delete file1 file2 file3 #?(.o|.a|.elf|.exe|.tmp)

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: Delete command buggy?
Quite a regular
Joined:
2008/5/2 13:14
From Sweden
Posts: 504
@NinjaCyborg

This is make (from gcc), not AmigaDOS. There is not failat in make.

@LiveForIt

Thanks, I found a similar solution, using touch first to create a dummy and then deleting with #?, before realising that you can prepend a command with - to ignore its return code.

target:
-delete MyFile
continue with important stuff

That works!

_________________
Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project