Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
95 user(s) are online (86 user(s) are browsing Forums)

Members: 1
Guests: 94

NinjaCyborg, more...

Support us!

Headlines

 
  Register To Post  

Delete command buggy?
Quite a regular
Quite a regular


See User information
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++
Go to top
Re: Delete command buggy?
Not too shy to talk
Not too shy to talk


See User information
set your failat to above 5 then

Go to top
Re: Delete command buggy?
Not too shy to talk
Not too shy to talk


See User information
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.

Go to top
Re: Delete command buggy?
Home away from home
Home away from home


See User information
@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.
Go to top
Re: Delete command buggy?
Quite a regular
Quite a regular


See User information
@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++
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project