Makefile issue

James Yates j.yates at quartzuk.com
Fri Oct 1 09:38:45 UTC 2004


I am building an application, linking it with a build of rtems. I list
all of my source files in the makefile using:

C_PIECES= 	global uidata \
            	dataproc setup 

C_FILES=$(C_PIECES:%=%.c)


My makefile is based upon one of the standard contribution makefiles.
When I want to build I run make VARIANT=debug.
My code development is done under Windows XP, so I am using cygwin
provide the environment for the builds to happen. I have a problem where
some source files seem to get the Windows/Dos CR/LF line ends which I
don't want to be present. I have added a rule to the makefile so that I
can run dos2unix on the source files so that when I build, the line ends
are adjusted to Unix style:

dos2unix:
	 d2u -U $(C_FILES)

So when I call make VARIANT=debug dos2unix, this is run with the source
files passed. The problem I have is that at build, some source files are
read-only. As soon as d2u encounters a file that is read-only it gives
up and doesn't process the others in the list. Can anyone tell me the
format I need to get this rule in the makefile to call d2u -U for every
file rather than calling it once with all the files passed at once? Or
can anyone point me in the direction of a different version of d2u that
can cope with read-only files and ignore them?


	Many thanks in advance.

		James Yates







More information about the users mailing list