build: Use CURLX_* file lists for Visual Studio curl tool project generation
authorSteve Holme <steve_holme@hotmail.com>
Thu, 22 May 2014 22:05:22 +0000 (23:05 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Thu, 22 May 2014 22:10:38 +0000 (23:10 +0100)
Makefile.am
projects/README
projects/Windows/VC10/src/curlsrc.tmpl
projects/Windows/VC11/src/curlsrc.tmpl
projects/Windows/VC12/src/curlsrc.tmpl
projects/Windows/VC6/src/curlsrc.tmpl
projects/Windows/VC7.1/src/curlsrc.tmpl
projects/Windows/VC7/src/curlsrc.tmpl
projects/Windows/VC8/src/curlsrc.tmpl
projects/Windows/VC9/src/curlsrc.tmpl
projects/generate.bat

index 6a4b15ad90b7a96c3664d95f5df5434e80408452..18cb7d9211dbef0e70611b3473de09af924bee8c 100644 (file)
@@ -275,6 +275,8 @@ vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
        win32_src_srcs='$(CURL_CFILES)'; \
        win32_src_hdrs='$(CURL_HFILES)'; \
        win32_src_rc='$(CURL_RCFILES)'; \
+       win32_src_x_srcs='$(CURLX_CFILES)'; \
+       win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
        \
        sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
        sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
@@ -282,6 +284,8 @@ vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
        sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
        sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
        sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
+       sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
+       sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
        \
        awk_code='\
 function gen_element(type, dir, file)\
@@ -363,6 +367,20 @@ function gen_element(type, dir, file)\
     split(src_rc, arr);\
     for(val in arr) gen_element(proj_type, "src", arr[val]);\
   }\
+  else if($$0 == "CURL_SRC_X_C_FILES") {\
+    split(src_x_srcs, arr);\
+    for(val in arr) {\
+      sub(/..\/lib\//, "", arr[val]);\
+      gen_element(proj_type, "lib", arr[val]);\
+    }\
+  }\
+  else if($$0 == "CURL_SRC_X_H_FILES") {\
+    split(src_x_hdrs, arr);\
+    for(val in arr) {\
+      sub(/..\/lib\//, "", arr[val]);\
+      gen_element(proj_type, "lib", arr[val]);\
+    }\
+  }\
   else\
     printf("%s\r\n", $$0);\
 }';\
@@ -381,6 +399,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \
        \
        echo "generating '$(VC7_LIBVCPROJ)'"; \
@@ -397,6 +417,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC71_LIBVCPROJ)'"; \
@@ -413,6 +435,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC8_LIBVCPROJ)'"; \
@@ -429,6 +453,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC9_LIBVCPROJ)'"; \
@@ -445,6 +471,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC10_LIBVCXPROJ)'"; \
@@ -461,6 +489,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC11_LIBVCXPROJ)'"; \
@@ -477,6 +507,8 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
        \
        echo "generating '$(VC12_LIBVCXPROJ)'"; \
@@ -493,4 +525,6 @@ function gen_element(type, dir, file)\
                -v src_srcs="$$sorted_src_srcs" \
                -v src_hdrs="$$sorted_src_hdrs" \
                -v src_rc="$$win32_src_rc" \
+               -v src_x_srcs="$$sorted_src_x_srcs" \
+               -v src_x_hdrs="$$sorted_src_x_hdrs" \
                "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; };)
index 95a248aff9a8ad680319637c13c41e79a126587e..2701f26e386c2432e37514c08850cf4b5a0999af 100644 (file)
@@ -98,7 +98,6 @@ TODO
    * Support WinIDN
    * Use of static runtime libraries
    * Generate *.vcxproj.filters files for VC10, VC11 and VC12
-   * Use CURLX_* definitions for curl tool project generation
    * Support for other development IDEs
 
    Any additional help would be appreciated ;-)
\ No newline at end of file
index 1e8e4c2ebf46bd8a9a09bfa39d90921852af217d..0731630d1ce6d43220b06b6709e60078709432bf 100644 (file)
     </Bscmake>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\..\..\lib\nonblock.c" />
-    <ClCompile Include="..\..\..\..\lib\rawstr.c" />
-    <ClCompile Include="..\..\..\..\lib\strtoofft.c" />
-    <ClCompile Include="..\..\..\..\lib\warnless.c" />
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
-    <ClInclude Include="..\..\..\..\lib\curl_setup.h" />
-    <ClInclude Include="..\..\..\..\lib\nonblock.h" />
-    <ClInclude Include="..\..\..\..\lib\rawstr.h" />
-    <ClInclude Include="..\..\..\..\lib\strtoofft.h" />
-    <ClInclude Include="..\..\..\..\lib\warnless.h" />
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
   </ItemGroup>
   <ItemGroup>
index 6e6a56572499a991a77d3b3226d9849df34873d0..a4a835555cc001e92f62bc68723fd48823dbfbe6 100644 (file)
     </Bscmake>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\..\..\lib\nonblock.c" />
-    <ClCompile Include="..\..\..\..\lib\rawstr.c" />
-    <ClCompile Include="..\..\..\..\lib\strtoofft.c" />
-    <ClCompile Include="..\..\..\..\lib\warnless.c" />
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
-    <ClInclude Include="..\..\..\..\lib\curl_setup.h" />
-    <ClInclude Include="..\..\..\..\lib\nonblock.h" />
-    <ClInclude Include="..\..\..\..\lib\rawstr.h" />
-    <ClInclude Include="..\..\..\..\lib\strtoofft.h" />
-    <ClInclude Include="..\..\..\..\lib\warnless.h" />
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
   </ItemGroup>
   <ItemGroup>
