]> granicus.if.org Git - apache/blobdiff - Makefile.win
httpdunit: merge to trunk from feature branch
[apache] / Makefile.win
index b81517431a5e103bf8be6b5f6d6e37c425b78331..9d261ae3df99c2d0479754ecf9cd2e7b9853634a 100644 (file)
@@ -1,14 +1,18 @@
 # Makefile for Windows NT and Windows 95/98/2000
 
 # Targets are:
-#   _buildr   - build Apache in Release mode
-#   _buildd   - build Apache in Debug mode
-#   installr   - build and install a Release build
-#   installd   - build and install a Debug build
-#   clean      - remove (most) generated files
-#   _cleanr    - remove (most) files generated by a Release build
-#   _cleand    - remove (most) files generated by a Debug build
-#   _browse    - build the browse info file
+#   _buildr     - build Apache in Release mode
+#   _buildd     - build Apache in Debug mode
+#   installr    - build and install a Release build
+#   installd    - build and install a Debug build
+#   clean       - remove (most) generated files
+#   _cleanr     - remove (most) files generated by a Release build
+#   _cleand     - remove (most) files generated by a Debug build
+#   _browse     - build the browse info file
+#   _fixshebang - add proper shebang lines to activate installed 
+#                 printenv files
+#                 Note: _fixshebang must be run separately and is not
+#                 run by any of the above install* targets.
 #
 # The following install defaults may be customized;
 #
@@ -42,7 +46,7 @@
 # so the server root should be given in forward slashes (quoted),
 # preferably with the drive designation!
 
-!IF EXIST("httpd.vcproj") && ([devenv /help > NUL 2>&1] == 0) \
+!IF EXIST("Apache.sln") && ([devenv /help > NUL 2>&1] == 0) \
     && !defined(USEMAK) && !defined(USEDSW)
 USESLN=1
 USEMAK=0
@@ -241,6 +245,34 @@ _trylua:
 
 !ENDIF
 
+!IF EXIST("srclib\nghttp2")
+
+_trynghttp2:
+!IF $(USEMAK) == 1
+       cd modules\http2
+       $(MAKE) $(MAKEOPT) -f mod_http2.mak CFG="mod_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+       $(MAKE) $(MAKEOPT) -f mod_proxy_http2.mak CFG="mod_proxy_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+       cd ..\..
+!ELSEIF $(USESLN) == 1
+       devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_http2
+       devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_proxy_http2
+!ELSE
+       @msdev $(TLP).dsw /USEENV /MAKE \
+               "mod_http2 - Win32 $(LONG)" /NORECURSE $(CTARGET)
+       @msdev $(TLP).dsw /USEENV /MAKE \
+               "mod_proxy_http2 - Win32 $(LONG)" /NORECURSE $(CTARGET)
+!ENDIF
+
+!ELSE
+#     NOT EXIST("srclib\nghttp2")
+
+_trynghttp2:
+       @echo -----
+       @echo mod_http2 will not build unless nghttp2 is installed in srclib\nghttp2.
+       @echo Version 1.0 includes an lib\makefile.msvc that will satisfy this
+       @echo requirement.
+
+!ENDIF
 
 _trydb:
 !IF $(USEMAK) == 1
@@ -419,6 +451,7 @@ _build:
         $(MAKE) $(MAKEOPT) -f mod_authn_dbm.mak   CFG="mod_authn_dbm - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_authn_file.mak  CFG="mod_authn_file - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_authn_socache.mak  CFG="mod_authn_socache - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+        $(MAKE) $(MAKEOPT) -f mod_authnz_fcgi.mak CFG="mod_authnz_fcgi - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_authnz_ldap.mak CFG="mod_authnz_ldap - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_authz_core.mak  CFG="mod_authz_core - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_authz_dbd.mak   CFG="mod_authz_dbd - Win32 $(LONG)" RECURSE=0 $(CTARGET)
@@ -440,8 +473,10 @@ _build:
 #       $(MAKE) $(MAKEOPT) -f mod_socache_dc.mak  CFG="mod_socache_dc - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_socache_memcache.mak CFG="mod_socache_memcache - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_socache_shmcb.mak CFG="mod_socache_shmcb - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+        $(MAKE) $(MAKEOPT) -f mod_socache_redis.mak CFG="mod_socache_redis - Win32 $(LONG)" RECURSE=0 $(CTARGET)
        cd ..\..
        cd modules\core
