commit ed8185ac00b355b036f25055bbdf831284fb9531 Author: Sebastian Hahn sebastian@torproject.org Date: Tue Apr 24 15:03:00 2012 +0200
Extract common build-tor functionality
This is just duplicated code atm, which we should get rid of as much as possible. --- build-scripts/linux.mk | 5 ----- build-scripts/osx.mk | 5 ----- build-scripts/versions.mk | 7 +++++++ build-scripts/windows.mk | 7 +------ 4 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/build-scripts/linux.mk b/build-scripts/linux.mk index fa776de..6441b25 100644 --- a/build-scripts/linux.mk +++ b/build-scripts/linux.mk @@ -78,11 +78,6 @@ build-libevent: build-zlib build-openssl $(LIBEVENT_DIR) touch $(STAMP_DIR)/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-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 $(STAMP_DIR)/build-tor
build-pidgin: echo "We're not building pidgin yet!" diff --git a/build-scripts/osx.mk b/build-scripts/osx.mk index 8b61137..4619c78 100644 --- a/build-scripts/osx.mk +++ b/build-scripts/osx.mk @@ -98,11 +98,6 @@ build-libevent: build-zlib build-openssl $(LIBEVENT_DIR) TOR_CFLAGS="-arch $(ARCH_TYPE) -I$(BUILT_DIR)/include $(MIN_VERSION) $(CF_MIN_VERSION)" TOR_LDFLAGS="-L$(BUILT_DIR)/lib $(LD_MIN_VERSION)" TOR_OPTS=--enable-gcc-warnings-advisory --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-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 $(STAMP_DIR)/build-tor
build-firefox: $(FIREFOX_DIR) config/mozconfig-osx-$(ARCH_TYPE) cp config/mozconfig-osx-$(ARCH_TYPE) $(FIREFOX_DIR)/mozconfig diff --git a/build-scripts/versions.mk b/build-scripts/versions.mk index bc2d689..fdc67c0 100644 --- a/build-scripts/versions.mk +++ b/build-scripts/versions.mk @@ -230,6 +230,13 @@ $(OBFSPROXY_DIR): $(FETCH_DIR)/$(OBFSPROXY_PACKAGE) | $(BUILD_DIR) cd $(FETCH_DIR) && tar -xmf $(OBFSPROXY_PACKAGE) -C $(BUILD_DIR)/
+# Common build functionality. Modified by variables set in OS-specific makefiles +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 $(STAMP_DIR)/build-tor + clean-fetch-%: rm -rf $(FETCH_DIR)/$($($*)_PACKAGE)
diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk index 3a1acd4..135989f 100644 --- a/build-scripts/windows.mk +++ b/build-scripts/windows.mk @@ -98,12 +98,7 @@ build-libevent: build-zlib build-openssl $(LIBEVENT_DIR) TOR_CFLAGS="-I$(BUILT_DIR)/include" TOR_LDFLAGS="-L$(BUILT_DIR)/lib -L$(BUILT_DIR)/bin" TOR_OPTS=--enable-gcc-warnings --enable-static-libevent --with-libevent-dir=$(BUILT_DIR)/lib --prefix=$(BUILT_DIR) -build-tor:PATH+=:$(BUILT_DIR)/bin -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 $(STAMP_DIR)/build-tor +build-tor:PATH+=:$(BUILT_DIR)/bin
build-firefox: $(FIREFOX_DIR) config/dot_mozconfig $(MOZBUILD_DIR) $(MOZBUILD_DIR)/start-msvc$(MSVC_VER).bat | $(PYTHON) $(PYMAKE_DIR) cp config/dot_mozconfig $(FIREFOX_DIR)/mozconfig
tor-commits@lists.torproject.org