Avoid echoing comment from makefile recipe
authorMark McLoughlin <markmc@redhat.com>
Tue, 14 Jan 2014 10:51:41 +0000 (10:51 +0000)
committerMark McLoughlin <markmc@redhat.com>
Tue, 14 Jan 2014 13:57:10 +0000 (13:57 +0000)
We include a comment to explain why nova-compute-instance.yaml is
included in the prerequisite list for overcloud.yaml, but this comment
gets echoed by make before it executes the recipe using a shell.

  $> make overcloud.yaml
  # overcloud-source.yaml [..] won't work here because [..]
  # a prerequisite but don't want to pass it into merge.py
  python ./tripleo_heat_merge/merge.py overcloud-source.yaml [..]
  mv overcloud.yaml.tmp overcloud.yaml

Instead, maintain a list of files included by overcloud.yaml in a
variable and put a comment above that.

Change-Id: I1af69fbb33e1833170f086aec9b54c5c4e57138f

Makefile

index b05f951..cdfd9a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
-overcloud.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml
-       # $^ won't work here because we want to list nova-compute-instance.yaml as
-       # a prerequisite but don't want to pass it into merge.py
+# Files included in overcloud-source.yaml via FileInclude
+overcloud_source_deps = nova-compute-instance.yaml
+
+overcloud.yaml: overcloud-source.yaml swift-source.yaml $(overcloud_source_deps)
        python ./tripleo_heat_merge/merge.py overcloud-source.yaml swift-source.yaml > $@.tmp
        mv $@.tmp $@