Re: [AD] Issues when building MSVC Allegro using Cygwin

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Daniel Schlyder wrote:

The third issue involves installing the files once Allegro has been
built. When I run "make install", I get the following error:


mkdir  C:/PROGRA~1/MICROS~4/VC98/lib
mkdir: cannot create directory `C:/PROGRA~1/MICROS~4/VC98/lib': File exists


After a bit of investigation, I found a line in makefile.all that might be the source of the problem.


existing_dirs = $(foreach dir, $(INSTALL_DIRS), $(wildcard $(dir)))


One theory that I have is that Cygwin make's 'wildcard' function does not expand paths in the shortened DOS form. What I did next was to replace the following line:


That's my theory too.


   $(foreach file, $(filter-out existing_dirs, $(INSTALL_DIRS)), \


with:


$(foreach file, $(filter-out C:/PROGRA~1/MICROS~4/VC98/lib C:/PROGRA~1/MICROS~4/VC98/include, $(INSTALL_DIRS)), \


...and "make install" succeeded.


Is there a way to 'Un-shorten' the path from within the makefile? MSVC 6's vcvars32.bat sets the path to the short version.


I don't know, but what version of Make are you using? There was an earlier
report of the same problem from someone using MinGW's Make with MSVC.
Apparently, this bug is present in version 3.79, but fixed in 3.80. Maybe
you can get a newer version of Make for Cygwin?


I've finally gotten round to testing this with make 3.80 on a recent version of Cygwin, and the same problem persists, so whatever changed from make 3.79.1 to 3.80 had no effect.

$ make install
mkdir  C:/PROGRA~1/MICROS~4/VC98/lib
mkdir: cannot create directory `C:/PROGRA~1/MICROS~4/VC98/lib': File exists
make: *** [create-install-dirs] Error 1

$ make -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

I also tried to run 'make install' for MSVC 6 on DJGPP, and found that if UNIX_TOOLS was set to 1, the same problem would occur, but if UNIX_TOOLS was not set, the Allegro files would be installed. Looking at the output of 'make install' with UNIX_TOOLS unset revealed that there was no attempt to create the alredy existing directory C:\PROGRA~1\MICROS~4\VC98\lib . One theory I've come up with is that the line:
    $(foreach file, $(filter-out existing_dirs, $(INSTALL_DIRS)), \
only works for shortened DOS filenames if backslashes are being used. So I'm wondering if I should make a patch where if UNIX_TOOLS=1 and $(INSTALL_DIRS) contains shortened DOS paths, it converts the directories in $(INSTALL_DIRS) to backslashes and then after the filtering converts $(INSTALL_DIRS) back to forward-slashes? Would this be overkill? Is there an easier way to fix this? Also, I think this might only fix the problem of compiling for MSVC under DJGPP using UNIX_TOOLS=1 - I'm not sure if Cygwin's make even accepts backslashes (Cygwin is less tolerant of DOS-isms than DJGPP).

AE.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/