Browse Source

Proposal for the symlink include and pythonpath to get around the sourcetree layout we chose.

The reason is so that we can omit /cpp/ from #include statements, and that
we can have common base names for python modules (like isc) from different directories.

This extension creates, in the build directory, two directories that contain symlinks. The relevant symlinks are made one by one, as i haven't thought of a way to derive that information automatically. If we add a directory that contains stuff another part depends on, we'll need to add it here.

It currently is not used by the python scripts and cpp makefiles. To do so do the following:

C++:

In your Makefile.am, change 
AM_CPPFLAGS = -I$(top_srcdir)/src/lib
to
AM_CPPFLAGS = -I$(top_builddir)/include

and remove all /cpp parts from the relevant include statements


Python:

change your startup script .in file to have PYTHONPATH=@top_builddir@/pyshared instead of the paths with the /python at the end.






git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@606 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
aadbb808c1
1 changed files with 25 additions and 0 deletions
  1. 25 0
      Makefile.am

+ 25 - 0
Makefile.am

@@ -30,3 +30,28 @@ report-coverage:
 
 coverage: clean-coverage perform-coverage report-coverage
 
+pyshared:
+	mkdir pyshared
+	mkdir pyshared/isc
+	ln -s ${abs_top_srcdir}/src/lib/config/python/isc/config pyshared/isc/config
+	ln -s ${abs_top_srcdir}/src/lib/cc/python/ISC/CC pyshared/isc/cc
+
+include:
+	mkdir include
+	ln -s ${abs_top_srcdir}/src/lib/cc/cpp include/cc
+	ln -s ${abs_top_srcdir}/src/lib/config/cpp include/config
+	ln -s ${abs_top_srcdir}/src/lib/dns/cpp include/dns
+
+stree_symlinks:	pyshared include
+.PHONY: stree_symlinks
+
+all: stree_symlinks
+clean-local:
+	rm pyshared/isc/config
+	rm pyshared/isc/cc
+	rmdir pyshared/isc
+	rmdir pyshared
+	rm include/cc
+	rm include/config
+	rm include/dns
+	rmdir include