SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
make -j6 || make || exit 1
make install DESTDIR=$PKG || exit 1
If I understand the "||" in a bash script, it seems that "make" would be
executed twice. Am I wrong or is this a typo?
If it is, whom should I tell?
From the bash man page:
Code:
command1 || command2
command2 is executed if and only if command1 returns a non-zero exit
status. The return status of AND and OR lists is the exit status of
the last command executed in the list.
make will be executed if 'make -j6' fails, else the command stops and goes to next command line (make install...)
OK. I think I understand. If 'make -j6' succeeds, neither the
subsequent 'make' nor the 'exit 1' will be executed. right?
This is the first time I've seen this in a SlackBuild.
this has been added in as a variable: NUMJOBS=${NUMJOBS:--j6}. I have added this setting to my personal slackbuilds and I have seen amazing speed differences in compiling times, particularly in such software as the svn MPlayer.
I think if "make -j6" fail, it means that the project may has some problem with parallel making. So trying a single make may solve the problem. But if "make" failed eventually, there must be something wrong here, so it will exit.
I think if "make -j6" fail, it means that the project may has some problem with parallel making. So trying a single make may solve the problem. But if "make" failed eventually, there must be something wrong here, so it will exit.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.