This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Strange behavior of Make "vpath" directive wrt using absolute DOS path: first dirsep MUST be backslash


I'm confused by how the "vpath" directive works in "make", when the
specified directory is an absolute DOS path.

I have a little script which generates a path like "c:/foo".  The output of
this script is used at a high-level point in the build system to set a
variable (sort of a "buildroot").  Most things work perfectly fine,
including the MS tools used to build our executables, and the Cygwin tools.

However, for some reason, the "vpath" directive in the Makefile gets
confused by this.

For instance, here is a sample Makefile:
----------------------
vpath %.lib c:/foo/stuff 	# fails
#vpath %.lib c:\foo/stuff	# succeeds
#vpath %.lib //c/foo/stuff	# succeeds

all: joe.lib
	echo gork
----------------------

If I do "touch c:/foo/stuff/joe.lib" and then try to run "make" on this
Makefile, it will fail with:

  make: *** No rule to make target `joe.lib', needed by `all'.  Stop.

However, commenting out the first line and commenting in either of the next
two lines, then "make" will succeed.

I've never seen a situation in Make or Cygwin where it prefers a backslash
for path specifiers as opposed to forward slashes.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]