LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: Disabled
Makefile case sensitive

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
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
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).
~$ 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
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
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
LQ Muse
Registered: Aug 2005
Posts: 15,656

Rep: Reputation: Disabled
Pick a naming convention and stick with it
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


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 10:28 AM.

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