Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
164 user(s) are online (132 user(s) are browsing Forums)

Members: 0
Guests: 164

more...

Headlines

 
  Register To Post  

Executing a secondary script from within a makefile
Quite a regular
Quite a regular


See User information
Hello everyone,

i noticed that some makefile try to call a secondary script using the syntax ./myscript.sh

but this fail

sometime i get an error as follow "cannot open ./myscript for reading"


there's a way correct this problem?

Thank you very much

Retired
Go to top
Re: Executing a secondary script from within a makefile
Home away from home
Home away from home


See User information
@AmigaBlitter,

Make sure that you are using gmake not make or that SHELL=sh is set in the makefile if using make.

Make sure ./myscript.sh is in the path. (abc-shell PATH that is as cntaing in the variable PATH)

Make sure it actually readable, and executable ie the r bit is set. (on the user and group parts too,)

chmod 0755 ./myscript.sh should sort that out if it isn't.






Go to top
Re: Executing a secondary script from within a makefile
Quite a regular
Quite a regular


See User information
Thank you for the reply.

I used gmake. As per the command used in the makefile is $(SHELL)./myscript.
Should i modify all the $(SHELL) commands in the various makefile?

thank you

Retired
Go to top
Re: Executing a secondary script from within a makefile
Home away from home
Home away from home


See User information
@AmigaBlitter

Can you show us the real line from the makefile that fails and then do a list or / ls for the scriptfile?

Otherwise it's really hard to give advice or help that's accurate.


Edited by broadblues on 2017/2/26 20:30:11
Go to top
Re: Executing a secondary script from within a makefile
Quite a regular
Quite a regular


See User information
I tried to set the SHELL command as sh, but this haven't solved the issue. I think the problem is the interpretation of the ./ chars.

if i set SHELL=sh are this value kept in the other script eventually called by the makefile?
I'm going to do other test.

Retired
Go to top
Re: Executing a secondary script from within a makefile
Home away from home
Home away from home


See User information
@AmigaBlitter

If you use gmake that assignment SHELL=sh is already made.

./ is perfectly valid if running under sh.

if sh is reporting a script as unreadable (as opposed to "Not found" or similar) then it's likely that's what the issue is. Which is why I asked you to list the external script, to get info on it.

One thought if there is a submake involved make sure thgat MAKE isn't set to make anywhere.


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-2023 The XOOPS Project