Find the answer to your Linux question:
Results 1 to 2 of 2
SOLVED hello all, i want to define variables and use them in makefiles, submakefiles and in shellscripts called by the makefile. what is a nice way to do this? for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    2

    using variables in shell scripts as in makefiles


    SOLVED


    hello all,

    i want to define variables and use them in makefiles, submakefiles and in shellscripts called by the makefile. what is a nice way to do this?
    for example my "master"makefile call a target with make -c ./nextdir in this directory is an additional makefile and this use the variables. this makefile calls a shellscripts and this should use the variables also. i tried export in the beginning of the master makefile but then the variables are only available in the makefiles and not in the shellscript, source seems also not working. has somebody an idea to solve this?

    greetings,
    michael
    Last edited by devil69; 06-16-2011 at 02:34 PM.

  2. #2
    Just Joined!
    Join Date
    Jun 2011
    Posts
    2
    Quote Originally Posted by devil69 View Post
    hello all,

    i want to define variables and use them in makefiles, submakefiles and in shellscripts called by the makefile. what is a nice way to do this?
    for example my "master"makefile call a target with make -c ./nextdir in this directory is an additional makefile and this use the variables. this makefile calls a shellscripts and this should use the variables also. i tried export in the beginning of the master makefile but then the variables are only available in the makefiles and not in the shellscript, source seems also not working. has somebody an idea to solve this?

    greetings,
    michael
    ok, export with := solve the problem, after this the variable is available in submakefiles as in shellscripts,

    thanks to everyone

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •