| 
														
															@@ -16,15 +16,31 @@ CFLAGS = -Wall -g 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 export PACKAGE=tor 
														 | 
														
														 | 
														
															 export PACKAGE=tor 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 include /usr/share/dpatch/dpatch.make 
														 | 
														
														 | 
														
															 include /usr/share/dpatch/dpatch.make 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+# Do not optimize the build with "noopt" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 
														 | 
														
														 | 
														
															 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	CFLAGS += -O0 
														 | 
														
														 | 
														
															 	CFLAGS += -O0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 else 
														 | 
														
														 | 
														
															 else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	CFLAGS += -O2 
														 | 
														
														 | 
														
															 	CFLAGS += -O2 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 endif 
														 | 
														
														 | 
														
															 endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+# Do not strip the binary with "nostrip" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 
														 | 
														
														 | 
														
															 #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #	INSTALL_PROGRAM += -s 
														 | 
														
														 | 
														
															 #	INSTALL_PROGRAM += -s 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #endif 
														 | 
														
														 | 
														
															 #endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+# Prevent the design paper from being built with "nodoc" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	BUILD_DOC = no 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+# Prevent the unit tests from being run with "nocheck" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	RUN_TEST = no 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ifneq (,$(findstring notest,$(DEB_BUILD_OPTIONS))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	RUN_TEST = no 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 configure: patch-stamp 
														 | 
														
														 | 
														
															 configure: patch-stamp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 config.status: configure 
														 | 
														
														 | 
														
															 config.status: configure 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	dh_testdir 
														 | 
														
														 | 
														
															 	dh_testdir 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -46,9 +62,29 @@ build-stamp:  config.status 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	$(MAKE) 
														 | 
														
														 | 
														
															 	$(MAKE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@echo 
														 | 
														
														 | 
														
															 	@echo 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@echo 
														 | 
														
														 | 
														
															 	@echo 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	src/or/test 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	# Running unit tests 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if [ "$(RUN_TEST)" != "no" ]; then \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		src/or/test; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	else \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		echo -e "\n\nSkipping unittests\n\n"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	@echo 
														 | 
														
														 | 
														
															 	@echo 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	# make design paper 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if [ "$(BUILD_DOC)" != "no" ]; then \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		make -C doc/design-paper tor-design.ps tor-design.pdf || \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		( echo -e "*\n*\n*\n*"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo "* Building some docs failed, perhaps because you did not install the"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo "* declared build dependencies and then used -o with dpkg-buildpackage."; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo "*"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo "* If you want to skip this part, you can set nodoc in DEB_BUILD_OPTIONS" ; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo "* and start the build again.  DEB_BUILD_OPTIONS=nodoc dpkg-buildpackage.."; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  echo -e "*\n*\n*\n*"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		  false ); \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	else \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		echo -e "\n\nSkipping tor-design.{ps,pdf}\n\n"; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	touch build-stamp 
														 | 
														
														 | 
														
															 	touch build-stamp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 clean: unpatch 
														 | 
														
														 | 
														
															 clean: unpatch 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -90,6 +126,10 @@ binary-arch: build install 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	dh_testroot 
														 | 
														
														 | 
														
															 	dh_testroot 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	dh_installchangelogs ChangeLog 
														 | 
														
														 | 
														
															 	dh_installchangelogs ChangeLog 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	dh_installdocs 
														 | 
														
														 | 
														
															 	dh_installdocs 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if [ "$(BUILD_DOC)" != "no" ]; then \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		install -m 644 doc/design-paper/tor-design.ps  $(CURDIR)/debian/tor/usr/share/doc/; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		install -m 644 doc/design-paper/tor-design.pdf $(CURDIR)/debian/tor/usr/share/doc/; \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	dh_installexamples 
														 | 
														
														 | 
														
															 	dh_installexamples 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #	dh_install 
														 | 
														
														 | 
														
															 #	dh_install 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #	dh_installdebconf 
														 | 
														
														 | 
														
															 #	dh_installdebconf 
														 |