This is the mail archive of the cygwin@sourceware.cygnus.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]

Make question


Why does the following makefile fail to build 'foo.lib2'???

I thought I read somewhere that cygwin make would understand
Dos style pathnames - is this incorrect????

> # If the lib file exists in c:\temp, copy
> # it to cwd.
> 
> %.lib1 :: //c/temp/%.lib
> 	@echo xcopy /d /i /f /r $^ $@
> %.lib2 :: c:\temp\%.lib
> 	@echo xcopy /d /i /f /r $^ $@
> %.lib3 :: /temp/%.lib
> 	@echo xcopy /d /i /f /r $^ $@
> 
> bash-2.01$ make -k -f a.mak -r --win32 foo.lib1 foo.lib2 foo.lib3
> xcopy /d /i /f /r //c/temp/foo.lib foo.lib1
> make: *** No rule to make target `foo.lib2'.
> xcopy /d /i /f /r /temp/foo.lib foo.lib3

If it is true that Dos pathnames are not allowed, then the
previous example demonstrates the problem with using Unix
style pathnames: you can't call a Windows program with Unix
style pathnames.  For example if I remove the "echo" from
the last target (so that it calls xcopy), then run the makefile
I get a syntax error (because xcopy does not like the Unix
style pathname it was given):

> bash-2.01$ make -k -f a.mak -r --win32 foo.lib1 foo.lib2 foo.lib3
> xcopy /d /i /f /r //c/temp/foo.lib foo.lib1
> make: *** No rule to make target `foo.lib2'.
> Invalid switch - /foo.lib
> make: *** [foo.lib3] Error 4

Please send a clue: I need to use GNU Make in --win32 mode, and
use Dos style pathnames in target-depend rules so that I can
call commands using the target and dependency paths.  Am I hosed?
Is there a magical way to convert Unix paths to Dos paths built-in
to cygwin make?

-Andy Cowan
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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