How to run an executable in a different dir when running make command in root dir?How do I write the 'cd' command in a makefile?Task 'assembleRelease' not found in root project 'android'Android error: Failed to install *.apk on device *: timeoutDoes anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?Android failed to load JS bundleBuild and Install unsigned apk on device without the development server?react-native compiled apk wont run on deviceUnable to load script from assets index.android.bundle on windowsUnable to load script from assets 'index.android.bundle'.how fix Execution failed for task ':react-native-smart-splashscreen:verifyReleaseResources'react-native assembleRelease can't generate app-release.apkCrash: tid:com.facebook.react.WebSocketModuleQueue RCTSRWebSocket.m SocketRocket: In debug mode. Allowing connection to any root cert

What's the polite way to say "I need to urinate"?

Pass By Reference VS Pass by Value

simple conditions equation

Term for maladaptive animal behavior that will lead to their demise?

What does KSP mean?

US visa is under administrative processing, I need the passport back ASAP

What is the relationship between spectral sequences and obstruction theory?

How to type a section sign (§) into the Minecraft client

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Checks user level and limit the data before saving it to mongoDB

Are Boeing 737-800’s grounded?

What is the difference between `command a[bc]d` and `command `ab,cd`

How can the Zone of Truth spell be defeated without the caster knowing?

How to creep the reader out with what seems like a normal person?

Packing rectangles: Does rotation ever help?

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Do I have an "anti-research" personality?

Does the sign matter for proportionality?

Why isn't the definition of absolute value applied when squaring a radical containing a variable?

How to solve constants out of the internal energy equation?

What makes accurate emulation of old systems a difficult task?

Is there a way to get a compiler for the original B programming language?

Was there a Viking Exchange as well as a Columbian one?

how to sum variables from file in bash



How to run an executable in a different dir when running make command in root dir?


How do I write the 'cd' command in a makefile?Task 'assembleRelease' not found in root project 'android'Android error: Failed to install *.apk on device *: timeoutDoes anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?Android failed to load JS bundleBuild and Install unsigned apk on device without the development server?react-native compiled apk wont run on deviceUnable to load script from assets index.android.bundle on windowsUnable to load script from assets 'index.android.bundle'.how fix Execution failed for task ':react-native-smart-splashscreen:verifyReleaseResources'react-native assembleRelease can't generate app-release.apkCrash: tid:com.facebook.react.WebSocketModuleQueue RCTSRWebSocket.m SocketRocket: In debug mode. Allowing connection to any root cert






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















Bit of a noob question but I'm building an app in react native and to make development a bit faster I'm using a make file for arbitrary commands. I need to run an executable in a sub-directory but can't get this to work while using the Makefile command.



The command works when I cd into the directory then run it but this doesn't work when I use the exact same commands for the make command and I'm sure there's a one line answer to this somewhere but I haven't been able to find it.



Doing this works



user@device:~/project$ cd android
user@device:~/project/android$ ./gradlew assembleRelease


but having it in the makefile like so doesn't



///////// Start of Makefile /////
apk:
cd android/
./gradlew assembleRelease

///// End of file ///////

user@device:~/project$ make apk









share|improve this question






























    1















    Bit of a noob question but I'm building an app in react native and to make development a bit faster I'm using a make file for arbitrary commands. I need to run an executable in a sub-directory but can't get this to work while using the Makefile command.



    The command works when I cd into the directory then run it but this doesn't work when I use the exact same commands for the make command and I'm sure there's a one line answer to this somewhere but I haven't been able to find it.



    Doing this works



    user@device:~/project$ cd android
    user@device:~/project/android$ ./gradlew assembleRelease


    but having it in the makefile like so doesn't



    ///////// Start of Makefile /////
    apk:
    cd android/
    ./gradlew assembleRelease

    ///// End of file ///////

    user@device:~/project$ make apk









    share|improve this question


























      1












      1








      1








      Bit of a noob question but I'm building an app in react native and to make development a bit faster I'm using a make file for arbitrary commands. I need to run an executable in a sub-directory but can't get this to work while using the Makefile command.



      The command works when I cd into the directory then run it but this doesn't work when I use the exact same commands for the make command and I'm sure there's a one line answer to this somewhere but I haven't been able to find it.



      Doing this works



      user@device:~/project$ cd android
      user@device:~/project/android$ ./gradlew assembleRelease


      but having it in the makefile like so doesn't



      ///////// Start of Makefile /////
      apk:
      cd android/
      ./gradlew assembleRelease

      ///// End of file ///////

      user@device:~/project$ make apk









      share|improve this question
















      Bit of a noob question but I'm building an app in react native and to make development a bit faster I'm using a make file for arbitrary commands. I need to run an executable in a sub-directory but can't get this to work while using the Makefile command.



      The command works when I cd into the directory then run it but this doesn't work when I use the exact same commands for the make command and I'm sure there's a one line answer to this somewhere but I haven't been able to find it.



      Doing this works



      user@device:~/project$ cd android
      user@device:~/project/android$ ./gradlew assembleRelease


      but having it in the makefile like so doesn't



      ///////// Start of Makefile /////
      apk:
      cd android/
      ./gradlew assembleRelease

      ///// End of file ///////

      user@device:~/project$ make apk






      android react-native makefile terminal






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 at 18:08







      ya_boi

















      asked Mar 22 at 18:25









      ya_boiya_boi

      84




      84






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Why not just use android/gradlew assembleRelease?



          There is some good info elsewhere on SO about why commands like cd won't work as expected in a makefile.






          share|improve this answer























          • assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

            – ya_boi
            Mar 22 at 18:55












          • more potentially related stuff: stackoverflow.com/questions/51397363/…

            – Kai
            Mar 22 at 19:08











          • That did it, thanks for that!

            – ya_boi
            Mar 22 at 20:23











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305762%2fhow-to-run-an-executable-in-a-different-dir-when-running-make-command-in-root-di%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Why not just use android/gradlew assembleRelease?



          There is some good info elsewhere on SO about why commands like cd won't work as expected in a makefile.






          share|improve this answer























          • assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

            – ya_boi
            Mar 22 at 18:55












          • more potentially related stuff: stackoverflow.com/questions/51397363/…

            – Kai
            Mar 22 at 19:08











          • That did it, thanks for that!

            – ya_boi
            Mar 22 at 20:23















          0














          Why not just use android/gradlew assembleRelease?



          There is some good info elsewhere on SO about why commands like cd won't work as expected in a makefile.






          share|improve this answer























          • assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

            – ya_boi
            Mar 22 at 18:55












          • more potentially related stuff: stackoverflow.com/questions/51397363/…

            – Kai
            Mar 22 at 19:08











          • That did it, thanks for that!

            – ya_boi
            Mar 22 at 20:23













          0












          0








          0







          Why not just use android/gradlew assembleRelease?



          There is some good info elsewhere on SO about why commands like cd won't work as expected in a makefile.






          share|improve this answer













          Why not just use android/gradlew assembleRelease?



          There is some good info elsewhere on SO about why commands like cd won't work as expected in a makefile.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 22 at 18:39









          KaiKai

          1,6051920




          1,6051920












          • assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

            – ya_boi
            Mar 22 at 18:55












          • more potentially related stuff: stackoverflow.com/questions/51397363/…

            – Kai
            Mar 22 at 19:08











          • That did it, thanks for that!

            – ya_boi
            Mar 22 at 20:23

















          • assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

            – ya_boi
            Mar 22 at 18:55












          • more potentially related stuff: stackoverflow.com/questions/51397363/…

            – Kai
            Mar 22 at 19:08











          • That did it, thanks for that!

            – ya_boi
            Mar 22 at 20:23
















          assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

          – ya_boi
          Mar 22 at 18:55






          assembleRelease is also in the android directory and whenever I run the command I get this error Task 'android/assembleRelease' not found in root project I thought as much when I was putting cd into the Makefile that I was definitely doing something wrong but I'm stumped as to how to reference both the executable and the file I'm passing to it.

          – ya_boi
          Mar 22 at 18:55














          more potentially related stuff: stackoverflow.com/questions/51397363/…

          – Kai
          Mar 22 at 19:08





          more potentially related stuff: stackoverflow.com/questions/51397363/…

          – Kai
          Mar 22 at 19:08













          That did it, thanks for that!

          – ya_boi
          Mar 22 at 20:23





          That did it, thanks for that!

          – ya_boi
          Mar 22 at 20:23



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305762%2fhow-to-run-an-executable-in-a-different-dir-when-running-make-command-in-root-di%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript