Find config_rev when under git in remote config dir

This commit is contained in:
Wilson Snyder 2011-10-05 18:36:44 -04:00
parent b03d61e2cf
commit 55bd765ea0
2 changed files with 7 additions and 5 deletions

View File

@ -51,7 +51,7 @@ ifneq ($(words $(CURDIR)),1)
$(error Unsupported: GNU Make cannot build in directories containing spaces, build elsewhere: '$(CURDIR)') $(error Unsupported: GNU Make cannot build in directories containing spaces, build elsewhere: '$(CURDIR)')
endif endif
UNDER_GIT = $(wildcard ../.git/logs/HEAD) UNDER_GIT = $(wildcard ${srcdir}/../.git/logs/HEAD)
#********************************************************************* #*********************************************************************
@ -82,9 +82,9 @@ prefiles::
ifneq ($(UNDER_GIT),) # If local git tree... Else don't burden users ifneq ($(UNDER_GIT),) # If local git tree... Else don't burden users
prefiles:: config_rev.h prefiles:: config_rev.h
# This output goes into srcdir, as we need to distribute it as part of the kit. # This output goes into srcdir if locally configured, as we need to distribute it as part of the kit.
config_rev.h: config_rev.pl ../.git/logs/HEAD config_rev.h: ${srcdir}/config_rev.pl ${srcdir}/../.git/logs/HEAD
$(PERL) config_rev.pl . >$@ $(PERL) ${srcdir}/config_rev.pl ${srcdir} >$@
endif endif
maintainer-copy:: maintainer-copy::
@ -96,3 +96,6 @@ clean mostlyclean distclean maintainer-clean::
distclean maintainer-clean:: distclean maintainer-clean::
-rm -f Makefile Makefile_obj config_build.h -rm -f Makefile Makefile_obj config_build.h
maintainer-clean::
-rm -f config_rev.h

View File

@ -141,7 +141,6 @@ clean mostlyclean distclean maintainer-clean::
distclean maintainer-clean:: clean distclean maintainer-clean:: clean
maintainer-clean:: maintainer-clean::
-rm -f config_rev.h
maintainer-copy:: maintainer-copy::