From 463f112ae5c58d1fe71d0b457ccd977e26412cb7 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 28 Oct 2023 12:18:56 +0900 Subject: [PATCH] moved the -C option to the beginning of the go build command --- go/Makefile.am | 14 +++++++------- go/Makefile.in | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go/Makefile.am b/go/Makefile.am index 62dca81..725a7cb 100644 --- a/go/Makefile.am +++ b/go/Makefile.am @@ -21,13 +21,13 @@ hclgo_DEPENDENCIES = hclgo.bin hclgo_LINK = mv -f hclgo.bin hclgo$(EXEEXT) || echo "FAILED TO LINK" hclgo.bin: - cp -pf $(abs_srcdir)/go.mod $(abs_builddir)/go.mod >/dev/null 2>&1 || true - chmod u+w $(abs_builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change - sed -ri "/^[[:space:]]*replace[[:space:]]+cfg[[:space:]]*=>/d" $(abs_builddir)/go.mod - echo -e "\nreplace cfg => $(abs_builddir)/cfg" >> $(abs_builddir)/go.mod - [ -f $(abs_srcdir)/go.sum ] && cp -pf $(abs_srcdir)/go.sum $(abs_builddir)/go.sum >/dev/null 2>&1 || true - go build -x -o $(abs_builddir)/hclgo.bin -C $(srcdir) -modfile $(abs_builddir)/go.mod - go clean -x -C $(srcdir) -modfile $(abs_builddir)/go.mod + cp -pf $(srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true + chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change + sed -ri "/^[[:space:]]*replace[[:space:]]+cfg[[:space:]]*=>/d" $(builddir)/go.mod + echo -e "\nreplace cfg => $(abs_builddir)/cfg" >> $(builddir)/go.mod + [ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true + go build -C $(srcdir) -x -o $(abs_builddir)/hclgo.bin -modfile $(abs_builddir)/go.mod + go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod ## the go to o recipe is fake to deceive make .go.o: diff --git a/go/Makefile.in b/go/Makefile.in index 1831d66..f19b801 100644 --- a/go/Makefile.in +++ b/go/Makefile.in @@ -619,13 +619,13 @@ uninstall-am: uninstall-binPROGRAMS hclgo.bin: - cp -pf $(abs_srcdir)/go.mod $(abs_builddir)/go.mod >/dev/null 2>&1 || true - chmod u+w $(abs_builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change - sed -ri "/^[[:space:]]*replace[[:space:]]+cfg[[:space:]]*=>/d" $(abs_builddir)/go.mod - echo -e "\nreplace cfg => $(abs_builddir)/cfg" >> $(abs_builddir)/go.mod - [ -f $(abs_srcdir)/go.sum ] && cp -pf $(abs_srcdir)/go.sum $(abs_builddir)/go.sum >/dev/null 2>&1 || true - go build -x -o $(abs_builddir)/hclgo.bin -C $(srcdir) -modfile $(abs_builddir)/go.mod - go clean -x -C $(srcdir) -modfile $(abs_builddir)/go.mod + cp -pf $(srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true + chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change + sed -ri "/^[[:space:]]*replace[[:space:]]+cfg[[:space:]]*=>/d" $(builddir)/go.mod + echo -e "\nreplace cfg => $(abs_builddir)/cfg" >> $(builddir)/go.mod + [ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true + go build -C $(srcdir) -x -o $(abs_builddir)/hclgo.bin -modfile $(abs_builddir)/go.mod + go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod .go.o: echo $< > $@