diff --git a/.gitignore b/.gitignore index caad3b393..b7661e6e2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,8 @@ tsconfig.tsbuildinfo build/ # GNU-style build system -/configure -/build-system/config.mk -/.config.mk +configure +.config.mk # Editor files \#*\# diff --git a/Makefile b/Makefile index 2cf44cc5b..04ae43c81 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ ava = node_modules/.bin/ava nyc = node_modules/nyc/bin/nyc.js git-archive-all = ./build-system/taler-build-scripts/archive-with-submodules/git_archive_all.py -include ./build-system/config.mk +include .config.mk .PHONY: dist dist: @@ -105,26 +105,6 @@ i18n: compile # Some commands are only available when ./configure has been run -ifndef prefix -.PHONY: warn-noprefix install -warn-noprefix: - @echo "no prefix configured, did you run ./configure?" -install: warn-noprefix -else -install_target = $(prefix)/lib/taler-wallet-cli -.PHONY: install -install: - pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... - install -d $(prefix)/bin - install -d $(install_target)/bin - install -d $(install_target)/node_modules/taler-wallet-cli - install -d $(install_target)/node_modules/taler-wallet-cli/bin - install -d $(install_target)/node_modules/taler-wallet-cli/dist - install ./packages/taler-wallet-cli/dist/taler-wallet-cli.js $(install_target)/node_modules/taler-wallet-cli/dist/ - install ./packages/taler-wallet-cli/dist/taler-wallet-cli.js.map $(install_target)/node_modules/taler-wallet-cli/dist/ - install ./packages/taler-wallet-cli/bin/taler-wallet-cli $(install_target)/node_modules/taler-wallet-cli/bin/ - ln -sf $(install_target)/node_modules/taler-wallet-cli/bin/taler-wallet-cli $(prefix)/bin/taler-wallet-cli -endif .PHONY: lint lint: diff --git a/bootstrap b/bootstrap index d862b5652..ea03b913d 100755 --- a/bootstrap +++ b/bootstrap @@ -11,8 +11,16 @@ if ! git --version >/dev/null; then fi git submodule update --init -rm -rf configure -cp build-system/taler-build-scripts/configure ./configure -# Try making the configure script read-only to prevent -# accidental changes in the wrong place. -chmod ogu-w ./configure || true + +copy_configure() { + src=$1 + dst=$2 + rm -f $dst + cp $src $dst + # Try making the configure script read-only to prevent + # accidental changes in the wrong place. + chmod ogu-w $dst || true +} +our_configure=build-system/taler-build-scripts/configure +copy_configure "$our_configure" ./configure +copy_configure "$our_configure" ./packages/taler-wallet-cli/configure diff --git a/packages/taler-wallet-cli/Makefile b/packages/taler-wallet-cli/Makefile new file mode 100644 index 000000000..f898d0174 --- /dev/null +++ b/packages/taler-wallet-cli/Makefile @@ -0,0 +1,27 @@ +# This Makefile has been placed in the public domain. + +include .config.mk + +all: + @echo use 'make install' to build and install taler-wallet-cli + +ifndef prefix +.PHONY: warn-noprefix install +warn-noprefix: + @echo "no prefix configured, did you run ./configure?" +install: warn-noprefix +else +install_target = $(prefix)/lib/taler-wallet-cli +.PHONY: install +install: + pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... + install -d $(prefix)/bin + install -d $(install_target)/bin + install -d $(install_target)/node_modules/taler-wallet-cli + install -d $(install_target)/node_modules/taler-wallet-cli/bin + install -d $(install_target)/node_modules/taler-wallet-cli/dist + install ./dist/taler-wallet-cli.js $(install_target)/node_modules/taler-wallet-cli/dist/ + install ./dist/taler-wallet-cli.js.map $(install_target)/node_modules/taler-wallet-cli/dist/ + install ./bin/taler-wallet-cli $(install_target)/node_modules/taler-wallet-cli/bin/ + ln -sf $(install_target)/node_modules/taler-wallet-cli/bin/taler-wallet-cli $(prefix)/bin/taler-wallet-cli +endif