+        $(MAKE) $(MAKEOPT) -f mod_macro.mak    CFG="mod_macro - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_watchdog.mak    CFG="mod_watchdog - Win32 $(LONG)" RECURSE=0 $(CTARGET)
        cd ..\..
        cd modules\cluster
@@ -507,6 +542,12 @@ _build:
        cd modules\http
         $(MAKE) $(MAKEOPT) -f mod_mime.mak        CFG="mod_mime - Win32 $(LONG)" RECURSE=0 $(CTARGET)
        cd ..\..
+!IF EXIST("srclib\nghttp2")
+       cd modules\http2
+        $(MAKE) $(MAKEOPT) -f mod_http2.mak       CFG="mod_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+        $(MAKE) $(MAKEOPT) -f mod_proxy_http2.mak CFG="mod_proxy_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+       cd ..\..
+!ENDIF
        cd modules\loggers
         $(MAKE) $(MAKEOPT) -f mod_log_config.mak  CFG="mod_log_config - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_log_debug.mak  CFG="mod_log_debug - Win32 $(LONG)" RECURSE=0 $(CTARGET)
@@ -550,8 +591,10 @@ _build:
         $(MAKE) $(MAKEOPT) -f mod_proxy_express.mak CFG="mod_proxy_express - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_proxy_fcgi.mak  CFG="mod_proxy_fcgi - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_proxy_ftp.mak   CFG="mod_proxy_ftp - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+        $(MAKE) $(MAKEOPT) -f mod_proxy_hcheck.mak  CFG="mod_proxy_hcheck - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_proxy_http.mak  CFG="mod_proxy_http - Win32 $(LONG)" RECURSE=0 $(CTARGET)
         $(MAKE) $(MAKEOPT) -f mod_proxy_scgi.mak  CFG="mod_proxy_scgi - Win32 $(LONG)" RECURSE=0 $(CTARGET)
+        $(MAKE) $(MAKEOPT) -f mod_proxy_wstunnel.mak  CFG="mod_proxy_wstunnel - Win32 $(LONG)" RECURSE=0 $(CTARGET)
 !IF EXIST("srclib\serf")
         $(MAKE) $(MAKEOPT) -f mod_serf.mak        CFG="mod_serf - Win32 $(LONG)" RECURSE=0 $(CTARGET)
 !ENDIF
@@ -632,6 +675,9 @@ _build:
        devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_proxy_html
        devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_xml2enc
 !ENDIF
+!IF EXIST("srclib\serf")
+       devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_serf
+!ENDIF
 
 !ELSE
 
@@ -677,6 +723,10 @@ _build:
        @msdev $(TLP).dsw /USEENV /MAKE \
                "mod_xml2enc - Win32 $(LONG)" /NORECURSE $(CTARGET)
 !ENDIF
+!IF EXIST("srclib\serf")
+       @msdev $(TLP).dsw /USEENV /MAKE \
+               "mod_serf - Win32 $(LONG)" /NORECURSE $(CTARGET)
+!ENDIF
 
 !ENDIF
 
@@ -699,7 +749,11 @@ _copybin:
 !IF EXIST("srclib\serf")
        copy srclib\serf\$(LONG)\libserf.$(src_dll)             "$(inst_dll)" <.y
 !ENDIF
+!IF "$(SHORT)" == "D"
+       copy srclib\pcre\pcred.$(src_dll)                       "$(inst_dll)" <.y
+!ELSE
        copy srclib\pcre\pcre.$(src_dll)                        "$(inst_dll)" <.y
+!ENDIF 
        copy modules\aaa\$(LONG)\mod_access_compat.$(src_so)    "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_allowhandlers.$(src_so)    "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_allowmethods.$(src_so)     "$(inst_so)" <.y
@@ -712,6 +766,7 @@ _copybin:
        copy modules\aaa\$(LONG)\mod_authn_dbm.$(src_so)        "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_authn_file.$(src_so)       "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_authn_socache.$(src_so)    "$(inst_so)" <.y
+       copy modules\aaa\$(LONG)\mod_authnz_fcgi.$(src_so)      "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_authnz_ldap.$(src_so)      "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_authz_core.$(src_so)       "$(inst_so)" <.y
        copy modules\aaa\$(LONG)\mod_authz_dbd.$(src_so)        "$(inst_so)" <.y
@@ -730,6 +785,8 @@ _copybin:
 #      copy modules\cache\$(LONG)\mod_socache_dc.$(src_so)     "$(inst_so)" <.y
        copy modules\cache\$(LONG)\mod_socache_memcache.$(src_so) "$(inst_so)" <.y
        copy modules\cache\$(LONG)\mod_socache_shmcb.$(src_so)  "$(inst_so)" <.y
