Command that exits with zero status (not /bin/true)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
11
down vote

favorite












I've got a Makefile that runs a tool that takes a little while; it allows me to replace the command used:



make TOOL=alternative-tool


I'd like to skip that step in the Makefile, so I'm looking for a command that exits with status 0, and that has negligible side-effects.



Obviously, I could just use true, but that's kinda confusing:



make TOOL=true


That reads as if I want to run the tool, but I don't.



Is there a default-installed executable that isn't /bin/true that exits with status 0, and that has a catchy and easy to type name?







share|improve this question






















  • Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
    – Freiheit
    Apr 20 at 18:33






  • 1




    What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
    – Roger Lipscombe
    Apr 20 at 18:45














up vote
11
down vote

favorite












I've got a Makefile that runs a tool that takes a little while; it allows me to replace the command used:



make TOOL=alternative-tool


I'd like to skip that step in the Makefile, so I'm looking for a command that exits with status 0, and that has negligible side-effects.



Obviously, I could just use true, but that's kinda confusing:



make TOOL=true


That reads as if I want to run the tool, but I don't.



Is there a default-installed executable that isn't /bin/true that exits with status 0, and that has a catchy and easy to type name?







share|improve this question






















  • Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
    – Freiheit
    Apr 20 at 18:33






  • 1




    What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
    – Roger Lipscombe
    Apr 20 at 18:45












up vote
11
down vote

favorite









up vote
11
down vote

favorite











I've got a Makefile that runs a tool that takes a little while; it allows me to replace the command used:



make TOOL=alternative-tool


I'd like to skip that step in the Makefile, so I'm looking for a command that exits with status 0, and that has negligible side-effects.



Obviously, I could just use true, but that's kinda confusing:



make TOOL=true


That reads as if I want to run the tool, but I don't.



Is there a default-installed executable that isn't /bin/true that exits with status 0, and that has a catchy and easy to type name?







share|improve this question














I've got a Makefile that runs a tool that takes a little while; it allows me to replace the command used:



make TOOL=alternative-tool


I'd like to skip that step in the Makefile, so I'm looking for a command that exits with status 0, and that has negligible side-effects.



Obviously, I could just use true, but that's kinda confusing:



make TOOL=true


That reads as if I want to run the tool, but I don't.



Is there a default-installed executable that isn't /bin/true that exits with status 0, and that has a catchy and easy to type name?









share|improve this question













share|improve this question




share|improve this question








edited Apr 20 at 18:15

























asked Apr 19 at 11:34









Roger Lipscombe

17210




17210











  • Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
    – Freiheit
    Apr 20 at 18:33






  • 1




    What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
    – Roger Lipscombe
    Apr 20 at 18:45
















  • Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
    – Freiheit
    Apr 20 at 18:33






  • 1




    What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
    – Roger Lipscombe
    Apr 20 at 18:45















Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
– Freiheit
Apr 20 at 18:33




Makefiles support comments, gnu.org/software/make/manual/html_node/Makefile-Contents.html . Put a comment before the line and document your code. That reduces confusion and explains why you used a certain approach.
– Freiheit
Apr 20 at 18:33




1




1




What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
– Roger Lipscombe
Apr 20 at 18:45




What line? The TOOL=true will be on the command line when invoking make, probably documented in a README nearby. The actual line that invokes the tool is somewhere within a 7000-line (third party) makefile.
– Roger Lipscombe
Apr 20 at 18:45










5 Answers
5






active

oldest

votes

















up vote
42
down vote



accepted










Even though you've asked for something that is "not /bin/true", replacing true with the full name /bin/true to show that it is the true program rather than some other meaning of "true" is probably the best solution.



Your concern is that the true in



make TOOL=true


appears to be something other than a command name. But if you write



make TOOL=/bin/true


then that is unambiguously a command. Somebody might misread TOOL=true to mean that some other tool somewhere is intended, but no such misreading of TOOL=/bin/true is likely.




I am unsure as to when :, which is a shell builtin but not an external command, will work. Henning Makholm has reported that it appears to work. But I think it does not work in all situations, and you found that it did not work for you.



As for a shell alias, you cannot use that because alias expansion is not performed in the arguments you pass to a command, nor do makefiles make any use of previously defined shell aliases. Even if make runs your commands in a new shell, that shell will not have the alias (and would not use it even if it did have it, because it would be a noninteractive shell, where alias expansion is not automatically enabled).






share|improve this answer


















  • 1




    Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
    – Henning Makholm
    Apr 19 at 12:49











  • @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
    – Eliah Kagan
    Apr 19 at 13:04







  • 2




    Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
    – Roger Lipscombe
    Apr 19 at 14:22


