index 8949f5ea1047b9afa95524b03a0859fd6175fdeb..719cfa77ecbae618ce77ca2809323ef43a80e233 100644 (file)
     </Bscmake>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\..\..\lib\nonblock.c" />
-    <ClCompile Include="..\..\..\..\lib\rawstr.c" />
-    <ClCompile Include="..\..\..\..\lib\strtoofft.c" />
-    <ClCompile Include="..\..\..\..\lib\warnless.c" />
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
-    <ClInclude Include="..\..\..\..\lib\curl_setup.h" />
-    <ClInclude Include="..\..\..\..\lib\nonblock.h" />
-    <ClInclude Include="..\..\..\..\lib\rawstr.h" />
-    <ClInclude Include="..\..\..\..\lib\strtoofft.h" />
-    <ClInclude Include="..\..\..\..\lib\warnless.h" />
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
   </ItemGroup>
   <ItemGroup>
index e2f1e222b6d9fa4d6e2147966407c8eb67ea7238..874136c567bf669b75af3ffa26e90405736c2b35 100644 (file)
@@ -569,51 +569,13 @@ LINK32=link.exe
 # Begin Group "Source Files"
 
 # PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\nonblock.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\rawstr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\strtoofft.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\warnless.c
-# End Source File
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
 # End Group
 # Begin Group "Header Files"
 
 # PROP Default_Filter ""
-# Begin Source File
-
-SOURCE="..\..\..\..\lib\config-win32.h"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\curl_setup.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\nonblock.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\rawstr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\strtoofft.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\lib\warnless.h
-# End Source File
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
 # End Group
 # Begin Group "Resource Files"
index 98d0c83964ace77d0a82a6617229e8a5ef683606..5482eff4c7537a4ea6d48d22c93920d948fd2f2a 100644 (file)
                <Filter
                        Name="Source Files"
                        Filter="">
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.c">
-                       </File>
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
                </Filter>
                <Filter
                        Name="Header Files"
                        Filter="">
-                       <File
-                               RelativePath="..\..\..\..\lib\config-win32.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\curl_setup.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.h">
-                       </File>
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
                </Filter>
                <Filter
index cb538ef0c14d5f8b0ae125ca3fbd9141e5b078f7..82ffd7ec37eeff6cbc2618855c90a98110268266 100644 (file)
                <Filter
                        Name="Source Files"
                        Filter="">
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.c">
-                       </File>
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
                </Filter>
                <Filter
                        Name="Header Files"
                        Filter="">
-                       <File
-                               RelativePath="..\..\..\..\lib\config-win32.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\curl_setup.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.h">
-                       </File>
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
                </Filter>
                <Filter
index 78a2861d93d71e778477ad4e4abc0bac78246a16..a6a5753275c473d107e1131fc1dd53f1b4a22960 100644 (file)
                <Filter
                        Name="Source Files"
                        >
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.c"
-                               >
-                       </File>
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
                </Filter>
                <Filter
                        Name="Header Files"
                        >
-                       <File
-                               RelativePath="..\..\..\..\lib\config-win32.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\curl_setup.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.h"
-                               >
-                       </File>
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
                </Filter>
                <Filter
index 5b11ab596571c6c6df490bff5c6526224a79b8c6..6cb28f50933c369a7ba4cc037ab50eaf4cfff10d 100644 (file)
                <Filter
                        Name="Source Files"
                        >
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.c"
-                               >
-                       </File>
+CURL_SRC_X_C_FILES
 CURL_SRC_C_FILES
                </Filter>
                <Filter
                        Name="Header Files"
                        >
-                       <File
-                               RelativePath="..\..\..\..\lib\config-win32.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\curl_setup.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\nonblock.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\rawstr.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\strtoofft.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\lib\warnless.h"
-                               >
-                       </File>
+CURL_SRC_X_H_FILES
 CURL_SRC_H_FILES
                </Filter>
                <Filter
index 45b2663250e41e428c560644e9e960842ba19d7a..4ac5fe29693a872672a125df1cef976dd00405b5 100644 (file)
@@ -6,7 +6,7 @@ rem *                             / __| | | | |_) | |
 rem *                            | (__| |_| |  _ <| |___
 rem *                             \___|\___/|_| \_\_____|
 rem *
-rem * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>
+rem * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>.
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
@@ -92,6 +92,20 @@ rem
       for /f "delims=" %%h in ('dir /b ..\src\*.h') do call :element %1 src "%%h" %3
     ) else if "!var!" == "CURL_SRC_RC_FILES" (
       for /f "delims=" %%r in ('dir /b ..\src\*.rc') do call :element %1 src "%%r" %3
+    ) else if "!var!" == "CURL_SRC_X_C_FILES" (
+      call :element %1 lib "strtoofft.c" %3
+      call :element %1 lib "strdup.c" %3
+      call :element %1 lib "rawstr.c" %3
+      call :element %1 lib "nonblock.c" %3
+      call :element %1 lib "warnless.c" %3
+    ) else if "!var!" == "CURL_SRC_X_H_FILES" (
+      call :element %1 lib "config-win32.h" %3
+      call :element %1 lib "curl_setup.h" %3
+      call :element %1 lib "strtoofft.h" %3
+      call :element %1 lib "strdup.h" %3
+      call :element %1 lib "rawstr.h" %3
+      call :element %1 lib "nonblock.h" %3
+      call :element %1 lib "warnless.h" %3
     ) else if "!var!" == "CURL_LIB_C_FILES" (
       for /f "delims=" %%c in ('dir /b ..\lib\*.c') do call :element %1 lib "%%c" %3
     ) else if "!var!" == "CURL_LIB_H_FILES" (