LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-23-2013, 02:33 AM   #1
smaartguy
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Makefile case sensitive


Hi
I am writing a make file to build files. Inside makefile, i mentioned file names in lower case. While the actual files on system are in Uppercase.

While executing makefile, i get error for different file names.

Is it possible to make makefile case insensitive and execute it.
 
Old 02-23-2013, 02:41 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
Hope you know that files in Unix are case-sensitive. So first thing is, why did you mention filenames in lower case when they are originally in Upper or mixed cases?

Anyway, you can translate lower with upper and vice-versa (but I will do it for whole file).
Code:
~$ cat makefile | tr '[[:upper:]]' '[[:lower:]]'
If you want to for only some part of the file, then share that snippet.
 
Old 02-23-2013, 02:25 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
My friend's name is John. Whenever I call him Fed, he thinks I'm talking to someone else. How can I make him respond when I call him by some other name?

The Linux filesystem is case-sensitive. Nothing you do in the Makefile will get you around that. It is a Good Thing(TM). Embrace it.

--- rod.
 
Old 02-23-2013, 06:08 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,488

Rep: Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803Reputation: 1803
Pick a naming convention and stick with it
fileone.cpp
FileOne.cpp ( what i use)
file_one.cpp( not recommended the "_" can be hard to read)

now some serves ( as in a mainframe ) use only UPPERCASE file names
FILEONE.CPP
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
case sensitive directory moiseszaragoza Linux - Newbie 2 12-14-2010 11:53 AM
Apache 2.x case-sensitive jarias Linux - Newbie 2 05-15-2009 06:11 PM
Copying files from case-sensitive Linux to case-insensitive Windows via CIFS? SlowCoder Linux - General 4 05-07-2008 08:03 PM
is apache case-sensitive? browny_amiga Linux - Software 2 06-21-2004 02:57 PM
Why is linux case sensitive? Jestrik Linux - General 9 12-16-2003 08:05 AM


All times are GMT -5. The time now is 06:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration