I have a question about makefile (not talking about Linux shell or bash here). What is the difference between semicolon and double ampersand in a make file?
On the first computer, the following works:
cd code; ant clean compile jar run
On the second computer, the above doesn't work while the below works:
cd code && ant clean compile jar run
The above code is inside the file called "makefile". I want to know the difference between '&&' and ';'.
Thanks
Note: My error message for semicolon on second computer is
cd code; ant clean compile jar run
The system cannot find the path specified.
make: *** [runant] Error 1
see https://serverfault.com/a/373053/85018 for a good explanation:
The ; just separates one command from another. The && says only run the following command if the previous was successful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With