Permalink
Browse files

MB-100: fixed build error due to bad .PHONY and rule interaction

I still cannot completely get why but change of ns_server.app.src
target to rule _and_ src/ns_server.app.src being presequisite of
.PHONY didn't work well. In this weird case which manifested itself
only when PRODUCT_VERSION is defined (i.e. under voltron), make simply
believed there are no steps for src/ns_server.app.src. Apparently in
this %.app.src rule was not considered.

Anyway, given we don't really need neither PHONY (.app.src depends on
TMP_VER which is .PHONY), nor rule (ns_babysitter.app.src has
hardcoded version so it's not built via sed), we can fix problem by
removing both sides of trouble.

Change-Id: Icd376d6679a86fde097340eefe1c863eb8dccfad
Reviewed-on: http://review.couchbase.org/25501
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
Aliaksey Kandratsenka authored and alk committed Apr 5, 2013
1 parent 414e304 commit 301435b3de03360a323cb5e5eae76ff8a70a0128
Showing with 1 addition and 7 deletions.
  1. +1 −7 Makefile
View
@@ -65,11 +65,9 @@ docs:
ebins: src/ns_server.app.src include/replication_infos_ddoc.hrl deps_all
$(REBAR) compile
-%.app.src: %.app.src.in $(TMP_VER)
+src/ns_server.app.src: src/ns_server.app.src.in $(TMP_VER)
(sed s/0.0.0/'$(if $(PRODUCT_VERSION),$(PRODUCT_VERSION),$(shell cat $(TMP_VER)))$(if $(PRODUCT_LICENSE),-$(PRODUCT_LICENSE))'/g $< > $@) || (rm $@ && false)
-# src/ns_server.app.src: src/ns_server.app.src.in $(TMP_VER)
-
# NOTE: not depending on scripts/build_replication_infos_ddoc.rb because we're uploading both files to git.
# If you need to rebuild this file, remove it first.
include/replication_infos_ddoc.hrl:
@@ -81,10 +79,6 @@ rebuild_replication_infos_ddoc:
.PHONY: rebuild_replication_infos_ddoc
-ifdef PRODUCT_VERSION
-.PHONY: src/ns_server.app.src src/ns_babysitter.app.src
-endif
-
priv/public/js/all-images.js: priv/public/images priv/public/images/spinner scripts/build-all-images.sh
scripts/build-all-images.sh >$@ || (rm $@ && false)

0 comments on commit 301435b

Please sign in to comment.