[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbrowser/maint-2.2] Add dependencies for all build- targets



commit 4078a8417ef7ab8be7a93efd36c69c50dde436e8
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Wed Feb 1 19:10:00 2012 +0100

    Add dependencies for all build- targets
---
 build-scripts/linux.mk    |   34 +++++++++++++++++++++-------------
 build-scripts/osx.mk      |   21 ++++++++++++++-------
 build-scripts/versions.mk |    9 ++++++++-
 build-scripts/windows.mk  |   19 +++++++++++++------
 4 files changed, 56 insertions(+), 27 deletions(-)

diff --git a/build-scripts/linux.mk b/build-scripts/linux.mk
index 5073b70..8f25015 100644
--- a/build-scripts/linux.mk
+++ b/build-scripts/linux.mk
@@ -53,48 +53,55 @@ source-dance: fetch-source unpack-source
 	echo "We're ready for building now."
 
 ZLIB_OPTS=--shared --prefix=$(BUILT_DIR)
-build-zlib:
+build-zlib: $(ZLIB_DIR)
 	cd $(ZLIB_DIR) && ./configure $(ZLIB_OPTS)
 	cd $(ZLIB_DIR) && make -j $(NUM_CORES)
 	cd $(ZLIB_DIR) && make install
+	touch build-zlib
+
+LIBPNG_OPTS=--prefix=$(BUILT_DIR)
+build-libpng: $(LIBPNG_DIR)
+	cd $(LIBPNG_DIR) && ./configure $(LIBPNG_OPTS)
+	cd $(LIBPNG_DIR) && make
+	cd $(LIBPNG_DIR) && make install
+	touch build-libpng
 
 OPENSSL_OPTS=-no-idea -no-rc5 -no-md2 shared zlib --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -I$(BUILT_DIR)/include -L$(BUILT_DIR)/lib
-build-openssl:
+build-openssl: build-zlib $(OPENSSL_DIR)
 	cd $(OPENSSL_DIR) && ./config $(OPENSSL_OPTS)
 	cd $(OPENSSL_DIR) && make depend
 	cd $(OPENSSL_DIR) && make
 	cd $(OPENSSL_DIR) && make install
+	touch build-openssl
 
 QT_BUILD_PREFS=-system-zlib -confirm-license -opensource -openssl-linked -no-qt3support -fast -release -nomake demos -nomake examples
 QT_OPTS=$(QT_BUILD_PREFS) -prefix $(BUILT_DIR) -I $(BUILT_DIR)/include -I $(BUILT_DIR)/include/openssl/ -L$(BUILT_DIR)/lib
-build-qt:
+build-qt: build-zlib build-openssl $(QT_DIR)
 	cd $(QT_DIR) && ./configure $(QT_OPTS)
 	cd $(QT_DIR) && make -j $(NUM_CORES)
 	cd $(QT_DIR) && make install
+	touch build-qt
 
 VIDALIA_OPTS=-DOPENSSL_LIBCRYPTO=$(BUILT_DIR)/lib/libcrypto.so.1.0.0 -DOPENSSL_LIBSSL=$(BUILT_DIR)/lib/libssl.so.1.0.0 -DCMAKE_BUILD_TYPE=debug -DQT_QMAKE_EXECUTABLE=$(BUILT_DIR)/bin/qmake ..
-build-vidalia:
+build-vidalia: build-openssl build-qt $(VIDALIA_DIR)
 	-mkdir $(VIDALIA_DIR)/build
 	cd $(VIDALIA_DIR)/build && cmake $(VIDALIA_OPTS) && make -j $(NUM_CORES)
 	cd $(VIDALIA_DIR)/build && DESTDIR=$(BUILT_DIR) make install
+	touch build-vidalia
 
 LIBEVENT_OPTS=--prefix=$(BUILT_DIR)
-build-libevent:
+build-libevent: build-zlib build-openssl $(LIBEVENT_DIR)
 	cd $(LIBEVENT_DIR) && ./configure $(LIBEVENT_OPTS)
 	cd $(LIBEVENT_DIR) && make -j $(NUM_CORES)
 	cd $(LIBEVENT_DIR) && make install
