Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page The function of ">"?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 07-24-2008   #1 (permalink)
natural-lite
Just Joined!
 
Join Date: Jul 2008
Posts: 3
The function of ">"?

First - hi all! I'm new to the forums and only use Linux at work, as of now. I'm starting to learn it a bit so I don't have to call the tech guy in whenever I want to do something simple. I actually kind of enjoy it and might install it on a computer I'm putting together will spare parts.

Now on to the question:

I'm running Redhat and having to install a program. It's a stripped-down research program (I work for the government) that runs in the console. I had to unzip a file and now I'm learning how to do ./config and and make, etc. etc.

My question really has nothing to do with the installation process itself, but with an oddity I've noticed in typing things into the console. For example, the instructions I have to install the program say for me to go to the program's directory and type into the console:
#>make
This seems to work...I mean at least I don't get an error. However, if I just type in:
#make
RETURN: #make: *** No targets specified and no makefile found. Stop.

Why is this? What is the function of the ">" before the "make"? I thought make was just a program that runs from bash, kind of like "ls" or something. In that case, why do I get an error when I don't have the ">" before typing make? My only guess is that the ">" tells the make program to look for a makefile in the current directory, because the error says that it couldn't find a makefile. Several of my instructions call specifically for me to include the ">"...

I searched for information on the net, but of course searching for anything to do with ">" returns literally thousands of completely unrelated material.

So, I figured I'd ask someone who knows.

Thanks for any help!
natural-lite is offline   Reply With Quote
Old 07-24-2008   #2 (permalink)
coopstah13
Linux Enthusiast
 
coopstah13's Avatar
 
Join Date: Nov 2007
Location: MA, USA
Posts: 596
> is used to redirect output to a file (usually) what is happening with the first thing is that its just creating a file named make

the error is because there is no makefile in the directory you are trying to run make in

assuming you are following directions from somewhere, the > is not something you type it, that signifies the end of the prompt
coopstah13 is offline   Reply With Quote
Old 07-24-2008   #3 (permalink)
natural-lite
Just Joined!
 
Join Date: Jul 2008
Posts: 3
...told you I was a noob. Now I see the blank "make" file lmao.

The only thing is, there is a "Makefile.am" and a "Makefile.in", so I dont know why it can't find a makefile...
natural-lite is offline   Reply With Quote
Old 07-24-2008   #4 (permalink)
i92guboj
Linux Engineer
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 1,028
As coopstah13 said above, '>' is a redirection operator. It redirects the output of 'something' into 'somefile', as in:

Code:
something > somefile
In your case, 'something' is nothing, so, your command:

Code:
> somefile
Just creates an empty file.




The tool 'make' is a tool that's used to build programs from source code in an ordered manner, without having the remember the whole dependency tree of the source code.

Makefile.am and Makefile.in are files related to automake. Try to run 'automake' on that directory, and a proper 'Makefile' should be generated. Or maybe you need to run the configure script previosly.

Code:
./configure
Then you can do "make" and "make install" if you want. Without '>'

PS: If you intend to install it on your home, you can tipically use

Code:
./configure --prefix=$HOME/<whatever dir>/
Then make install will install there instead of in your system root (that would require root privileges).
i92guboj is online now   Reply With Quote
Old 07-25-2008   #5 (permalink)
natural-lite
Just Joined!
 
Join Date: Jul 2008
Posts: 3
Hey guys, thanks for all the help.

The reason # make couldn't find a makefile was because when I did
# > ./configure, it created a blank file named "configure", rather than generating the appropriate Makefile....ouch
natural-lite is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 05:52 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0