Re: [Module-build-general] Module::Build 0.18_02 FAIL on Windows nmake
Status: Beta
Brought to you by:
kwilliams
|
From: <ajs...@ya...> - 2003-06-10 08:54:00
|
Ken Williams wrote: >On Sunday, June 8, 2003, at 09:15 PM, Andrew Savige wrote: >> I tried installing Module::Build 0.18_02 on Windows XP, via: >> perl Makefile.PL >> nmake >> nmake test >> nmake install >> but, alas, the "nmake test" step failed with: >> "Don't know how to to make test" >> It seems that Windows NMAKE does not like .DEFAULT very much (?). >> Please bear in mind that I am a bit of a make ignoramus. > > I am too, unfortunately. It might just be that the $@ variable > needs to be written as $(@) though - does that help? No. Microsoft NMAKE understands $@ just fine (see below). >> There is another problem: the Module::Build distribution contains >> a file INSTALL, yet Windows is case insensitive, so a target of >> install : >> says, annoyingly, "'install' is up-to-date" when you try a >> 'nmake install'. Curiously, using a target of: >> install :: >> seems to fix this, but I don't understand why (explanations and >> alternative workarounds welcome). > > One workaround is just to move the INSTALL file to INSTALL.txt. > I've just done that in CVS. It should probably be addressed in the > code too though, to help other people with files called 'INSTALL'. > > Hmm, this was supposed to be addressed by the .PHONY line. AFAICT, .PHONY is GNU make special, not supported by Microsoft NMAKE. May not be supported other makes also. Ditto for .DEFAULT. > According to > http://www.bell-labs.com/project/nmake/faq/gmake.html ... Alas, that is Lucent NMAKE, no relation to Microsoft NMAKE! From http://www.bell-labs.com/project/nmake/faq/MS.html: "Microsoft also has a development tool called nmake. The Microsoft nmake has no relation to Lucent nmake and the two should not be confused. The two tools are not compatible ..." Here is a URL for Microsoft NMAKE: http://msdn.microsoft.com/library/default.asp? rl=/library/en-us/vcug98/html/_asug_dot_directives.asp and I can find no mention of .PHONY or .DEFAULT. I think we need to solve this problem in a lowest common denominator way without relying on GNU make extensions. Untested, but I think something like the following should work everywhere: all : force_do_it $^X .\Build realclean : force_do_it $^X .\Build realclean $^X -e unlink -e shift Makefile force_do_it : build : force_do_it $^X .\Build build clean : force_do_it $^X .\Build clean ... with a line for every valid target Note the use of the dummy target "force_do_it" to force the action even if a file with the same name exists; I think this trick should work everywhere. I hope when you are generating the Makefile you know all valid targets (via "known_actions" method?), so it should be fairly easy to generate something like the above (?). /-\ http://mobile.yahoo.com.au - Yahoo! Mobile - Check & compose your email via SMS on your Telstra or Vodafone mobile. |