-
-LIBPNG_OPTS=--prefix=$(BUILT_DIR)
-build-libpng:
-	cd $(LIBPNG_DIR) && ./configure $(LIBPNG_OPTS)
-	cd $(LIBPNG_DIR) && make
-	cd $(LIBPNG_DIR) && make install
+	touch build-libevent
 
 TOR_OPTS=--enable-gcc-warnings --with-openssl-dir=$(BUILT_DIR) --with-zlib-dir=$(BUILT_DIR) --with-libevent-dir=$(BUILT_DIR)/lib --prefix=$(BUILT_DIR)
-build-tor:
+build-tor: build-zlib build-openssl build-libevent $(TOR_DIR)
 	cd $(TOR_DIR) && ./configure $(TOR_OPTS)
 	cd $(TOR_DIR) && make -j $(NUM_CORES)
 	cd $(TOR_DIR) && make install
+	touch build-tor
 
 ## Polipo doesn't use autoconf, so we just have to hack their Makefile
 ## This probably needs to be updated if Polipo ever updates their Makefile
@@ -107,9 +114,10 @@ build-polipo:
 build-pidgin:
 	echo "We're not building pidgin yet!"
 
-build-firefox:
+build-firefox: $(CONFIG_SRC)/dot_mozconfig $(FIREFOX_DIR)
 	cp $(CONFIG_SRC)/dot_mozconfig $(FIREFOX_DIR)/mozconfig
 	cd $(FIREFOX_DIR) && make -f client.mk build
+	touch build-firefox
 
 copy-firefox:
 	-rm -rf $(FETCH_DIR)/Firefox
diff --git a/build-scripts/osx.mk b/build-scripts/osx.mk
index c5cfdfb..947c04e 100644
--- a/build-scripts/osx.mk
+++ b/build-scripts/osx.mk
@@ -66,13 +66,14 @@ source-dance: fetch-source unpack-source
 
 ZLIB_OPTS=--prefix=$(BUILT_DIR)
 ZLIB_CFLAGS="-arch $(ARCH_TYPE)"
-build-zlib:
+build-zlib: $(ZLIB_DIR)
 	cd $(ZLIB_DIR) && CFLAGS=$(ZLIB_CFLAGS) ./configure $(ZLIB_OPTS)
 	cd $(ZLIB_DIR) && make -j $(NUM_CORES)
 	cd $(ZLIB_DIR) && make install
+	touch build-zlib
 
 OPENSSL_OPTS=-no-rc5 -no-md2 -no-man shared zlib $(BACKWARDS_COMPAT) --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -L$(BUILT_DIR)/lib -I$(BUILT_DIR)/include
