LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 02-23-2013, 01: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, 01:41 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,778
Blog Entries: 4

Rep: Reputation: 282Reputation: 282Reputation: 282
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, 01:25 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,388
Blog Entries: 2

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
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, 05:08 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 12,081

Rep: Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575Reputation: 1575
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 03:56 AM.

Main Menu
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