summaryrefslogtreecommitdiff
blob: 5194d5598edef0d80c36095923144599f0b921e1 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff -NrU5 wvstreams-4.5.orig/Makefile wvstreams-4.5/Makefile
--- wvstreams-4.5.orig/Makefile	2008-12-07 22:18:20.000000000 +0100
+++ wvstreams-4.5/Makefile	2008-12-07 22:12:01.000000000 +0100
@@ -109,14 +109,22 @@
 
 #
 # libwvstreams: stream/event handling library
 #
 TARGETS += libwvstreams.so
-TARGETS += crypto/tests/ssltest ipstreams/tests/unixtest
+TARGETS += crypto/tests/ssltest
+crypto/tests/ssltest: $(LIBWVSTREAMS)
+
+TARGETS += ipstreams/tests/unixtest
+ipstreams/tests/unixtest: $(LIBWVSTREAMS)
+
 TARGETS += crypto/tests/printcert
+crypto/tests/printcert: $(LIBWVSTREAMS)
+
 ifneq ("$(with_readline)", "no")
   TARGETS += ipstreams/tests/wsd
+  ipstreams/tests/wsd: $(LIBWVSTREAMS)
   ipstreams/tests/wsd-LIBS += -lreadline
 else
   TEST_SKIP_OBJS += ipstreams/tests/wsd
 endif
 TESTS += $(call tests_cc,configfile/tests)
@@ -151,11 +159,17 @@
 #
 # libwvdbus: C++ DBus library based on wvstreams
 #
 ifneq ("$(with_dbus)", "no")
   TARGETS += libwvdbus.so
-  TARGETS += dbus/tests/wvdbus dbus/tests/wvdbusd
+
+  TARGETS += dbus/tests/wvdbus
+  dbus/tests/wvdbus: $(LIBWVDBUS)
+
+  TARGETS += dbus/tests/wvdbusd
+  dbus/tests/wvdbusd: $(LIBWVDBUS)
+  
   TESTS += $(call tests_cc,dbus/tests)
   libwvdbus_OBJS += $(call objects,dbus)
   libwvdbus.so: $(libwvdbus_OBJS) $(LIBWVSTREAMS)
   libwvdbus.so-LIBS += $(LIBS_DBUS)
   dbus/tests/%: PRELIBS+=$(LIBWVDBUS)
diff -NrU5 wvstreams-4.5.orig/wvrules-posix.mk wvstreams-4.5/wvrules-posix.mk
--- wvstreams-4.5.orig/wvrules-posix.mk	2008-12-07 22:18:20.000000000 +0100
+++ wvstreams-4.5/wvrules-posix.mk	2008-12-07 22:52:57.000000000 +0100
@@ -83,14 +83,17 @@
 	    done; \
 	done; \
 	$(AR) s $1
 endef
 
-CC: FORCE
+CC:
 	@CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 	  $(WVSTREAMS)/gen-cc CC c
 
-CXX: FORCE
+CXX:
 	@CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
	  $(WVSTREAMS)/gen-cc CXX cc
+
+#All files must depend on the above two rules. This is a godawful hack.
+$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX
 
 wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)