pkg/Makefile.am: remove 'cd $(srcdir)'

It's now possible to run build.js from any directory.  Demonstrate that
by removing the `cd` that we've been depending on to make it work.  Use
the new `-o` option to direct the output to the srcdir instead.  That
means that this commit changes absolutely nothing, but it's still
important: it demonstrates that the out-of-srcdir invocation works (and
tests that it will continue to work).

In the future we hope to remove 'dist/' from the tarballs, which means
that it will be a purely built artifact, changing the logic of which
directory it belongs in.  At that point we can simply drop the '-o'
option and let it land in the default location, the `builddir`.
This commit is contained in:
Allison Karlitskaya 2026-11-02 13:19:53 +01:00 committed by Allison Karlitskaya
parent aebeeaaa58
commit 7a887d89b2

View file

@ -31,7 +31,7 @@ V_BUNDLE_0 = @echo " BUNDLE dist";
# but this is just a representative for all of dist/*
$(DIST_STAMP): $(srcdir)/package-lock.json $(PKG_INPUTS)
@rm -f $(DIST_STAMP)
$(V_BUNDLE) cd $(srcdir) && NODE_ENV='$(NODE_ENV)' ./build.js
$(V_BUNDLE) NODE_ENV='$(NODE_ENV)' '$(srcdir)/build.js' -o '$(srcdir)'
EXTRA_DIST += build.js files.js package.json package-lock.json