Unix Technical Forum

can you delete src after compile?

This is a discussion on can you delete src after compile? within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, I was wondering if, when you download the source of a program, you can unzip the source to ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 06:54 AM
Nico
 
Posts: n/a
Default can you delete src after compile?

Hi,
I was wondering if, when you download the source of a program, you can unzip
the source to a temporary directory, then compile it and then delete the
source.

Nico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 06:55 AM
Peter T. Breuer
 
Posts: n/a
Default Re: can you delete src after compile?

Nico <nicotroostnospam@hotmail.com> wrote:
> I was wondering if, when you download the source of a program, you can unzip
> the source to a temporary directory, then compile it and then delete the
> source.


And what exactly are you wondering about? Surely it suffices for you to
try it in order to see if it is possible or not? Where do you imagine
the difficulty lies?

Puzzled. It's like asking "I was wondering if it is possible to walk two
steps over there". Surely it is quicker to try it than to ask?

Very strange (shakes head).

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 06:55 AM
mjt
 
Posts: n/a
Default Re: can you delete src after compile?

Nico wrote:

> I was wondering if, when you download the source of a program, you can unzip
> the source to a temporary directory, then compile it and then delete the
> source.



.... "man rm"
--
<<***http://michaeljtobler.homelinux.com/***>>
Acid -- better living through chemistry.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 06:55 AM
Jean-David Beyer
 
Posts: n/a
Default Re: can you delete src after compile?

Nico wrote:
> Hi,
> I was wondering if, when you download the source of a program, you can unzip
> the source to a temporary directory, then compile it and then delete the
> source.
>
> Nico


If you are so short of disk space that you must consider deleting source
files, you may find that it would be more profitable to delete the cache
file from your web browser instead. This may allow you to operate your
computer for a few more days until the new hard drive, that I assume you
have already ordered, to be delivered and installed.

If you wish to use a debugger, such as gdb, to debug that program, you
will find it a lot more useful if the source file is still around.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 10:55:00 up 7 days, 13:36, 3 users, load average: 4.12, 4.19, 4.22

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 06:55 AM
Nico
 
Posts: n/a
Default Re: can you delete src after compile?

mjt wrote:

> Nico wrote:
>
>> I was wondering if, when you download the source of a program, you can
>> unzip the source to a temporary directory, then compile it and then
>> delete the source.

>
>
> ... "man rm"



Sorry for not being to clear, but what i mean is: are there files in the
source directory that the program needs to run correctly, or are the files
copied/moved to another directory (like the executable is placed in the bin
directory)?

Nico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 06:55 AM
Jules
 
Posts: n/a
Default Re: can you delete src after compile?

On Fri, 10 Dec 2004 16:19:20 +0100, Nico wrote:

> Hi,
> I was wondering if, when you download the source of a program, you can unzip
> the source to a temporary directory, then compile it and then delete the
> source.


Yep, no problems there. Usually you'll run 'make' to actually compile the
binary - at which point it'll still be within the directory tree where
you unzipped the source - then you'll run 'make install' to actually move
the binary somewhere useful within the filesystem (eg. somewhere within
the shell's search path) as well as installing any man pages etc. that may
be within the source.

After doing that it's safe to delete the source, unless you have any real
need to keep it around. Deleting it won't harm the program. I tend to
delete source but keep the downloaded archives source files around in
case I happen to ever need to rebuild the program; saves me having to
download again.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 06:55 AM
mjt
 
Posts: n/a
Default Re: can you delete src after compile?

Nico wrote:

> *Sorry*for*not*being*to*clear,*but*what*i*mean*is: *are*there*files*in*the
> source directory that the program needs to run correctly, or are the files
> copied/moved to another directory (like the executable is placed in the bin
> directory)?



..... as a rule, "make install" moves the binary
and supporting files to their required location.
after that, you can delete the sources
--
<<***http://michaeljtobler.homelinux.com/***>>
God gives us relatives; thank goodness we can choose our friends.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 06:55 AM
Jean-David Beyer
 
Posts: n/a
Default Re: can you delete src after compile?

Jules wrote:
> On Fri, 10 Dec 2004 16:19:20 +0100, Nico wrote:
>
>
>>Hi,
>>I was wondering if, when you download the source of a program, you can unzip
>>the source to a temporary directory, then compile it and then delete the
>>source.

>
>
> Yep, no problems there. Usually you'll run 'make' to actually compile the
> binary - at which point it'll still be within the directory tree where
> you unzipped the source - then you'll run 'make install' to actually move
> the binary somewhere useful within the filesystem (eg. somewhere within
> the shell's search path) as well as installing any man pages etc. that may
> be within the source.


After _make install_, I tend to run _make clean_ that removes the .o and
such files, reducing the space consumed.
>
> After doing that it's safe to delete the source, unless you have any real
> need to keep it around. Deleting it won't harm the program. I tend to
> delete source but keep the downloaded archives source files around in
> case I happen to ever need to rebuild the program; saves me having to
> download again.
>


Sometimes if you get an updated version of the libraries, you may need to
recompile. Then it is nice to keep the source on hand.

I also keep the source archives as long as I run the objects.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 11:35:00 up 7 days, 14:16, 3 users, load average: 4.15, 4.17, 4.17

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 06:55 AM
Peter T. Breuer
 
Posts: n/a
Default Re: can you delete src after compile?

Nico <nicotroostnospam@hotmail.com> wrote:
> Sorry for not being to clear, but what i mean is: are there files in the
> source directory that the program needs to run correctly,


No - they're source, not target.

> or are the files
> copied/moved to another directory (like the executable is placed in the bin
> directory)?


That is what "installation" means.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 06:55 AM
Nico
 
Posts: n/a
Default Re: can you delete src after compile?

Jean-David Beyer wrote:

> Jules wrote:
>> On Fri, 10 Dec 2004 16:19:20 +0100, Nico wrote:
>>
>>
>>>Hi,
>>>I was wondering if, when you download the source of a program, you can
>>>unzip the source to a temporary directory, then compile it and then
>>>delete the source.

>>
>>
>> Yep, no problems there. Usually you'll run 'make' to actually compile the
>> binary - at which point it'll still be within the directory tree where
>> you unzipped the source - then you'll run 'make install' to actually move
>> the binary somewhere useful within the filesystem (eg. somewhere within
>> the shell's search path) as well as installing any man pages etc. that
>> may be within the source.

>
> After _make install_, I tend to run _make clean_ that removes the .o and
> such files, reducing the space consumed.
>>
>> After doing that it's safe to delete the source, unless you have any real
>> need to keep it around. Deleting it won't harm the program. I tend to
>> delete source but keep the downloaded archives source files around in
>> case I happen to ever need to rebuild the program; saves me having to
>> download again.
>>

>
> Sometimes if you get an updated version of the libraries, you may need to
> recompile. Then it is nice to keep the source on hand.
>
> I also keep the source archives as long as I run the objects.
>


Thanks for the explanations
Nico

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:14 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com