-build-openssl:
+build-openssl: build-zlib $(OPENSSL_DIR)
 	cp ../src/current-patches/openssl/*patch $(OPENSSL_DIR)
 	cp patch-any-src.sh $(OPENSSL_DIR)
 	cd $(OPENSSL_DIR) && ./patch-any-src.sh
@@ -85,44 +86,50 @@ endif
 # Do not use -j for the following make call, random build errors might happen.
 	cd $(OPENSSL_DIR) && make
 	cd $(OPENSSL_DIR) && make install
+	touch build-openssl
 
 
 QT_BUILD_PREFS=-system-zlib -confirm-license -opensource -openssl-linked -no-qt3support \
 	-fast -release -no-framework -nomake demos -nomake examples $(SDK)
 QT_OPTS=$(QT_BUILD_PREFS) -prefix $(BUILT_DIR) -I $(BUILT_DIR)/include -I $(BUILT_DIR)/include/openssl/ -L $(BUILT_DIR)/lib
-build-qt:
+build-qt: build-zlib build-openssl $(QT_DIR)
 	cd $(QT_DIR) && ./configure $(QT_OPTS)
 	cd $(QT_DIR) && make -j $(NUM_CORES)
 	cd $(QT_DIR) && make install
+	touch build-qt
 
 VIDALIA_OPTS=-DCMAKE_OSX_ARCHITECTURES=$(ARCH_TYPE) -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \
 	-DCMAKE_BUILD_TYPE=debug ..
-build-vidalia:
+build-vidalia: build-openssl build-qt $(VIDALIA_DIR)
 	export MACOSX_DEPLOYMENT_TARGET=$(OSX_VERSION)
 	-mkdir $(VIDALIA_DIR)/build
 	cd $(VIDALIA_DIR)/build && cmake $(VIDALIA_OPTS) \
 	&& make -j $(NUM_CORES) && make dist-osx-libraries
 	cd $(VIDALIA_DIR)/build && DESTDIR=$(BUILT_DIR) make install
+	touch build-vidalia
 
 LIBEVENT_CFLAGS="-O -g -arch $(ARCH_TYPE) $(MIN_VERSION) $(CF_MIN_VERSION) -arch $(ARCH_TYPE)"
 LIBEVENT_LDFLAGS="-L$(BUILT_DIR)/lib $(LD_MIN_VERSION)"
 LIBEVENT_OPTS=--prefix=$(BUILT_DIR) --enable-static --disable-shared --disable-dependency-tracking $(CC)
-build-libevent:
+build-libevent: build-zlib build-openssl $(LIBEVENT_DIR)
 	cd $(LIBEVENT_DIR) && CFLAGS=$(LIBEVENT_CFLAGS) LDFLAGS=$(LIBEVENT_LDFLAGS) ./configure $(LIBEVENT_OPTS)
 	cd $(LIBEVENT_DIR) && make -j $(NUM_CORES)
 	cd $(LIBEVENT_DIR) && make install
+	touch build-libevent
 
 TOR_CFLAGS="-O -g -arch $(ARCH_TYPE) -I$(BUILT_DIR)/include $(MIN_VERSION) $(CF_MIN_VERSION)"
 TOR_LDFLAGS="-L$(BUILT_DIR)/lib $(LD_MIN_VERSION)"
 TOR_OPTS=--enable-static-openssl --enable-static-libevent --with-openssl-dir=$(BUILT_DIR)/lib --with-libevent-dir=$(BUILT_DIR)/lib --prefix=$(BUILT_DIR) --disable-dependency-tracking $(CC)
-build-tor:
+build-tor: build-zlib build-openssl build-libevent $(TOR_DIR)
 	cd $(TOR_DIR) && CFLAGS=$(TOR_CFLAGS) LDFLAGS=$(TOR_LDFLAGS) ./configure $(TOR_OPTS)
 	cd $(TOR_DIR) && make -j $(NUM_CORES)
 	cd $(TOR_DIR) && make install
+	touch build-tor
 
-build-firefox:
+build-firefox: $(FIREFOX_DIR) $(CONFIG_SRC)/mozconfig-osx-$(ARCH_TYPE)
 	cp $(CONFIG_SRC)/mozconfig-osx-$(ARCH_TYPE) $(FIREFOX_DIR)/mozconfig
 	cd $(FIREFOX_DIR) && make -f client.mk build
+	touch build-firefox
 
 copy-firefox:
 	-rm -rf $(FETCH_DIR)/Firefox.app
diff --git a/build-scripts/versions.mk b/build-scripts/versions.mk
index 9bd254d..da23ea1 100644
--- a/build-scripts/versions.mk
+++ b/build-scripts/versions.mk
@@ -171,4 +171,11 @@ clean-unpack-%:
 
 clean-unpack: clean-unpack-zlib clean-unpack-libpng clean-unpack-qt clean-unpack-openssl clean-unpack-vidalia clean-unpack-libevent clean-unpack-tor clean-unpack-firefox
 
-.PHONY: clean-fetch clean-unpack
+clean-build-%:
+	rm -rf $($($*)_DIR)
+	rm -rf build-$*
+
+clean-build: clean-build-zlib clean-build-libpng clean-build-qt clean-build-openssl clean-build-vidalia clean-build-libevent clean-build-tor clean-build-firefox
+
+.PHONY: clean-fetch clean-unpack clean-build
+
diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk
index 862cd40..046baa4 100644
--- a/build-scripts/windows.mk
+++ b/build-scripts/windows.mk
@@ -73,40 +73,46 @@ include $(PWD)/versions.mk
 source-dance: fetch-source unpack-source
 	echo "We're ready for building now."
 
-build-zlib:
+build-zlib: $(ZLIB_DIR)
 	cd $(ZLIB_DIR) && sed -i -e "s%prefix = /usr/local%prefix = ${BUILT_DIR}%" win32/Makefile.gcc
 	cd $(ZLIB_DIR) && LDFLAGS="-Wl,--nxcompat -Wl,--dynamicbase" make -f win32/Makefile.gcc -j $(NUM_CORES)
 	cd $(ZLIB_DIR) && BINARY_PATH="$(BUILT_DIR)/bin" INCLUDE_PATH="$(BUILT_DIR)/include" LIBRARY_PATH="$(BUILT_DIR)/lib" make -f win32/Makefile.gcc install
+	touch build-zlib
 
 OPENSSL_OPTS=-no-idea -no-rc5 -no-md2 shared zlib --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -L$(BUILT_DIR)/lib -Wl,--nxcompat -Wl,--dynamicbase -I$(BUILT_DIR)/include
-build-openssl:
+build-openssl: build-zlib $(OPENSSL_DIR)
 	cd $(OPENSSL_DIR) && ./config $(OPENSSL_OPTS)
 	cd $(OPENSSL_DIR) && make depend
 	cd $(OPENSSL_DIR) && make
 	cd $(OPENSSL_DIR) && make install
+	touch build-openssl
 
 VIDALIA_OPTS=-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -Wl,--nxcompat -Wl,--dynamicbase" -DWIN2K=1 -DQT_MAKE_EXECUTABLE=/c/Qt/$(QT_VER)/bin/qmake -DCMAKE_BUILD_TYPE=minsizerel -DMINGW_BINARY_DIR=$(MING) -DOPENSSL_BINARY_DIR=$(OPENSSL) -DWIX_BINARY_DIR=$(WIX_LIB)
-build-vidalia:
+# XXX Once we build qt on windows, we'll want to add build-qt here
+build-vidalia: build-openssl $(VIDALIA_DIR)
 	-mkdir $(VIDALIA_DIR)/build
 	cd $(VIDALIA_DIR)/build && cmake -G "MSYS Makefiles" $(VIDALIA_OPTS) ..
 	cd $(VIDALIA_DIR)/build && make -j $(NUM_CORES)
+	touch build-vidalia
 
 LIBEVENT_CFLAGS="-I$(BUILT_DIR)/include -O -g"
 LIBEVENT_LDFLAGS="-L$(BUILT_DIR)/lib -L$(BUILT_DIR)/bin -Wl,--nxcompat -Wl,--dynamicbase"
 LIBEVENT_OPTS=--prefix=$(BUILT_DIR) --enable-static --disable-shared --disable-dependency-tracking
-build-libevent:
+build-libevent: build-zlib build-openssl $(LIBEVENT_DIR)
 	cd $(LIBEVENT_DIR) && CFLAGS=$(LIBEVENT_CFLAGS) LDFLAGS=$(LIBEVENT_LDFLAGS) ./configure $(LIBEVENT_OPTS)
 	cd $(LIBEVENT_DIR) && make -j $(NUM_CORES)
 	cd $(LIBEVENT_DIR) && make install
+	touch build-libevent
 
 TOR_CFLAGS="-O -g -I$(BUILT_DIR)/include"
 TOR_LDFLAGS="-L$(BUILT_DIR)/lib -L$(BUILT_DIR)/bin"
 TOR_OPTS=--enable-static-libevent --with-libevent-dir=$(BUILT_DIR)/lib --prefix=$(BUILT_DIR)
 build-tor:PATH+=:$(BUILT_DIR)/bin
-build-tor:
+build-tor: build-zlib build-openssl build-libevent $(TOR_DIR)
 	cd $(TOR_DIR) && CFLAGS=$(TOR_CFLAGS) LDFLAGS=$(TOR_LDFLAGS) ./configure $(TOR_OPTS)
 	cd $(TOR_DIR) && make -j $(NUM_CORES)
 	cd $(TOR_DIR) && make install
+	touch build-tor
 
 patch-mozbuild:
 	cp ../src/current-patches/mozilla-build/start-msvc.patch $(MOZ_BUILD)
@@ -114,9 +120,10 @@ patch-mozbuild:
 	cp patch-mozilla-build.sh $(MOZ_BUILD)
 	cd $(MOZ_BUILD) && ./patch-mozilla-build.sh $(MSVC_VER)
 
-build-firefox:
+build-firefox: $(FIREFOX_DIR) $(CONFIG_SRC)/dot_mozconfig $(MOZ_BUILD) $(MOZ_BUILD)/start-msvc$(MSVC_VER).bat
 	cp $(CONFIG_SRC)/dot_mozconfig $(FIREFOX_DIR)/mozconfig
 	cd $(MOZ_BUILD) && cmd.exe /c "start-msvc$(MSVC_VER).bat $(FIREFOX_DIR)"
+	touch build-firefox
 
 copy-firefox:
 	-rm -rf $(FIREFOX)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits