PDA

View Full Version : Make command in Linux (Target?)



Hhel
11-01-2006, 03:47 PM
Hi
I have been trying to install K3B, Guarddog and Open Office 2.0 into Xandros. The relevant parts from forums have been studied.

One command calls for ./configure (from root) Ok.
The next calls for "make"
This prompts for a target. I couldn't see any reference to "target" associated with the make command in the forum notes.

Apparently "make " requires [Options] and [Target]. I can see a list of options if I enter "make -h" , but what about Target?

Some of you knowledgeable Linux experts will no doubt put me straight in a few seconds.

Thanks in advance,

Jim :waughh:

Graham L
11-01-2006, 04:17 PM
make is not so much a command, it's more a way of life. :D

It makes it possible for ordinary mortals like you and me to compile and install software. The files which drive it are not easy to produce.

When you type "make", that causes a file called Makefile in the current directory to be read and that drives the whole process.

Normally, one Makefile is made which is suitable for all the possible things which can be done to a package ... such as (most common) compile and install the package, compile and install the package for a particular hardware type, make a "clean" directory (say, remove the remnants of a failed compilation), make a distribution package, etc etc.

So that make will know what to do, each such "desirable outcome" is given a name, which appears as a label in the Makefile (in normal label fomat:; followed by a colon: e.g. all:, or clean: ... ).

The labels each mark a target. You thought I'd never get to the point, didn't you?

You are getting a complaint that it hasn't got a target. So it expects a target in the command line, e.g.: #make all.

Does the README or INSTALL file tell you what to give. "all" might be a good one to try.

There is another complication. So that a package can be used on just about any machine, in just about any distrbution, often there is only a skeleton Makefile provided. You must make the Makefile in this case. It's all done for you, usually by a shell file which you invoke with . ./configure . (the extra ". " at the start is sometimes needed, and doesn't do any harm if it's not. (The "./" is needed if you are root ... the default path doesn't include the currect directory for root. There are good reasons for that.)

Again the INSTALL or README file should tell you about this.

You've done ".configure" ... did it give any error messages? If there were errors, it won't have produced the Makefile. So make will fail. That could be why it can't find a target. There might not be any targets in the skeleton Makefile.

Jen
11-01-2006, 04:38 PM
Why are you installing from source? Xandros Networks should have all of those programs in their database. Just a matter of searching for it and clicking "Install" and it will do everything for you.

Graham L
11-01-2006, 04:48 PM
Of course, if there is an already built package for your distribution, that's the way to go. I imagine Open Office would be a big compile. ;) I'd far sooner use programmes than compile them. There are some Gentoo users who seem to have the opposite preference. :D

vinref
11-01-2006, 05:03 PM
The standard Xandros may not have the development tools such as GCC, so make may not work. Other than that, check to see if you are in the right directory. You should be in the same directory as the Makefile.

As been mentioned by Graham and Jen, you should use the prepackaged binaries. Installing from source in a distro such as Xandros may cause you to install stuff in a non-standard location, causing all sorts of mayhem.

[Edit]: You can sometimes skip the make step and just type make install.

Graham L
11-01-2006, 05:09 PM
A configure script usually checks for presence of gcc. make is crapping out before it even tries to compile anything. Of course, configure might have failed through not finding gcc. ;)

It's not that a make might put things in non-standard places; the problem is usually when make puts things in the standard places, not the distribution's non-standard "standard" places.

Myth
11-01-2006, 06:40 PM
Of course, if there is an already built package for your distribution, that's the way to go. I imagine Open Office would be a big compile. ;) I'd far sooner use programmes than compile them. There are some Gentoo users who seem to have the opposite preference. :DIts not that we Gentoo users like to sit there and watch the compile go.. its that we know that when we come back from wherever we went (while compiling) Portage will ensure that all deps are included and that the app will run first time 95% of the time. I noticed in apt-get and yum that half the time you had to go looking for a lib that wasnt included, which usually required another lib to make it run, which in turn was missing a dependency and so on. Maybe it just me and my intro to linux (FC3 4 and Ubuntu)

Jen
11-01-2006, 07:04 PM
Its not that we Gentoo users like to sit there and watch the compile go.. Ah, actually I used to like to sit and watch the compiler in action - fascinating stuff :nerd:

... its that we know that when we come back from wherever we went (while compiling) Portage will ensure that all deps are included and that the app will run first time 95% of the time.Only 95% of the time?! :horrified
Compiling is OK if that is your only option, or if you are wanting a more performance based OS (Gentoo), but you got to like those 2 second RPM (or equivalent) installs versus 2 hrs of compiling :p

Myth
11-01-2006, 07:21 PM
Ah, actually I used to like to sit and watch the compiler in action - fascinating stuff :nerd:
Only 95% of the time?! :horrified
Compiling is OK if that is your only option, or if you are wanting a more performance based OS (Gentoo), but you got to like those 2 second RPM (or equivalent) installs versus 2 hrs of compiling :pGentoo does have binary ebuilds .. OpenOffice2 binary takes 2 minutes :). Not bad for a 70+ Meg file

And yes, 95% of the time, that allows for things such as the compile is reading the older gcc compiler instead of the newer one (2 command fix:)) etc

Hhel
11-01-2006, 08:45 PM
Thanks for all of the advice folks. I have gone over to messing around with my new installation, Mepis. It seems to have most of the features that I wanted in Xandros already installed (K3B, and Guarddog and, I found Mailwasher Pro already there. Was able to copy my registration key over and have got that working.

So, if I could only get the Dynalink external modem to go on line more quickly, I would probably stay with Mepis. Initializing the modem seems to take about 40 seconds - in Xandros, it dialled out straight away. There seem to be heaps of similar postings about that on Mepislovers forums ( or should that be fora?)

This retired fella is going to take the rest of the day off and think again about it all tomorrow.

However, Jen and Graham L and others, thanks for your patient advice.

Cheers,
Jim :cool: