LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-05-2009, 12:06 PM   #1
manojg
Member
 
Registered: May 2004
Posts: 78

Rep: Reputation: 15
Makefile


Hi,

This is very simple question. I searched Google but could not find the answer.

I have a number of source files like:

file_1.cxx, file_2.cxx, .........., file_40.cxx .
To compile all files, I can write (in Makefile):
SOURCE = $(wildcard *.cxx)

But I want to compile only selected files like from file_11.cxx to file_22.cxx. I tried this (as in linux command line):

SOURCE = $(wildcard *_[11-22].cxx)

But it is not working. Any idea will be greatly appreciated.

Also, I noticed that only on digit inside [] in recognized in linux command line. I.e., if I write file_[0-9].cxx, then it will be fine but if I write file_[11-20].cxx, it will not recognized.

Thanks.

Last edited by manojg; 05-05-2009 at 12:28 PM.
 
Old 05-05-2009, 01:09 PM   #2
radu124
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 1
syntax you are currentry using means
file_1.cxx -or-
file_2.cxx -or-
file_-.cxx -or-
file_0.cxx

because a set of characters between brackets is interpreted as match any of those characters

for documentation on this specific feature of make I would suggest

http://www.gnu.org/software/autoconf...Wildcards.html

otherwise a simpler alternative would be to use another naming scheme for you source files
like source_includethisone_1.cxx source_dontincludethisone_2.cxx
 
Old 05-05-2009, 02:24 PM   #3
manojg
Member
 
Registered: May 2004
Posts: 78

Original Poster
Rep: Reputation: 15
Thanks.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it mandatory to have the name of the makefile as 'Makefile' for kernal module comp narender.d Linux - Kernel 3 05-29-2009 06:26 AM
automake, makefile, makefile.in and makefile.am Fond_of_Opensource Linux - Newbie 1 09-12-2006 08:35 PM
what is the meaning of Makefile,Makefile.am,Makefile.in cynthia_thomas Linux - General 3 12-08-2005 05:00 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration