Git fatal message while in out of source build
ziva777 opened this issue · 5 comments
ziva777 commented
While in out of source build I got:
$ make clean -sj fatal: not a git repository (or any of the parent directories): .git
which is annoying.
keremet commented
@ziva777 Could you describe in more detail how to reproduce the error? I can't reproduce it.
[keremet@host-128 pg_wait_sampling]$ make -sj USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
[keremet@host-128 pg_wait_sampling]$ make -s USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
[keremet@host-128 pg_wait_sampling]$ make USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
rm -f pg_wait_sampling.so libpg_wait_sampling.a libpg_wait_sampling.pc
rm -f pg_wait_sampling--1.1.sql
rm -f pg_wait_sampling.o collector.o compat.o pg_wait_sampling.bc collector.bc compat.bc
rm -rf pg_wait_sampling--1.1.sql
rm -rf results/ regression.diffs regression.out tmp_check/ tmp_check_iso/ log/ output_iso/
[keremet@host-128 pg_wait_sampling]$
rjuju commented
You can reproduce it easily downlading a tarball rather than cloning the repository. It comes from https://github.com/postgrespro/pg_wait_sampling/blob/master/Makefile#L31
DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2)
which is evaluated even if you're not using the "package" target. I guess you could move the zip file generation in the package rules rather than dependency? The zip file generation is very fast so it's not really a problem if you overwrite it.