diff options
| author | marha <marha@users.sourceforge.net> | 2012-06-25 09:09:14 +0200 | 
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2012-06-25 09:09:14 +0200 | 
| commit | b1565e868d5549753fd710529b88bd4c183889ab (patch) | |
| tree | 1ec66b54444e5ad1a6c2836c648b3f1bf4c626d2 | |
| parent | 66841fa144ddd72df67ab1ddf880ca508d4bc9e3 (diff) | |
| download | vcxsrv-b1565e868d5549753fd710529b88bd4c183889ab.tar.gz vcxsrv-b1565e868d5549753fd710529b88bd4c183889ab.tar.bz2 vcxsrv-b1565e868d5549753fd710529b88bd4c183889ab.zip | |
zlib is now compiled as a dll
26 files changed, 264 insertions, 132 deletions
| diff --git a/bdftopcf/makefile b/bdftopcf/makefile index 02e92b422..81986617f 100644 --- a/bdftopcf/makefile +++ b/bdftopcf/makefile @@ -1,7 +1,7 @@  TTYAPP = bdftopcf  INCLUDELIBFILES = \ - $(MHMAKECONF)\zlib\$(OBJDIR)\libz.lib \ + $(MHMAKECONF)\zlib\$(OBJDIR)\zlib1.lib \   $(MHMAKECONF)\libXfont\src\fontfile\$(OBJDIR)\libfontfile.lib \   $(MHMAKECONF)\libXfont\src\bitmap\$(OBJDIR)\libbitmap.lib \   $(MHMAKECONF)\libXfont\src\util\$(OBJDIR)\libutil.lib diff --git a/include/sys/types.h b/include/sys/types.h index 07e9640a2..dabb3902b 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -1,11 +1,101 @@ -#ifndef __TYPES_H__
 -#define __TYPES_H__
 +/***
 +*sys/types.h - types returned by system level calls for file and time info
 +*
 +*       Copyright (c) Microsoft Corporation. All rights reserved.
 +*
 +*Purpose:
 +*       This file defines types used in defining values returned by system
 +*       level calls for file status and time information.
 +*       [System V]
 +*
 +*       [Public]
 +*
 +****/
 -#include <wchar.h>
 +#pragma once
 +
 +#ifndef _INC_TYPES
 +#define _INC_TYPES
 +
 +#if     !defined(_WIN32)
 +#error ERROR: Only Win32 target supported!
 +#endif
  typedef int pid_t;
  typedef long off_t;
  typedef int gid_t;
  typedef int uid_t;
 -#endif
