diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-12 12:31:31 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-12 12:31:31 -0400 |
commit | 14993a8389e5dbf7e033a93c88c1e77077b209bb (patch) | |
tree | 8041d9ca424d2141ff60b21b84c1a4ebf2b371c9 /sd_daemon/Makefile | |
parent | 2283404f9e5b6f4dfdf044c3cd7d1d1efac71289 (diff) |
Have the Makefile be AutoThing friendly.
While it mostly played nice with autothing before, by having autothing
treat `go generate` as an opaque step, it didn't populate `files.src.gen`.
Diffstat (limited to 'sd_daemon/Makefile')
-rw-r--r-- | sd_daemon/Makefile | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sd_daemon/Makefile b/sd_daemon/Makefile index 1d8579e..2a67514 100644 --- a/sd_daemon/Makefile +++ b/sd_daemon/Makefile @@ -12,14 +12,36 @@ # See the License for the specific language governing permissions and # limitations under the License. +# header +ifneq ($(topsrcdir),) +include $(topsrcdir)/build-aux/Makefile.head.mk +else +srcdir = . +.DEFAULT_GOAL = files.generate +endif + +# body + files.src.gen += log_util.go +ifeq ($(topsrcdir),) files.generate: $(files.src.gen) maintainer-clean: rm -f -- $(files.src.gen) .PHONY: files.generate maintainer-clean +.DELETE_ON_ERROR: +endif -%.go: %.go.gen - ./$^ > $@ +$(srcdir)/%.go: $(srcdir)/%.go.gen + cd $(@D) && ./$(^F) > $(@F) +# footer +ifneq ($(topsrcdir),) +include $(topsrcdir)/build-aux/Makefile.tail.mk +else +files.generate: $(files.src.gen) +maintainer-clean: + rm -f -- $(files.src.gen) $(files.src.int) +.PHONY: files.generate maintainer-clean .DELETE_ON_ERROR: +endif |