Previous Thread
Next Thread
Print Thread
#108634 - 01/26/17 02:37 PM Should I "make clean"?  
Joined: Nov 2016
Posts: 9
dingodan Offline
Member
dingodan  Offline
Member

Joined: Nov 2016
Posts: 9
I'm a bit new to compiling stuff in general, and can't tell from the docs if "make clean" is needed. I've scheduled a monthly bash script to build the latest version of mame for me from a cloned, updated copy of the git repo.

Is this step needed/recommended?

Code:
latesttag=$(git describe --tags)
echo checking out ${latesttag} > make_log
git fetch >> make_log
git checkout ${latesttag} >> make_log
make clean >> make_log
make -j3 >> make_log

#108635 - 01/26/17 02:59 PM Re: Should I "make clean"? [Re: dingodan]  
Joined: Feb 2004
Posts: 1,739
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,739
Sydney, Australia
If you're doing a full build once a month, you're better off just deleting the entire build folder before running the build to ensure you have a completely clean state. Also, I'm not quite sure what the good of doing a describe before the fetch is. You'd be better off doing something like:
Code:
rm -r build > make_log 2>&1
git fetch >> make_log 2>&1
latesttag=$(git tag | tail -1)
echo "checking out ${latesttag}" >> make_log
git checkout ${latesttag} >> make_log 2>&1
make -j3 >> make_log 2>&1

#108638 - 01/26/17 03:44 PM Re: Should I "make clean"? [Re: dingodan]  
Joined: Nov 2016
Posts: 9
dingodan Offline
Member
dingodan  Offline
Member

Joined: Nov 2016
Posts: 9
Done. Thank you Vas, and happy australia day! smile


Moderated by  R. Belmont 

Who's Online Now
5 registered members (zillion, AJR, Breiztiger, JonasP, 1 invisible), 24 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,307
Posts107,341
Members4,731
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.044s Queries: 14 (0.008s) Memory: 4.9401 MB (Peak: 5.1314 MB) Zlib enabled. Server Time: 2017-03-24 21:54:14 UTC