+       copy modules\cache\$(LONG)\mod_socache_redis.$(src_so)  "$(inst_so)" <.y
+       copy modules\core\$(LONG)\mod_macro.$(src_so)   "$(inst_so)" <.y
        copy modules\core\$(LONG)\mod_watchdog.$(src_so)        "$(inst_so)" <.y
        copy modules\cluster\$(LONG)\mod_heartbeat.$(src_so)    "$(inst_so)" <.y
        copy modules\cluster\$(LONG)\mod_heartmonitor.$(src_so) "$(inst_so)" <.y
@@ -779,6 +836,15 @@ _copybin:
        copy modules\generators\$(LONG)\mod_info.$(src_so)      "$(inst_so)" <.y
        copy modules\generators\$(LONG)\mod_status.$(src_so)    "$(inst_so)" <.y
        copy modules\http\$(LONG)\mod_mime.$(src_so)            "$(inst_so)" <.y
+!IF EXIST("srclib\nghttp2")
+       copy modules\http2\$(LONG)\mod_http2.$(src_so)          "$(inst_so)" <.y
+       copy modules\http2\$(LONG)\mod_proxy_http2.$(src_so)    "$(inst_so)" <.y
+!IF "$(SHORT)" == "D"
+       copy srclib\nghttp2\lib\MSVC_obj\nghttp2d.$(src_dll)                    "$(inst_dll)" <.y
+!ELSE
+       copy srclib\nghttp2\lib\MSVC_obj\nghttp2.$(src_dll)                     "$(inst_dll)" <.y
+!ENDIF
+!ENDIF
        copy modules\ldap\$(LONG)\mod_ldap.$(src_so)            "$(inst_so)" <.y
        copy modules\loggers\$(LONG)\mod_log_config.$(src_so)   "$(inst_so)" <.y
        copy modules\loggers\$(LONG)\mod_log_debug.$(src_so)    "$(inst_so)" <.y
@@ -817,8 +883,10 @@ _copybin:
        copy modules\proxy\$(LONG)\mod_proxy_express.$(src_so)  "$(inst_so)" <.y
        copy modules\proxy\$(LONG)\mod_proxy_fcgi.$(src_so)     "$(inst_so)" <.y
        copy modules\proxy\$(LONG)\mod_proxy_ftp.$(src_so)      "$(inst_so)" <.y
+       copy modules\proxy\$(LONG)\mod_proxy_hcheck.$(src_so)   "$(inst_so)" <.y
        copy modules\proxy\$(LONG)\mod_proxy_http.$(src_so)     "$(inst_so)" <.y
        copy modules\proxy\$(LONG)\mod_proxy_scgi.$(src_so)     "$(inst_so)" <.y
+       copy modules\proxy\$(LONG)\mod_proxy_wstunnel.$(src_so)         "$(inst_so)" <.y
 !IF EXIST("srclib\serf")
        copy modules\proxy\$(LONG)\mod_serf.$(src_so)           "$(inst_so)" <.y
 !ENDIF
@@ -1026,6 +1094,46 @@ BEGIN {
     exit 0;
 }
 <<
+!ENDIF
+!IF EXIST("srclib\libxml2")
+       type << >> "$(INSTDIR)\NOTICE.txt"
+
+This binary distributions of mod_proxy_html.so and mod_xml2enc.so include the
+libxml2 C library written by Daniel Veillard (daniel veillard.com), Bjorn 
+Reese (breese users.sourceforge.net) and Gary Pennington (Gary.Pennington 
+uk.sun.com). For complete information, visit LibXML2's web site at 
+https://http://www.xmlsoft.org/
+<<
+       -awk -f <<script.awk < "srclib\libxml2\Copyright" >> "$(INSTDIR)\LICENSE.txt"
+BEGIN {
+    print "";
+    print "For the mod_proxy_html and mod_xml2enc components:";
+    print "";
+           while ( getline > 0 ) {
+       print $$0;
+    }
+    exit 0;
+}
+<<
+!ENDIF
+!IF EXIST("srclib\nghttp2")
+       type << >> "$(INSTDIR)\NOTICE.txt"
+
+This binary distribution of mod_http2.so includes nghttp2 C library written 
+by Tatsuhiro Tsujikawa. For complete information, visit nghttp2's web site 
+at https://nghttp2.org/
+<<
+       -awk -f <<script.awk < "srclib\nghttp2\COPYING" >> "$(INSTDIR)\LICENSE.txt"
+BEGIN {
+    print "";
+    print "For the mod_http2 component:";
+    print "";
+           while ( getline > 0 ) {
+       print $$0;
+    }
+    exit 0;
+}
+<<
 !ENDIF
        $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=$(SHORT) LONG=$(LONG) \
                _copybin src_exe=exe src_dll=dll src_so=so             \
