LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   automated installation with perl? (https://www.linuxquestions.org/questions/linux-general-1/automated-installation-with-perl-881955/)

larsmw 05-21-2011 10:24 AM

automated installation with perl?
 
Hi there,
I am making some scripts to automaticly build and install linux-software. (gcc,kernel,binutils, etc.) I have made a command to extract the packages, but how can I check if I can re-use my already extracted source-archives?

Regards Lars

KenJackson 05-22-2011 12:33 AM

What's the purpose of your scripts? Who is the intended audience?
For example, are you building cross compilers to build software for embedded platforms?
If not, why not just install the compiler provided by your Linux distro?

To build a cross-compiler, you may want to check the crosstool-NG toolchain building project.
There are also some others.

As for a direct answer to your question, most packages have targets for 'make' like 'clean',
'distclean', 'mostlyclean' or 'realclean' to restore the directory.
If you're not confident of the results, just blow away the directory (rm -rf dir) and untar it again.

knudfl 05-22-2011 05:31 AM

Quote:

.. how can I check if I can re-use my already extracted source-archives?
The safe method is not to re-use the source.
For system files like glibc, gcc, kernel, binutils :
Do not ever re-use the source code.

..

larsmw 05-22-2011 03:25 PM

Hey Ken and Knud,

Thanks for your answers. You are probably right that I ought to remove the sorce-dir for every build. I am making some scripts to compile my own distrobution. https://sourceforge.net/projects/dklinux/


All times are GMT -5. The time now is 09:01 PM.