File: 0006-Fix-compilation-of-Apache-module.patch

package info (click to toggle)
ocamlnet 4.1.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 52,232 kB
  • sloc: ml: 151,647; ansic: 11,049; sh: 1,975; makefile: 1,310
file content (25 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Stephane Glondu <steph@glondu.net>
Date: Thu, 15 Oct 2015 13:42:46 +0200
Subject: Fix compilation of Apache module

When ocamlc is called with -g option, it calls the C compiler with this
option, which does not work when the compiler is apxs2.
---
 src/netcgi2-apache/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/netcgi2-apache/Makefile b/src/netcgi2-apache/Makefile
index 277ed2c..fa26b04 100644
--- a/src/netcgi2-apache/Makefile
+++ b/src/netcgi2-apache/Makefile
@@ -64,7 +64,9 @@ mod_netcgi_apache.so: $(MOD_OBJECTS)
 
 netcgi_apache_mod.lo: netcgi_apache_mod.o
 	echo "$@ generated by the rule for $^"
-netcgi_apache_mod.o: netcgi_apache_mod.ml
+netcgi_apache_mod.o: netcgi_apache_mod.c
+	$(APXS) -c -o $@ $^
+netcgi_apache_mod.c: netcgi_apache_mod.ml
 	$(OCAMLC) -verbose -output-obj -linkall -o $@ \
 	  -cc "./drive-apxs $(APXS)" \
 	  -package "dynlink bytes unix findlib" -linkpkg $^