up vote
9
down vote













While I agree that using the full path to true would be the best solution, I'd like to note what's probably by far the most common way to avoid real command execution: sticking an echo in front of it. So:



make TOOL=echo





share|improve this answer




















  • I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
    – Eliah Kagan
    Apr 19 at 15:23










  • (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
    – muru
    Apr 19 at 15:57

















up vote
6
down vote













You can always make your own command that does nothing but return a zero exit status. Some options:



  • an appropriately named symbolic link to /bin/true


  • an empty shell script



  • a nearly empty C program:



    int main() 
    return 0;







share|improve this answer




















  • A good name for such a program would be noop or no-op.
    – arp
    Apr 20 at 22:15

















up vote
0
down vote













Create a symbolic link in the working directory to /bin/true named something like skip. Thus...



skip -> /bin/true


Then the make line can be ...



make TOOL=./skip





share|improve this answer



























    up vote
    -2
    down vote













    Here's a way to do it with slightly more characters:



    function T() /bin/true; 


    After you've done it once you can re-execute it just by using the name T.



    false; T; echo $?





    share|improve this answer


















    • 3




      Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
      – David Foerster
      Apr 20 at 22:17











    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026369%2fcommand-that-exits-with-zero-status-not-bin-true%23new-answer', 'question_page');

    );

    Post as a guest






























    5 Answers
    5






    active

    oldest

    votes








    5 Answers
    5






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    42
    down vote



    accepted










    Even though you've asked for something that is "not /bin/true", replacing true with the full name /bin/true to show that it is the true program rather than some other meaning of "true" is probably the best solution.



    Your concern is that the true in



    make TOOL=true


    appears to be something other than a command name. But if you write



    make TOOL=/bin/true


    then that is unambiguously a command. Somebody might misread TOOL=true to mean that some other tool somewhere is intended, but no such misreading of TOOL=/bin/true is likely.




    I am unsure as to when :, which is a shell builtin but not an external command, will work. Henning Makholm has reported that it appears to work. But I think it does not work in all situations, and you found that it did not work for you.



    As for a shell alias, you cannot use that because alias expansion is not performed in the arguments you pass to a command, nor do makefiles make any use of previously defined shell aliases. Even if make runs your commands in a new shell, that shell will not have the alias (and would not use it even if it did have it, because it would be a noninteractive shell, where alias expansion is not automatically enabled).






    share|improve this answer


















    • 1




      Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
      – Henning Makholm
      Apr 19 at 12:49











    • @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
      – Eliah Kagan
      Apr 19 at 13:04







    • 2




      Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
      – Roger Lipscombe
      Apr 19 at 14:22















    up vote
    42
    down vote



    accepted










    Even though you've asked for something that is "not /bin/true", replacing true with the full name /bin/true to show that it is the true program rather than some other meaning of "true" is probably the best solution.



    Your concern is that the true in



    make TOOL=true


    appears to be something other than a command name. But if you write



    make TOOL=/bin/true


    then that is unambiguously a command. Somebody might misread TOOL=true to mean that some other tool somewhere is intended, but no such misreading of TOOL=/bin/true is likely.




    I am unsure as to when :, which is a shell builtin but not an external command, will work. Henning Makholm has reported that it appears to work. But I think it does not work in all situations, and you found that it did not work for you.



    As for a shell alias, you cannot use that because alias expansion is not performed in the arguments you pass to a command, nor do makefiles make any use of previously defined shell aliases. Even if make runs your commands in a new shell, that shell will not have the alias (and would not use it even if it did have it, because it would be a noninteractive shell, where alias expansion is not automatically enabled).






    share|improve this answer


















    • 1




      Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
      – Henning Makholm
      Apr 19 at 12:49











    • @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
      – Eliah Kagan
      Apr 19 at 13:04







    • 2




      Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
      – Roger Lipscombe
      Apr 19 at 14:22













    up vote
    42
    down vote



    accepted







    up vote
    42
    down vote



    accepted






    Even though you've asked for something that is "not /bin/true", replacing true with the full name /bin/true to show that it is the true program rather than some other meaning of "true" is probably the best solution.



    Your concern is that the true in



    make TOOL=true


    appears to be something other than a command name. But if you write



    make TOOL=/bin/true


    then that is unambiguously a command. Somebody might misread TOOL=true to mean that some other tool somewhere is intended, but no such misreading of TOOL=/bin/true is likely.




    I am unsure as to when :, which is a shell builtin but not an external command, will work. Henning Makholm has reported that it appears to work. But I think it does not work in all situations, and you found that it did not work for you.



    As for a shell alias, you cannot use that because alias expansion is not performed in the arguments you pass to a command, nor do makefiles make any use of previously defined shell aliases. Even if make runs your commands in a new shell, that shell will not have the alias (and would not use it even if it did have it, because it would be a noninteractive shell, where alias expansion is not automatically enabled).






    share|improve this answer














    Even though you've asked for something that is "not /bin/true", replacing true with the full name /bin/true to show that it is the true program rather than some other meaning of "true" is probably the best solution.



    Your concern is that the true in



    make TOOL=true


    appears to be something other than a command name. But if you write



    make TOOL=/bin/true


    then that is unambiguously a command. Somebody might misread TOOL=true to mean that some other tool somewhere is intended, but no such misreading of TOOL=/bin/true is likely.




    I am unsure as to when :, which is a shell builtin but not an external command, will work. Henning Makholm has reported that it appears to work. But I think it does not work in all situations, and you found that it did not work for you.



    As for a shell alias, you cannot use that because alias expansion is not performed in the arguments you pass to a command, nor do makefiles make any use of previously defined shell aliases. Even if make runs your commands in a new shell, that shell will not have the alias (and would not use it even if it did have it, because it would be a noninteractive shell, where alias expansion is not automatically enabled).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 19 at 15:26

























    answered Apr 19 at 11:46









    Eliah Kagan

    79.5k20221359




    79.5k20221359







    • 1




      Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
      – Henning Makholm
      Apr 19 at 12:49











    • @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
      – Eliah Kagan
      Apr 19 at 13:04







    • 2




      Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
      – Roger Lipscombe
      Apr 19 at 14:22













    • 1




      Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
      – Henning Makholm
      Apr 19 at 12:49











    • @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
      – Eliah Kagan
      Apr 19 at 13:04







    • 2




      Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
      – Roger Lipscombe
      Apr 19 at 14:22








    1




    1




    Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
    – Henning Makholm
    Apr 19 at 12:49





    Using : seems to work fine for me. make always spawns a shell to run each command after it's done its own substitutions.
    – Henning Makholm
    Apr 19 at 12:49













    @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
    – Eliah Kagan
    Apr 19 at 13:04





    @HenningMakholm Thanks, I've edited. You may want to post an answer. Lok Lam Cheng had commented on the question to suggest :, but it should be an answer (especially if correct) and that comment doesn't explain why one should expect it to work. In a directory with hello.c and no makefile, where make hello compiles hello.c to hello, I found make CC=: hello behaved according to what you are saying.
    – Eliah Kagan
    Apr 19 at 13:04





    2




    2




    Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
    – Roger Lipscombe
    Apr 19 at 14:22





    Unfortunately, for this particular Makefile (it uses erlang.mk), using : doesn't work. Being explicit about /bin/true is probably the best way to do it.
    – Roger Lipscombe
    Apr 19 at 14:22













    up vote
    9
    down vote













    While I agree that using the full path to true would be the best solution, I'd like to note what's probably by far the most common way to avoid real command execution: sticking an echo in front of it. So:



    make TOOL=echo





    share|improve this answer




















    • I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
      – Eliah Kagan
      Apr 19 at 15:23










    • (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
      – muru
      Apr 19 at 15:57














    up vote
    9
    down vote













    While I agree that using the full path to true would be the best solution, I'd like to note what's probably by far the most common way to avoid real command execution: sticking an echo in front of it. So:



    make TOOL=echo





    share|improve this answer




















    • I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
      – Eliah Kagan
      Apr 19 at 15:23










    • (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
      – muru
      Apr 19 at 15:57












    up vote
    9
    down vote










    up vote
    9
    down vote









    While I agree that using the full path to true would be the best solution, I'd like to note what's probably by far the most common way to avoid real command execution: sticking an echo in front of it. So:



    make TOOL=echo





    share|improve this answer












    While I agree that using the full path to true would be the best solution, I'd like to note what's probably by far the most common way to avoid real command execution: sticking an echo in front of it. So:



    make TOOL=echo






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 19 at 14:49









    muru

    129k19272462




    129k19272462











    • I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
      – Eliah Kagan
      Apr 19 at 15:23










    • (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
      – muru
      Apr 19 at 15:57
















    • I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
      – Eliah Kagan
      Apr 19 at 15:23










    • (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
      – muru
      Apr 19 at 15:57















    I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
    – Eliah Kagan
    Apr 19 at 15:23




    I think this is sometimes useful when it's important one be reminded that one suppressed whatever action TOOL would otherwise do. Without -s or equivalent, make emits redundant information, because both make and the echo command run by make separately emit output. For example, when I run make CC=echo hello in a directory that has hello.c and no makefile, I get echo hello.c -o hello as the first line of output and hello.c -o hello as the second. But some builds use (or the user may add) -s, and then it's helpful. make -s CC=echo hello gives just hello.c -o hello.
    – Eliah Kagan
    Apr 19 at 15:23












    (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
    – muru
    Apr 19 at 15:57




    (which might still be useful if the commands involve shell expansions, so you can get a clearer idea of what's being run, if interested)
    – muru
    Apr 19 at 15:57










    up vote
    6
    down vote













    You can always make your own command that does nothing but return a zero exit status. Some options:



    • an appropriately named symbolic link to /bin/true


    • an empty shell script



    • a nearly empty C program:



      int main() 
      return 0;







    share|improve this answer




















    • A good name for such a program would be noop or no-op.
      – arp
      Apr 20 at 22:15














    up vote
    6
    down vote













    You can always make your own command that does nothing but return a zero exit status. Some options:



    • an appropriately named symbolic link to /bin/true


    • an empty shell script



    • a nearly empty C program:



      int main() 
      return 0;







    share|improve this answer




















    • A good name for such a program would be noop or no-op.
      – arp
      Apr 20 at 22:15












    up vote
    6
    down vote










    up vote
    6
    down vote









    You can always make your own command that does nothing but return a zero exit status. Some options:



    • an appropriately named symbolic link to /bin/true


    • an empty shell script



    • a nearly empty C program:



      int main() 
      return 0;







    share|improve this answer












    You can always make your own command that does nothing but return a zero exit status. Some options:



    • an appropriately named symbolic link to /bin/true


    • an empty shell script



    • a nearly empty C program:



      int main() 
      return 0;








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 19 at 15:17









    David Foerster

    26.1k1361106




    26.1k1361106











    • A good name for such a program would be noop or no-op.
      – arp
      Apr 20 at 22:15
















    • A good name for such a program would be noop or no-op.
      – arp
      Apr 20 at 22:15















    A good name for such a program would be noop or no-op.
    – arp
    Apr 20 at 22:15




    A good name for such a program would be noop or no-op.
    – arp
    Apr 20 at 22:15










    up vote
    0
    down vote













    Create a symbolic link in the working directory to /bin/true named something like skip. Thus...



    skip -> /bin/true


    Then the make line can be ...



    make TOOL=./skip





    share|improve this answer
























      up vote
      0
      down vote













      Create a symbolic link in the working directory to /bin/true named something like skip. Thus...



      skip -> /bin/true


      Then the make line can be ...



      make TOOL=./skip





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Create a symbolic link in the working directory to /bin/true named something like skip. Thus...



        skip -> /bin/true


        Then the make line can be ...



        make TOOL=./skip





        share|improve this answer












        Create a symbolic link in the working directory to /bin/true named something like skip. Thus...



        skip -> /bin/true


        Then the make line can be ...



        make TOOL=./skip






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 24 at 22:07









        DocSalvager

        4351614




        4351614




















            up vote
            -2
            down vote













            Here's a way to do it with slightly more characters:



            function T() /bin/true; 


            After you've done it once you can re-execute it just by using the name T.



            false; T; echo $?





            share|improve this answer


















            • 3




              Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
              – David Foerster
              Apr 20 at 22:17















            up vote
            -2
            down vote













            Here's a way to do it with slightly more characters:



            function T() /bin/true; 


            After you've done it once you can re-execute it just by using the name T.



            false; T; echo $?





            share|improve this answer


















            • 3




              Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
              – David Foerster
              Apr 20 at 22:17













            up vote
            -2
            down vote










            up vote
            -2
            down vote









            Here's a way to do it with slightly more characters:



            function T() /bin/true; 


            After you've done it once you can re-execute it just by using the name T.



            false; T; echo $?





            share|improve this answer














            Here's a way to do it with slightly more characters:



            function T() /bin/true; 


            After you've done it once you can re-execute it just by using the name T.



            false; T; echo $?






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 20 at 22:20









            wjandrea

            7,16342255




            7,16342255










            answered Apr 20 at 18:08









            Lee B

            1




            1







            • 3




              Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
              – David Foerster
              Apr 20 at 22:17













            • 3




              Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
              – David Foerster
              Apr 20 at 22:17








            3




            3




            Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
            – David Foerster
            Apr 20 at 22:17





            Could you please explain how this function can be invoked from a Make variable value (to be of use in the situation in question)?
            – David Foerster
            Apr 20 at 22:17


















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026369%2fcommand-that-exits-with-zero-status-not-bin-true%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            Trouble downloading packages list due to a “Hash sum mismatch” error