@@ -1044,21 +1152,9 @@ BEGIN {
                INSTALL_DIR="$(INSTDIR)\bin\iconv"
        cd ..\..
 !ENDIF
-       copy docs\cgi-examples\printenv.vbs "$(INSTDIR)\cgi-bin\printenv.vbs" <.y
        copy docs\cgi-examples\printenv "$(INSTDIR)\cgi-bin\printenv.pl" <.y
-       -awk -f <<script.awk "docs/cgi-examples/printenv" > "$(INSTDIR)\cgi-bin\printenv.pl"
-    BEGIN { 
-       if ( "perl -e \"print $$^X;\"" | getline perlroot ) {
-           gsub( /\\/, "/", perlroot );
-           print "#!" perlroot;
-       }
-    }
-    {
-       if ( $$0 !~ /^#!/ ) {
-           print $$0;
-       }
-    }
-<<
+       copy docs\cgi-examples\printenv.vbs "$(INSTDIR)\cgi-bin\printenv.vbs" <.y
+       copy docs\cgi-examples\printenv.wsf "$(INSTDIR)\cgi-bin\printenv.wsf" <.y
        xcopy docs\error        "$(INSTDIR)\error" /s /d < .a
        xcopy docs\docroot      "$(INSTDIR)\htdocs" /d < .a
        xcopy docs\icons        "$(INSTDIR)\icons" /s /d < .a
@@ -1074,6 +1170,7 @@ BEGIN {
                include\*.h \
                os\win32\os.h \
                modules\cache\mod_cache.h \
+               modules\cache\cache_common.h \
                modules\core\mod_so.h \
                modules\core\mod_watchdog.h \
                modules\database\mod_dbd.h \
@@ -1086,6 +1183,7 @@ BEGIN {
                modules\proxy\mod_proxy.h \
                modules\proxy\mod_serf.h \
                modules\ssl\mod_ssl.h \
+               modules\ssl\mod_ssl_openssl.h \
           ) do \
            @copy %f "$(INSTDIR)\include" < .y > nul
        copy srclib\apr\Lib$(SHORT)\apr-1.lib           "$(INSTDIR)\lib" <.y
@@ -1131,3 +1229,46 @@ BEGIN {
 <<
        del .y
        del .a
+
+_fixshebang:
+!IF EXIST("$(INSTDIR)\cgi-bin")
+       -awk -f <<script.awk "docs/cgi-examples/printenv" > "$(INSTDIR)\cgi-bin\printenv.pl"
+    BEGIN { 
+       if ( "perl -e \"print $$^X;\"" | getline perlroot ) {
+           gsub( /\\/, "/", perlroot );
+           print "#!" perlroot;
+       }
+    }
+    {
+       if ( $$0 !~ /^#!/ ) {
+           print $$0;
+       }
+    }
+<<
+       -cscript -nologo <<script.vbs "docs/cgi-examples/printenv.vbs" "$(INSTDIR)\cgi-bin\printenv.vbs"
+    Dim fso, f, c
+    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set f = fso.OpenTextFile(WScript.Arguments(0), 1)
+    f.SkipLine
+    c = f.ReadAll
+    f.Close
+    Set f = fso.OpenTextFile(WScript.Arguments(1), 2, TRUE)
+    f.WriteLine "'!" & Replace(WScript.FullName, "\", "/") & " -nologo"
+    f.Write c
+    f.Close
+<<
+       -cscript -nologo <<script.vbs "docs/cgi-examples/printenv.wsf" "$(INSTDIR)\cgi-bin\printenv.wsf"
+    Dim fso, f, c
+    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set f = fso.OpenTextFile(WScript.Arguments(0), 1)
+    f.SkipLine
+    c = f.ReadAll
+    f.Close
+    Set f = fso.OpenTextFile(WScript.Arguments(1), 2, TRUE)
+    f.WriteLine "'!" & Replace(WScript.FullName, "\", "/") & " -nologo"
+    f.Write c
+    f.Close
+<<
+!ENDIF
+
+