summaryrefslogtreecommitdiff
path: root/debian/patches/build-fixes
blob: 0254181215bb0c319b563be7358f001591150bb0 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
--- a/build/generator/swig/checkout_swig_header.py
+++ b/build/generator/swig/checkout_swig_header.py
@@ -20,15 +20,14 @@
 
   def write_makefile_rules(self, makefile):
     """Write makefile rules to checkout files"""
-    script_path = '$(top_srcdir)/build/generator/swig/checkout_swig_header.py'
-    conf = '$(abs_srcdir)/build.conf'
-    makefile.write('CHECKOUT_SWIG = cd $(top_builddir) && $(PYTHON)' +
-                   ' %s %s $(SWIG)\n\n' % (script_path, conf))
+    script_path = 'build/generator/swig/checkout_swig_header.py'
+    makefile.write('CHECKOUT_SWIG = cd $(top_srcdir) &&' +
+                   ' $(PYTHON) %s build.conf $(SWIG)\n' % script_path)
     checkout_locations = []
     for path in self.swig_checkout_files:
       out = self._output_file(path)
       checkout_locations.append(out)
-      makefile.write('%s: %s\n' % (out, script_path) +
+      makefile.write('%s: $(top_srcdir)/%s\n' % (out, script_path) +
                      '\t$(CHECKOUT_SWIG) %s\n\n' % path)
     makefile.write('SWIG_CHECKOUT_FILES = %s\n\n\n'
                    % " ".join(checkout_locations))
--- a/Makefile.in
+++ b/Makefile.in
@@ -249,14 +249,14 @@
 
 # The path to generated and complementary source files for the SWIG
 # bindings.
-SWIG_PL_DIR = $(abs_builddir)/subversion/bindings/swig/perl
-SWIG_PY_DIR = $(abs_builddir)/subversion/bindings/swig/python
-SWIG_RB_DIR = $(abs_builddir)/subversion/bindings/swig/ruby
+SWIG_PL_DIR = $(top_builddir)/subversion/bindings/swig/perl
+SWIG_PY_DIR = $(top_builddir)/subversion/bindings/swig/python
+SWIG_RB_DIR = $(top_builddir)/subversion/bindings/swig/ruby
 
 # The path to the source files for the SWIG bindings
 SWIG_PL_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/perl
-SWIG_PY_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/python
-SWIG_RB_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/ruby
+SWIG_PY_SRC_DIR = $(top_srcdir)/subversion/bindings/swig/python
+SWIG_RB_SRC_DIR = $(top_srcdir)/subversion/bindings/swig/ruby
 
 ### Automate JAR creation using Makefile generator's javahl-java.jar
 ### property.  Enhance generator to support JAR installation.
@@ -674,7 +674,7 @@
 	$(EXTRACLEAN_SWIG_HEADERS)
 
 $(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in
-	./config.status subversion/bindings/swig/perl/native/Makefile.PL
+	./config.status $@
 
 $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
 	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
@@ -682,7 +682,7 @@
 swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
   $(SWIG_PL_DIR)/native/Makefile
 swig-pl: $(swig-pl_DEPS)
-	if test "$(SWIG_PL_DIR)" != "$(SWIG_PL_SRC_DIR)"; then \
+	if test "$$(cd $(SWIG_PL_DIR);pwd)" != "$(SWIG_PL_SRC_DIR)"; then \
 	  ln -sf $(SWIG_PL_SRC_DIR)/native/*.c $(SWIG_PL_DIR)/native; \
 	fi
 	cd $(SWIG_PL_DIR)/native; $(MAKE) OPTIMIZE="" OTHERLDFLAGS="$(SWIG_LDFLAGS)"
@@ -705,8 +705,7 @@
 	fi
 	for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \
 	do \
-	  cd $$d; \
-	  rm -rf *.lo *.la *.o .libs; \
+	  (cd $$d && rm -rf *.lo *.la *.o .libs); \
 	done
 	if [ -f "$(SWIG_PL_DIR)/native/Makefile" ]; then \
 	  cd $(SWIG_PL_DIR)/native; $(MAKE) clean; \
@@ -739,7 +738,7 @@
 	fi
 	for d in $(SWIG_PY_DIR) $(SWIG_PY_DIR)/libsvn_swig_py; \
 	do \
-	  cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \
+	  (cd $$d && rm -rf *.lo *.la *.o *.pyc .libs); \
 	done
 	find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'
 
@@ -763,8 +762,7 @@
 	fi
 	for d in $(SWIG_RB_DIR) $(SWIG_RB_DIR)/libsvn_swig_ruby; \
 	do \
-	  cd $$d; \
-	  rm -rf *.lo *.la *.o .libs; \
+	  (cd $$d && rm -rf *.lo *.la *.o .libs); \
 	done
 
 extraclean-swig-rb: clean-swig-rb
--- a/build/generator/gen_make.py
+++ b/build/generator/gen_make.py
@@ -183,9 +183,9 @@
       source_dir = build_path_dirname(source)
       opts = self.swig.opts[objname.lang]
       if not self.release_mode:
-        self.ofile.write('%s: %s\n' % (objname, deps) +
-          '\t$(SWIG) $(SWIG_INCLUDES) %s ' % opts +
-          '-o $@ $(top_srcdir)/%s\n' % source
+        self.ofile.write('$(top_srcdir)/%s:' % objname +
+                         ' $(top_srcdir)/%s %s\n' % (source, deps) +
+          '\t$(SWIG) $(SWIG_INCLUDES) %s -o $@ $<\n' % opts
         )
 
     self.ofile.write('\n')
--- a/build/generator/gen_base.py
+++ b/build/generator/gen_base.py
@@ -284,7 +284,8 @@
 
 class SWIGSource(SourceFile):
   def __init__(self, filename):
-    SourceFile.__init__(self, filename, build_path_dirname(filename))
+    SourceFile.__init__(self, filename,
+                        build_path_dirname('$(top_srcdir)/' + filename))
   pass
 
 lang_abbrev = {