\ No newline at end of file +#if !defined(_W64)
 +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86))
 +#define _W64 __w64
 +#else
 +#define _W64
 +#endif
 +#endif
 +
 +#ifdef  _USE_32BIT_TIME_T
 +#ifdef  _WIN64
 +#include <crtwrn.h>
 +#endif
 +#endif
 +
 +#ifndef _TIME32_T_DEFINED
 +typedef _W64 long __time32_t;   /* 32-bit time value */
 +#define _TIME32_T_DEFINED
 +#endif
 +
 +#ifndef _TIME64_T_DEFINED
 +typedef __int64 __time64_t;     /* 64-bit time value */
 +#define _TIME64_T_DEFINED
 +#endif
 +
 +#ifndef _TIME_T_DEFINED
 +#ifdef _USE_32BIT_TIME_T
 +typedef __time32_t time_t;      /* time value */
 +#else
 +typedef __time64_t time_t;      /* time value */
 +#endif
 +#define _TIME_T_DEFINED         /* avoid multiple def's of time_t */
 +#endif
 +
 +
 +#ifndef _INO_T_DEFINED
 +
 +typedef unsigned short _ino_t;          /* i-node number (not used on DOS) */
 +
 +#if     !__STDC__
 +/* Non-ANSI name for compatibility */
 +typedef unsigned short ino_t;
 +#endif
 +
 +#define _INO_T_DEFINED
 +#endif
 +
 +
 +#ifndef _DEV_T_DEFINED
 +
 +typedef unsigned int _dev_t;            /* device code */
 +
 +#if     !__STDC__
 +/* Non-ANSI name for compatibility */
 +typedef unsigned int dev_t;
 +#endif
 +
 +#define _DEV_T_DEFINED
 +#endif
 +
 +
 +#ifndef _OFF_T_DEFINED
 +
 +typedef long _off_t;                    /* file offset value */
 +
 +#if     !__STDC__
 +/* Non-ANSI name for compatibility */
 +typedef long off_t;
 +#endif
 +
 +#define _OFF_T_DEFINED
 +#endif
 +
 +#endif  /* _INC_TYPES */
 diff --git a/libXfont/src/fontfile/makefile b/libXfont/src/fontfile/makefile index 6468ff9b5..619cdbdbb 100644 --- a/libXfont/src/fontfile/makefile +++ b/libXfont/src/fontfile/makefile @@ -1,8 +1,6 @@  LIBRARY = libfontfile -INCLUDES += $(MHMAKECONF)\zlib\src\zlib-1.2.3 -  DEFINES += X_GZIP_FONT_COMPRESSION  CSRCS = bitsource.c		\ diff --git a/libxml2/bin/zlib1.dll b/libxml2/bin/zlib1.dllBinary files differ deleted file mode 100644 index 82913fb9f..000000000 --- a/libxml2/bin/zlib1.dll +++ /dev/null diff --git a/makefile.after b/makefile.after index 5dd5e1cac..996fbb93f 100644 --- a/makefile.after +++ b/makefile.after @@ -62,11 +62,11 @@ endif  all: $(EXE)
 -$(EXE) :  $(OBJS) $(INCLUDELIBFILES) $(RESOBJS) $(MANIFESTFILE) $(EXTRALIB)
 +$(EXE) :  $(OBJS) $(INCLUDELIBFILES) $(INCLUDENOSERVLIBFILES) $(RESOBJS) $(MANIFESTFILE) $(EXTRALIB)
  ifndef VS2008
 -	$(LINK) $(LINKFLAGS) /OUT:$(relpath $@) $(INCLUDELIBFILES) $(SYSTEMLIBS) $(LINKLIBS) $(EXTRALIB) $(OBJS) $(RESOBJS)
 +	$(LINK) $(LINKFLAGS) /OUT:$(relpath $@) $(INCLUDELIBFILES) $(INCLUDENOSERVLIBFILES) $(SYSTEMLIBS) $(LINKLIBS) $(EXTRALIB) $(OBJS) $(RESOBJS)
  else
 -	$(LINK) $(LINKFLAGS) /MANIFEST:NO /OUT:$(relpath $@) $(INCLUDELIBFILES) $(SYSTEMLIBS) $(LINKLIBS) $(EXTRALIB) $(OBJS) $(RESOBJS)
 +	$(LINK) $(LINKFLAGS) /MANIFEST:NO /OUT:$(relpath $@) $(INCLUDELIBFILES) $(INCLUDENOSERVLIBFILES) $(SYSTEMLIBS) $(LINKLIBS) $(EXTRALIB) $(OBJS) $(RESOBJS)
  	mt -nologo -manifest $(MANIFESTFILE) -outputresource:$(relpath $@);\#1
  endif
 @@ -118,6 +118,10 @@ ifdef INC_BDF_RULES  load_makefile $(MHMAKECONF)\bdftopcf\makefile MAKESERVER=0 DEBUG=$(DEBUG)
  load_makefile $(MHMAKECONF)\mkfontscale\makefile MAKESERVER=0 DEBUG=$(DEBUG)
 +#bdftopcf is dependent on zlib1.dll, so we need to add the directory of the zlib dll to the path env variable
 +PATH:=$(relpath $(MHMAKECONF)\zlib\$(NOSERVOBJDIR))\;$(PATH)
 +export PATH
 +
  $(DESTDIR)\%.pcf.gz: %.bdf
  	@del -e $@
  	$(BDFTOPCF) -t $< | gzip > $@
 diff --git a/makefile.before b/makefile.before index 55bef4663..cdf91594a 100644 --- a/makefile.before +++ b/makefile.before @@ -38,7 +38,6 @@ endif  ifeq ($(NORELDBG),1)
  # This all is here to avoid unnecessary rebuilds when switching between release and debug and MAKESERVER
  OBJDIR?=obj
 -OBJDIRPREFIX=noreldbg
  DEBUG=0
  MAKESERVER=0
  endif
 @@ -47,6 +46,7 @@ ifeq ($(DEBUG),1)  CCFLAGS   += -MDd -RTCc -RTC1 -Od -GS -GR -Zi
  LINKFLAGS += /DEBUG
  OBJDIR ?= obj\$(OBJDIRPREFIX)debug
 +NOSERVOBJDIR ?= obj\debug
  DEFINES += _DEBUG DEBUG
  RCFLAGS += -d "_DEBUG"
  else
 @@ -54,13 +54,14 @@ CCFLAGS   += -MD -O2 -Ob2 -Oi -Ox -Oy -Ot -Zi -GL  DEFINES   +=  NDEBUG
  LINKFLAGS += /OPT:REF /OPT:ICF /DEBUG /LTCG:STATUS
  OBJDIR ?= obj\$(OBJDIRPREFIX)release
 +NOSERVOBJDIR ?= obj\release
  RCFLAGS += -d "NDEBUG"
  AR += /LTCG
  endif
 -DEFINES += WIN32 _WIN32 _WINDOWS WINDOWS _MBCS __i386__ __MINGW32__ OPEN_MAX=256 PATH_MAX=256 _TIMEVAL_DEFINED mode_t=int __STDC__ X_LOCALE
 +DEFINES += WIN32 _WIN32 _WINDOWS WINDOWS _MBCS __i386__ __MINGW32__ _POSIX_ X_NOT_POSIX _TIMEVAL_DEFINED mode_t=int __STDC__ X_LOCALE
  DEFINES += FAKEIT HAVE_CONFIG_H _BSD_SOURCE _WIN32_WINNT=_WIN32_WINNT_WINXP
  TOPSRCDIR=$(MHMAKECONF)\xorg-server
 diff --git a/mkfontscale/makefile b/mkfontscale/makefile index be789d4df..ff1c44887 100644 --- a/mkfontscale/makefile +++ b/mkfontscale/makefile @@ -5,7 +5,7 @@ DEFINES += _BSD_SOURCE  INCLUDES += $(MHMAKECONF)\freetype\include  INCLUDELIBFILES = \ - $(MHMAKECONF)\zlib\$(OBJDIR)\libz.lib \ + $(MHMAKECONF)\zlib\$(OBJDIR)\zlib1.lib \   $(MHMAKECONF)\libXfont\src\fontfile\$(OBJDIR)\libfontfile.lib \   $(MHMAKECONF)\libXfont\src\util\$(OBJDIR)\libutil.lib \   $(MHMAKECONF)\libfontenc\src\$(OBJDIR)\libfontenc.lib diff --git a/tools/mhmake/genkdev4.sh b/tools/mhmake/genkdev4.sh index 1acfe13b4..c3b1cbaa5 100755 --- a/tools/mhmake/genkdev4.sh +++ b/tools/mhmake/genkdev4.sh @@ -1,12 +1,12 @@ -mkdir build +[ ! -d build ] && mkdir build  cd build  cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release ..  cd .. -mkdir build.dbg +[ ! -d build.dbg ] && mkdir build.dbg  cd build.dbg  cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug ..  cd .. -mkdir .kdev4 +[ ! -d .kdev4 ] && mkdir .kdev4  echo [CMake] > .kdev4/mhmake.kdev4  echo BuildDirs[\$e]=$PWD/build,$PWD/build.dbg >> .kdev4/mhmake.kdev4 diff --git a/tools/mhmake/mhmake.vcxproj b/tools/mhmake/mhmake.vcxproj index 913b03d63..2b395f11f 100644 --- a/tools/mhmake/mhmake.vcxproj +++ b/tools/mhmake/mhmake.vcxproj @@ -413,6 +413,7 @@      <ClInclude Include="src\commandqueue.h" />
      <ClInclude Include="src\curdir.h" />
      <ClInclude Include="src\fileinfo.h" />
 +    <ClInclude Include="src\flexint.h" />
      <ClInclude Include="src\flexlexer.h" />
      <ClInclude Include="src\md5.h" />
      <ClInclude Include="src\mhmakefileparser.h" />
 @@ -425,24 +426,24 @@      <CustomBuild Include="src\mhmakeLexer.l">
        <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cmd.exe /c makelex.bat Debug
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RelativeDir)flex.skl</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).cpp</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cmd.exe /c makelex.bat Debug64
  </Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">cmd.exe /c makelex.bat Profile
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(RelativeDir)flex.skl</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(IntDir)%(Filename).cpp</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">cmd.exe /c makelex.bat Profile64
  </Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cmd.exe /c makelex.bat Release
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RelativeDir)flex.skl</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).cpp</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cmd.exe /c makelex.bat Release64</Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\src\flexint.h;.\src\flex.skl;.\src\flexlexer.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)%(Filename).cpp;%(Outputs)</Outputs>
 @@ -450,23 +451,23 @@      <CustomBuild Include="src\mhmakeParser.y">
        <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cmd.exe /c makebison.bat Debug
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RelativeDir)bisondata/bison.m4;%(RelativeDir)bisondata/lalr1.cc;%(RelativeDir)bisondata/c++.m4;%(RelativeDir)bisondata/c.m4;%(RelativeDir)bisondata/location.cc</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).cpp;$(IntDir)%(Filename).hpp;$(IntDir)location.hh;$(IntDir)position.hh;$(IntDir)stack.hh</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cmd.exe /c makebison.bat Debug64
  </Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">cmd.exe /c makebison.bat Profile
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(RelativeDir)bisondata/bison.m4;%(RelativeDir)bisondata/lalr1.cc;%(RelativeDir)bisondata/c++.m4;%(RelativeDir)bisondata/c.m4;%(RelativeDir)bisondata/location.cc</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(IntDir)%(Filename).cpp;$(IntDir)%(Filename).hpp;$(IntDir)location.hh;$(IntDir)position.hh;$(IntDir)stack.hh</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">cmd.exe /c makebison.bat Profile64</Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cmd.exe /c makebison.bat Release
  </Command>
 -      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
 -      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
 +      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RelativeDir)bisondata/bison.m4;%(RelativeDir)bisondata/lalr1.cc;%(RelativeDir)bisondata/c++.m4;%(RelativeDir)bisondata/c.m4;%(RelativeDir)bisondata/location.cc</AdditionalInputs>
 +      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).cpp;$(IntDir)%(Filename).hpp;$(IntDir)location.hh;$(IntDir)position.hh;$(IntDir)stack.hh</Outputs>
        <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cmd.exe /c makebison.bat Release64</Command>
        <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\src\bison.cc;.\src\bison.h;%(AdditionalInputs)</AdditionalInputs>
        <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)%(Filename).cpp;$(OutDir)%(Filename).h;%(Outputs)</Outputs>
 diff --git a/tools/mhmake/mhmake.vcxproj.filters b/tools/mhmake/mhmake.vcxproj.filters index 77d66e01c..0ec28f785 100644 --- a/tools/mhmake/mhmake.vcxproj.filters +++ b/tools/mhmake/mhmake.vcxproj.filters @@ -2,23 +2,23 @@  <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemGroup>
      <Filter Include="Source Files">
 -      <UniqueIdentifier>{e9db2f40-4c63-488d-bb89-1eee3e458055}</UniqueIdentifier>
 +      <UniqueIdentifier>{bafa54b0-cf70-4114-a02b-5950c0d4d6e3}</UniqueIdentifier>
        <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
      </Filter>
      <Filter Include="Header Files">
 -      <UniqueIdentifier>{bf259917-974f-4378-94e5-126d6d1889e9}</UniqueIdentifier>
 +      <UniqueIdentifier>{a92d61c8-68ae-49f8-b843-a793ac9bb6c6}</UniqueIdentifier>
        <Extensions>h;hpp;hxx;hm;inl</Extensions>
      </Filter>
      <Filter Include="Parser Files">
 -      <UniqueIdentifier>{5c6c4864-cd40-427e-825a-4a3028933fe0}</UniqueIdentifier>
 +      <UniqueIdentifier>{a793606c-0dbc-4f42-9ad8-a61cf7773455}</UniqueIdentifier>
        <Extensions>l;y;cpp;h</Extensions>
      </Filter>
      <Filter Include="Parser Files\Auto">
 -      <UniqueIdentifier>{06532204-d72c-459e-be81-db8b0725c996}</UniqueIdentifier>
 +      <UniqueIdentifier>{e31daf7b-6a21-4a06-ac86-07625e21fd87}</UniqueIdentifier>
        <Extensions>cpp;h</Extensions>
      </Filter>
      <Filter Include="Resource Files">
 -      <UniqueIdentifier>{c4505c11-9108-48e9-8d61-6247b696335e}</UniqueIdentifier>
 +      <UniqueIdentifier>{bd4cf27c-0b86-4d5c-8dae-963cc3953cbb}</UniqueIdentifier>
        <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
      </Filter>
    </ItemGroup>
 @@ -94,6 +94,9 @@      <ClInclude Include="src\flexlexer.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 +    <ClInclude Include="src\flexint.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
    </ItemGroup>
    <ItemGroup>
      <CustomBuild Include="src\mhmakeLexer.l">
 diff --git a/tools/mhmake/src/build.cpp b/tools/mhmake/src/build.cpp index ba6a6e4da..ed9647d17 100644 --- a/tools/mhmake/src/build.cpp +++ b/tools/mhmake/src/build.cpp @@ -497,7 +497,7 @@ mh_pid_t mhmakefileparser::CopyFiles(const string &Params) const      if (pSrc->IsDir())
      {
 -      SrcFileName+=OSPATHSEPSTR"*";
 +      SrcFileName+=OSPATHSEPSTR "*";
        pSrc=GetFileInfo(SrcFileName,m_MakeDir);
      }
 @@ -797,7 +797,7 @@ static void CommandSep(const string &Command, unsigned &EndPos, unsigned &NextBe        {
          continue;
        }
 -    while (strchr(" \t|<>",Command[NextBegin])) NextBegin++;
 +      while (strchr(" \t|<>",Command[NextBegin])) NextBegin++;
      }
      while (strchr(" \t|<>",Command[EndPos])) EndPos--;
      break;
 @@ -838,6 +838,7 @@ mh_pid_t mhmakefileparser::OsExeCommand(const string &Command, const string &Par      unsigned NextBegin=0;
      unsigned EndPos=0;
      CommandSep(ComspecCommandLine,EndPos,NextBegin);
 +
        // We have multiple commands so create an temporary batch file
      FILE *pFile;
      while (1)
 @@ -1507,7 +1508,7 @@ mh_time_t mhmakefileparser::StartBuildTarget(fileinfo* pTarget,bool bCheckTarget            }
            ImplicitRuleDepsIt++;
          }
 -        
 +
          IMPLICITRULE::PopRule(ResultIt->second);
          #ifdef _DEBUG
          m_ImplicitSearch--;
 diff --git a/tools/mhmake/src/commandqueue.cpp b/tools/mhmake/src/commandqueue.cpp index 45a1d1043..c8f823b39 100644 --- a/tools/mhmake/src/commandqueue.cpp +++ b/tools/mhmake/src/commandqueue.cpp @@ -80,9 +80,9 @@ commandqueue::commandqueue() :        {
          if (!szProc[cur+1])
          {
 -        NrProcs++;
 +          NrProcs++;
 +        }
        }
 -    }
        cur++;
      }
    }
 @@ -120,7 +120,7 @@ void commandqueue::SetNrParallelBuilds(unsigned NrParallelBuilds)  void commandqueue::ThrowCommandExecutionError(refptr<activeentry> pActiveEntry)
  {
    fileinfo*     pTarget=pActiveEntry->pTarget;
 -  const string    &Command=pActiveEntry->Command;
 +  const string &Command=pActiveEntry->Command;
    mhmakefileparser *pMakefile=pTarget->GetRule()->GetMakefile();
    string ErrorMessage = string("Error running command: ")+ Command +"\n";
 diff --git a/tools/mhmake/src/commandqueue.h b/tools/mhmake/src/commandqueue.h index 8b327be8c..815dba643 100644 --- a/tools/mhmake/src/commandqueue.h +++ b/tools/mhmake/src/commandqueue.h @@ -41,11 +41,11 @@ class commandqueue    };
  private:
    queue<fileinfo*>     m_Queue;
 -  unsigned                   m_MaxNrCommandsInParallel;
 -  mh_pid_t                  *m_pActiveProcesses;
 -  refptr<activeentry>       *m_pActiveEntries;
 -  unsigned                   m_NrActiveEntries;
 -  mh_pid_t                   m_DummyWaitHandle;
 +  unsigned             m_MaxNrCommandsInParallel;
 +  mh_pid_t            *m_pActiveProcesses;
 +  refptr<activeentry> *m_pActiveEntries;
 +  unsigned             m_NrActiveEntries;
 +  mh_pid_t             m_DummyWaitHandle;
  private:
    void ThrowCommandExecutionError(refptr<activeentry> pActiveEntry);
 diff --git a/tools/mhmake/src/fileinfo.cpp b/tools/mhmake/src/fileinfo.cpp index 9f4ae1ca1..884d645b5 100644 --- a/tools/mhmake/src/fileinfo.cpp +++ b/tools/mhmake/src/fileinfo.cpp @@ -257,7 +257,7 @@ string &NormalizePathName(string &Name)              if (pLastSlash<pBeg)
                pWr=(char*)pBeg;
              else
 -            pWr=(char*)pLastSlash;
 +              pWr=(char*)pLastSlash;
            }
          }
          else
 diff --git a/tools/mhmake/src/functions.cpp b/tools/mhmake/src/functions.cpp index 7393035cf..cd08dd957 100644 --- a/tools/mhmake/src/functions.cpp +++ b/tools/mhmake/src/functions.cpp @@ -738,12 +738,12 @@ static string dir(const string &FileName, void *)      return g_EmptyString;
    }
 -    string Ret=g_EmptyString;
 -    Ret+=FileName.substr(0,Pos+1);
 -    if (FileName[0]=='"' && FileName.end()[-1]=='"')
 -      Ret+=s_QuoteString;
 -    return Ret;
 -  }
 +  string Ret=g_EmptyString;
 +  Ret+=FileName.substr(0,Pos+1);
 +  if (FileName[0]=='"' && FileName.end()[-1]=='"')
 +    Ret+=s_QuoteString;
 +  return Ret;
 +}
  ///////////////////////////////////////////////////////////////////////////////
  string mhmakefileparser::f_dir(const string & FileNames) const
 @@ -801,7 +801,7 @@ static string relpath(const string &FileName,void *pvDir)      while (*pCur)
      {
        if (*pCur==OSPATHSEP)
 -        retPath+=OSPATHSEPSTR"..";
 +        retPath+=OSPATHSEPSTR "..";
        pCur++;
      }
      if (pszPath)
 @@ -810,11 +810,11 @@ static string relpath(const string &FileName,void *pvDir)    else
    {
      if (*pCur)
 -      retPath=".."OSPATHSEPSTR;
 +      retPath=".." OSPATHSEPSTR;
      while (*pCur)
      {
        if (*pCur==OSPATHSEP)
 -        retPath+=".."OSPATHSEPSTR;
 +        retPath+=".." OSPATHSEPSTR;
        pCur++;
      }
      retPath+=pLast;
 diff --git a/tools/mhmake/src/mhmakefileparser.cpp b/tools/mhmake/src/mhmakefileparser.cpp index d1f41b07f..55ad056db 100644 --- a/tools/mhmake/src/mhmakefileparser.cpp +++ b/tools/mhmake/src/mhmakefileparser.cpp @@ -27,7 +27,7 @@  #include "flexlexer.h"
  #include "mhmakeparser.hpp"
 -commandqueue mhmakefileparser::sm_CommandQueue;
 +commandqueue             mhmakefileparser::sm_CommandQueue;
  stack<yy::mhmakeparser*> mhmakefileparser::sm_ParserStack; // Keeps track of the currently active parser
  string mhmakefileparser::GetFileNameLineNo(void)
 @@ -93,11 +93,7 @@ bool mhmakefileparser::IsDefined(const string &Var) const    bool Ret = m_Variables.find(Var)!=m_Variables.end();
    if (!Ret)
    {
 -    string Env=GetFromEnv(Var);
 -    if (!Env.empty())
 -    {
 -      Ret=true;
 -    }
 +    GetFromEnv(Var, &Ret);
    }
    return Ret;
  }
 @@ -185,21 +181,21 @@ inline string mhmakefileparser::ExpandExpression(const string &ExprIn) const        char Char=Expr[i++];
        if (Char=='$')
        {
 -          size_t inew=SkipMakeExpr(Expr,i);
 -          i++;
 -          if (inew>i)
 -          {
 -            ToAdd=ExpandMacro(Expr.substr(i,inew-i-1));
 -            i=inew;
 -          }
 -          else
 -          {
 -            // This is a single character expression
 -            ToAdd=ExpandMacro(string(1,Expr[i-1]));
 -          }
 -          if (ToAdd.find('$')!=string::npos && ToAdd.length()!=1)
 -          {
 -            Recurse=true;
 +        size_t inew=SkipMakeExpr(Expr,i);
 +        i++;
 +        if (inew>i)
 +        {
 +          ToAdd=ExpandMacro(Expr.substr(i,inew-i-1));
 +          i=inew;
 +        }
 +        else
 +        {
 +          // This is a single character expression
 +          ToAdd=ExpandMacro(string(1,Expr[i-1]));
 +        }
 +        if (ToAdd.find('$')!=string::npos && ToAdd.length()!=1)
 +        {
 +          Recurse=true;
          }
          Ret+=ToAdd;
        }
 @@ -298,7 +294,7 @@ string mhmakefileparser::ExpandMacro(const string &Expr) const        return ExpandExpression(Ret);
      else
        return Ret;
 -}
 +  }
  }
  ///////////////////////////////////////////////////////////////////////////////
 @@ -682,7 +678,7 @@ const refptr<fileinfoarray> mhmakefileparser::GetIncludeDirs() const      ((mhmakefileparser*)this)->m_IncludeDirs=Includes;
      ((mhmakefileparser*)this)->m_pIncludeDirs=refptr<fileinfoarray>(new fileinfoarray);
      if (Includes.empty())  // If not defined try a default path
 -      Includes="include inc .."OSPATHSEPSTR"include .."OSPATHSEPSTR"inc";
 +      Includes="include inc .." OSPATHSEPSTR "include .." OSPATHSEPSTR "inc";
      const char *pTmp=Includes.c_str();
      while (*pTmp)
      {
 @@ -774,7 +770,7 @@ void mhmakefileparser::LoadAutoDepsFile(fileinfo *pDepFile)      if (!pTarget->CompareMd5_32(0) && !pTarget->CompareMd5_32(Md5_32))
      {
 -        MakeNotDirty=false; /* BuildTarget had set the dirty flag, but since the md5 did not change it was a false dirty. This is for BuildTargets called before this routine */
 +      MakeNotDirty=false; /* BuildTarget had set the dirty flag, but since the md5 did not change it was a false dirty. This is for BuildTargets called before this routine */
        #ifdef _DEBUG
        cout << "Warning: trying to set to different md5's for Target "<<pTarget->GetQuotedFullFileName()<<" Old: "<<hex<<pTarget->GetCommandsMd5_32()<<" New: "<<Md5_32<<endl;
        #endif
 @@ -946,7 +942,7 @@ void mhmakefileparser::SetExport(const string &Var, const string &Val)    {
      const char *pVar=Var.c_str();
      char *pStart=pEnv;
 -    while (*pEnv!='=' && *pEnv==*pVar)
 +    while (*pEnv!='=' && tolower(*pEnv)==tolower(*pVar))
      {
        pEnv++; pVar++;
      }
 @@ -1141,16 +1137,7 @@ void mhmakefileparser::CheckEnv(void)  //
 -static bool SkipVar(const string &Var)
 -{
 -  if (Var==WC_REVISION)
 -    return true;
 -  if (Var==WC_URL)
 -    return true;
 -  if (Var==MAKE)
 -    return true;
 -  return false;
 -}
 +#define SkipVar(Var) (m_EnvVarsToIgnore.find(Var)!=m_EnvVarsToIgnore.end())
  #define DBGOUT(stuff)
 @@ -1208,32 +1195,33 @@ void mhmakefileparser::InitBuildTime()  ///////////////////////////////////////////////////////////////////////////////
  // Returns a variable from the environment or from the command line and adds it the m_UsedEnvVars
 -string mhmakefileparser::GetFromEnv(const string &Var, bool Cache) const
 +string mhmakefileparser::GetFromEnv(const string &Var, bool *pDefined) const
  {
    /* First we look into the command line variables, before we are looking in the environment */
    map<string,string>::const_iterator pLineFind=m_CommandLineVars.find(Var);
    if (pLineFind!=m_CommandLineVars.end())
    {
      ((mhmakefileparser*)this)->m_UsedEnvVars.insert(Var);
 -    if (Cache)
 -      ((mhmakefileparser*)this)->m_Variables[Var]=pLineFind->second;
 +    ((mhmakefileparser*)this)->m_Variables[Var]=pLineFind->second;
 +    if (pDefined) *pDefined=true;
      return pLineFind->second;
    }
    const char *pEnv=getenv(Var.c_str());
    if (!pEnv)
    {
 +    if (pDefined) *pDefined=false;
      return g_EmptyString;
    }
    ((mhmakefileparser*)this)->m_UsedEnvVars.insert(Var);
 -  if (Cache)
 -    ((mhmakefileparser*)this)->m_Variables[Var]=pEnv;
 +  ((mhmakefileparser*)this)->m_Variables[Var]=pEnv;
 +  if (pDefined) *pDefined=true;
    return pEnv;
  }
  ///////////////////////////////////////////////////////////////////////////////
 -// Creates the variable USER_ENVVARS to be saved in the autodeps file
 +// Creates the variable USED_ENVVARS to be saved in the autodeps file
  //
  void mhmakefileparser::CreateUSED_ENVVARS()
 diff --git a/tools/mhmake/src/mhmakefileparser.h b/tools/mhmake/src/mhmakefileparser.h index 9ad13446c..848329226 100644 --- a/tools/mhmake/src/mhmakefileparser.h +++ b/tools/mhmake/src/mhmakefileparser.h @@ -57,7 +57,7 @@ class mhmakefileparser : public refbase    friend class yy::mhmakeparser;
  private:
 -  static commandqueue   sm_CommandQueue;
 +  static commandqueue             sm_CommandQueue;
    static stack<yy::mhmakeparser*> sm_ParserStack; // Keeps track of the currently active parser
  private:
    fileinfo             *m_RuleThatIsBuild;
 @@ -93,6 +93,7 @@ protected:    bool                  m_RebuildAll; /* true when to rebuild all targets of this makefile */
    set<string>           m_UsedEnvVars;     // Array containing a list of variables that are taken from the environment (This is used for rebuild checking)
 +  set<string>           m_EnvVarsToIgnore; // List of env vars that do not have to be taken into account for rebuild checking
    set<string>           m_Exports;         // Array containing a list of exported variables in the makefile (This is used for rebuild checking)
    vector< pair< string, refptr<fileinfoarray> > > m_vPath;
  #ifdef WIN32
 @@ -135,6 +136,9 @@ public:      SetVariable("MAKE_VERSION",MHMAKEVER);
      SetVariable(OBJEXTVAR,OBJEXT);
      SetVariable(EXEEXTVAR,EXEEXT);
 +    m_EnvVarsToIgnore.insert(WC_REVISION);
 +    m_EnvVarsToIgnore.insert(WC_URL);
 +    m_EnvVarsToIgnore.insert(MAKE);
    }
    /* Needed if you only want to use the searchcommand and execommand functions */
 @@ -151,7 +155,7 @@ public:    bool CompareEnv() const;
    uint32 CreateEnvMd5_32() const;
 -  string GetFromEnv(const string &Var,bool Cache=true) const;
 +  string GetFromEnv(const string &Var, bool *pDefined=NULL) const;
    void CreateUSED_ENVVARS();
    void SetExport(const string & Var, const string & Val);
 @@ -350,7 +354,7 @@ public:      mh_time_t TargetDate=StartBuildTarget(pTarget,bCheckTargetDir);
      if (!TargetDate.IsDateValid())
        TargetDate=WaitBuildTarget(pTarget);
 -      return TargetDate;
 +    return TargetDate;
    }
    void BuildDependencies(const refptr<rule> &pRule, fileinfo* pTarget, mh_time_t TargetDate, mh_time_t &YoungestDate, bool &MakeTarget);
 diff --git a/tools/mhmake/src/mhmakelexer.l b/tools/mhmake/src/mhmakelexer.l index 9dc1a23a0..9b933c305 100644 --- a/tools/mhmake/src/mhmakelexer.l +++ b/tools/mhmake/src/mhmakelexer.l @@ -35,7 +35,7 @@ static uint32 LoadMakMd5(fileinfo *pTarget)      return Md5_32;
    if (1!=fread(&Md5_32,sizeof(Md5_32),1,pFile))
    {
 -  fclose(pFile);
 +    fclose(pFile);
      return Md5_32;
    }
    pTarget->SetCommandsMd5_32(Md5_32);
 @@ -71,7 +71,7 @@ static void ReplaceCurlyBraces(string &String)      Pos=0;
      while ((Pos=String.find_first_of('}',Pos))!=(int)string::npos)
        String.replace(Pos,1,1,')');
 -        }
 +  }
  }
  #include "mhmakeparser.hpp"
 @@ -248,6 +248,13 @@ load_makefile {  }
   /*---------------------------------------------------------------------------*/
 +[ \t]*override[ \t]* {
 +  // override is not supported by mhmake, it is the default behavior
 +  PRINTF(("%s %d: SPACE (ignoring override):\n",m_InputFileName.c_str(),lineno()));
 +  return yy::mhmakeparser::token::SPACE;
 +}
 +
 + /*---------------------------------------------------------------------------*/
  [ \t]*=[ \t]*\\[ \t\r]*\n[ \t]* {
    PRINTF(("%s %d: EQUAL: %s\n",m_InputFileName.c_str(),lineno(),yytext));
    inclineno();
 @@ -298,6 +305,12 @@ load_makefile {  }
   /*---------------------------------------------------------------------------*/
 +\\; {
 +  PRINTF(("%s %d: -Escaped SEMICOLON (STRING): %s\n",m_InputFileName.c_str(),lineno(),yytext));
 +  yylval->theString=(const char *)yytext+1;
 +  return yy::mhmakeparser::token::STRING;
 +}
 + /*---------------------------------------------------------------------------*/
  [ \t]*;[ \t]*\\[ \t\r]*\n[ \t]* {
    PRINTF(("%s %d: -SEMICOLON (NEWLINE): %s\n",m_InputFileName.c_str(),lineno(),yytext));
    m_curtoken=g_EmptyString;
 @@ -595,7 +608,7 @@ load_makefile {  }
   /*---------------------------------------------------------------------------*/
 -<SKIPUNTILELSEORENDIF>[a-zA-Z]+    /* skip */
 +<SKIPUNTILELSEORENDIF>[a-zA-Z]+  /* skip */
   /*---------------------------------------------------------------------------*/
  <SKIPUNTILELSEORENDIF>[^a-zA-Z\n]+ /* skip */
   /*---------------------------------------------------------------------------*/
 @@ -632,6 +645,12 @@ load_makefile {  }
   /*---------------------------------------------------------------------------*/
 +\.ENVVARS_TOIGNORE {
 +  PRINTF(("%s %d: .ENVVARS_TOIGNORE: %s\n",m_InputFileName.c_str(),lineno(),yytext));
 +  return yy::mhmakeparser::token::ENVVARS_TOIGNORE;
 +}
 +
 + /*---------------------------------------------------------------------------*/
  export {
    PRINTF(("%s %d: export: %s\n",m_InputFileName.c_str(),lineno(),yytext));
    return yy::mhmakeparser::token::EXPORT;
 @@ -842,7 +861,7 @@ export {  <SINGLEQUOTE>[^\\\'\r\n$]+ |
  <SINGLEQUOTE>[\\\$]      |
 -<SINGLEQUOTE>\\\'         |
 +<SINGLEQUOTE>\\\'            |
  <SINGLEQUOTE>\\# {
    yymore();
  }
 diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y index 847cda48a..d8edb1d51 100644 --- a/tools/mhmake/src/mhmakeparser.y +++ b/tools/mhmake/src/mhmakeparser.y @@ -53,7 +53,7 @@ const char Test[]="dit is een test";  %token <theString> COMMAND
  %token <theString> COMMA
  %token <theString> STRING DOLLAREXPR EQUAL COLON DOUBLECOLON VARDEF VARVAL
 -%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE VPATH
 +%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE VPATH ENVVARS_TOIGNORE
  %type <theString> expression nonspaceexpression simpleexpression
  %type <theString> maybeemptyexpression
 @@ -92,6 +92,7 @@ statement: NEWLINE |             ruledef |
             phonyrule |
             autodepsrule |
 +           envvarstoignorerule |
             varassignment |
             imvarassignment |
             pvarassignment |
 @@ -179,6 +180,26 @@ autodepsrule: AUTODEPS COLON expression             NEWLINE
  ;
 +envvarstoignorerule: ENVVARS_TOIGNORE COLON expression
 +           {
 +             string VarsStr=m_pMakefile->ExpandExpression($3);
 +             PRINTF(("Defining envvarstoignore rule : %s\n",$3.c_str()));
 +             PRINTF(("  Expanded to : %s\n",m_pMakefile->ExpandExpression($3).c_str()));
 +             const char *pTmp=VarsStr.c_str();
 +             while (*pTmp)
 +             {
 +               string Var;
 +               pTmp=NextItem(pTmp,Var);
 +               if (!Var.empty())
 +               {  // Add it to the list of env vars to ignore
 +                 m_pMakefile->m_EnvVarsToIgnore.insert(Var);
 +               }
 +             }
 +           }
 +           NEWLINE
 +;
 +
 +
  exportrule: EXPORT space exportstrings NEWLINE |
              EXPORT space STRING EQUAL maybeemptyexpression
              {
 diff --git a/tools/mhmake/src/rule.h b/tools/mhmake/src/rule.h index 7cc287600..04827b129 100644 --- a/tools/mhmake/src/rule.h +++ b/tools/mhmake/src/rule.h @@ -82,7 +82,7 @@ class IMPLICITRULE    static set<rule*> m_ImplicitRuleRecurseDetStack;
    static vector<implicitrule_t> m_ImplicitRules;  // Use a vector and not a map because the order of the implicit rules is important
  public:
 -  static void AddImplicitRule(fileinfo *pTarget,const vector<fileinfo*> &Deps, refptr<rule> pRule);
 +  static void AddImplicitRule(fileinfo *pTarget,const vector<fileinfo*> &Deps,refptr<rule> pRule);
    static void SearchImplicitRule(const fileinfo *pTarget, implicitruledep_t &Result);
    static void PrintImplicitRules();
    static bool PushRule(rule *pRule)
 diff --git a/tools/mhmake/src/util.cpp b/tools/mhmake/src/util.cpp index 3e20706dd..9fe006e95 100644 --- a/tools/mhmake/src/util.cpp +++ b/tools/mhmake/src/util.cpp @@ -650,27 +650,7 @@ void loadedmakefile::LoadMakefile()    }
    else
    {
 -    /* Create a file that is depending on the makefile name and the arguments */
 -    md5_context ctx;
 -
 -    md5_starts( &ctx );
 -
 -    map<string,string>::const_iterator pIt=m_CommandLineVars.begin();
 -    while (pIt!=m_CommandLineVars.end())
 -    {
 -      if (pIt->first!="MAKE")
 -      {
 -        md5_update(&ctx, (uint8*)pIt->first.c_str(), pIt->first.size());
 -        md5_update(&ctx, (uint8*)pIt->second.c_str(), pIt->second.size());
 -      }
 -      pIt++;
 -    }
 -    md5_update(&ctx, (uint8*)m_Makefile->GetFullFileName().c_str(), m_Makefile->GetFullFileName().size());
 -
 -    char ID[10];
 -    sprintf(ID,"_%lx",md5_finish32( &ctx));
 -
 -    pDepFile=GetFileInfo(string(".") + m_Makefile->GetName()+ ".dep"+ID,m_MakeDir);
 +    pDepFile=GetFileInfo(string(".") + m_Makefile->GetName()+ ".dep",m_MakeDir);
      m_pMakefileParser->SetVariable(AUTODEPFILE,pDepFile->GetQuotedFullFileName());
    }
 @@ -683,10 +663,12 @@ void loadedmakefile::LoadMakefile()    {
      throw string("Error parsing ")+m_Makefile->GetQuotedFullFileName();
    }
 +
 +  fileinfo *pMaybeNewDepFile=GetFileInfo(m_pMakefileParser->ExpandVar(AUTODEPFILE),m_MakeDir);
    #ifdef _DEBUG
    /* Check if the makefile has changed the AUTODEPFILE variable, if so generate a warning that a
     * rebuild could happen for the rules defined for making included makefiles */
 -  if (m_pMakefileParser->ExpandVar(AUTODEPFILE)!=pDepFile->GetQuotedFullFileName())
 +  if (pMaybeNewDepFile!=pDepFile)
    {
      cout << "\n\nWARNING:\n  makefile '"<< m_Makefile->GetQuotedFullFileName() <<"' re-defines AUTODEPFILE\n  from '"<< pDepFile->GetQuotedFullFileName() <<"'\n  to '"<<
              m_pMakefileParser->ExpandVar(AUTODEPFILE) << "'\n  (may cause needless rebuilds when having rules for included makefiles!!!!!)\n\n\n";
 @@ -700,6 +682,15 @@ void loadedmakefile::LoadMakefile()        cout<<"No First target for "<<m_Makefile->GetQuotedFullFileName()<<endl;
    }
    #endif
 +
 +  if (pMaybeNewDepFile!=pDepFile)
 +  {
 +    // this means the makefile has overruled the AUTODEPFILE, so parse it again
 +    pDepFile=pMaybeNewDepFile;
 +    if (pDepFile->Exists())
 +      m_pMakefileParser->LoadAutoDepsFile(pDepFile); /* If it already exists, load it. */
 +  }
 +
    m_pMakefileParser->UpdateDate(m_Makefile->GetDate());
    if (sm_Statics.m_MhMakeConf)
 diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h index b4a17a6cf..e7f9ccf57 100644 --- a/tools/mhmake/src/util.h +++ b/tools/mhmake/src/util.h @@ -50,7 +50,7 @@  #define PLATFORM     "linux"
  #endif
 -#define MHMAKEVER    "3.0.15"
 +#define MHMAKEVER    "3.0.19"
  class makecommand
  {
 diff --git a/xorg-server/hw/xwin/xlaunch/main.cc b/xorg-server/hw/xwin/xlaunch/main.cc index 1bdcf6ae3..dcbb36d64 100644 --- a/xorg-server/hw/xwin/xlaunch/main.cc +++ b/xorg-server/hw/xwin/xlaunch/main.cc @@ -35,6 +35,9 @@  #include <X11/Xlib.h>  #include <stdlib.h> +// Define here because it is not defined in stdlib.h because of the _POSIX_ defined +extern "C" +_Check_return_ _CRTIMP int    __cdecl _putenv(_In_z_ const char * _EnvString);  #include <sstream>  /// @brief Send WM_ENDSESSION to all program windows. diff --git a/xorg-server/installer/vcxsrv.nsi b/xorg-server/installer/vcxsrv.nsi index a80c7dab5..5cb2cb654 100644 --- a/xorg-server/installer/vcxsrv.nsi +++ b/xorg-server/installer/vcxsrv.nsi @@ -98,7 +98,7 @@ Section "VcXsrv (required)"    File "..\swrastwgl_dri_dbg.dll"
    File "..\dxtn.dll"
    File "..\..\libxml2\bin\libxml2.dll"
 -  File "..\..\libxml2\bin\zlib1.dll"
 +  File "..\..\zlib\obj\release\zlib1.dll"
    File "..\..\libxml2\bin\iconv.dll"
  !ifndef VS2008
    File "msvcr100.dll"
 diff --git a/xorg-server/makefile b/xorg-server/makefile index 6cb0ee817..6e86820d0 100644 --- a/xorg-server/makefile +++ b/xorg-server/makefile @@ -43,16 +43,20 @@ INCLUDELIBFILES =  \   $(MHMAKECONF)\libX11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \   $(MHMAKECONF)\libX11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \   $(MHMAKECONF)\libX11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \ - $(MHMAKECONF)\zlib\$(OBJDIR)\libz.lib \   $(MHMAKECONF)\libX11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \   $(MHMAKECONF)\libfontenc\src\$(OBJDIR)\libfontenc.lib \   $(MHMAKECONF)\libXfont\src\freetype\$(OBJDIR)\libft.lib \   $(MHMAKECONF)\libXfont\src\stubs\$(OBJDIR)\libstubs.lib \   $(MHMAKECONF)\libXinerama\src\$(OBJDIR)\libXinerama.lib +INCLUDENOSERVLIBFILES =  \ + $(MHMAKECONF)\zlib\$(NOSERVOBJDIR)\zlib1.lib +  LIBDIRS=$(dir $(INCLUDELIBFILES)) +NOSERVLIBDIRS=$(dir $(INCLUDENOSERVLIBFILES))  load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);) +load_makefile $(NOSERVLIBDIRS:%$(NOSERVOBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)  OBJS = dix\$(OBJDIR)\main.obj diff --git a/zlib/Makefile b/zlib/Makefile index 9fecb13ef..69371a621 100644 --- a/zlib/Makefile +++ b/zlib/Makefile @@ -1,4 +1,8 @@ -LIBRARY=libz -CSRCS = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c trees.c \ -       zutil.c inflate.c infback.c inftrees.c inffast.c +SHAREDLIB=zlib1 +DEFFILE = win32\zlib.def +DEFINES += ZLIB_DLL + +CSRCS = adler32.c compress.c crc32.c uncompr.c deflate.c trees.c \ +       zutil.c inflate.c infback.c inftrees.c inffast.c gzlib.c \ +       gzclose.c gzread.c gzwrite.c | 
