Page 1 of 1

Run AmigaDOS commands in a makefile

Posted: Mon Jun 27, 2011 5:37 pm
by corto
I was trying to run some AmigaDOS commands ("if exists foo") a makefile and I found almost nothing about that. Then I found the article on gnumake by Steven, so I tried a simple example using @@ :

Code: Select all

all:
   if exists foo @@
      echo "foo exists" @@
   else @@
      echo "foo does not exist" @@
   endif
That doesn't work and I have an error :
if exists foo @@
IF: ELSE or ENDINF missing
if : error code 10
I use make 3.81 from the last SDK (53.20 I suppose ... by the way, I am not sure there is the version number somewhere once the SDK is installed).

Re: Run AmigaDOS commands in a makefile

Posted: Sun Jul 03, 2011 3:42 am
by xenic
@corto
One of my makefiles uses @@ in a similar way but right now I don't have time for a recompile to see if it still works. There is one extra thing in my makefile; it has a backslash after the @@ like this:
@if exists ${ARCHIVE_BASE} @@\
delete ${ARCHIVE_BASE} @@\
endif

Re: Run AmigaDOS commands in a makefile

Posted: Thu Jul 14, 2011 7:47 am
by corto
@xenic
Thanks, it works with a backslash at the end of the line. I don't know why I didn't test like that (I tried the backslash without @@). I was focusing on the sonix release.

@ssolie
You should update the example in your article according to the fact the backslash is required.

Re: Run AmigaDOS commands in a makefile

Posted: Thu Jul 14, 2011 1:26 pm
by broadblues
It's probably a good idea to email ssolie directly about the 'error' in his article rather than hope he'll read your post here. There contact info n the page you linked to.