Remove svn_version.h
This commit is contained in:
parent
e345110555
commit
a9c9e8ff8e
9
Makefile
9
Makefile
@ -1,6 +1,6 @@
|
||||
# ***************************************************** -*- Makefile -*-
|
||||
#
|
||||
# Copyright (C) 2004-2015 Andreas Huggel <ahuggel@gmx.net>
|
||||
# Copyright (C) 2004-2017 Andreas Huggel <ahuggel@gmx.net>
|
||||
#
|
||||
# This Makefile is part of the Exiv2 distribution.
|
||||
#
|
||||
@ -133,12 +133,9 @@ configure:
|
||||
config:
|
||||
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
|
||||
|
||||
xmpsdk: src/svn_version.h config/config.mk
|
||||
xmpsdk: config/config.mk
|
||||
if test "x$(ENABLE_XMP)" = "x1"; then cd xmpsdk/src && $(MAKE) $@; fi;
|
||||
|
||||
src/svn_version.h:
|
||||
cd src && $(MAKE) svn_version.h
|
||||
|
||||
mostlyclean clean: config/config.mk
|
||||
cd src && $(MAKE) $(MAKECMDGOALS)
|
||||
cd doc && $(MAKE) $(MAKECMDGOALS)
|
||||
@ -147,7 +144,7 @@ mostlyclean clean: config/config.mk
|
||||
cd xmpsdk/src && $(MAKE) $(MAKECMDGOALS)
|
||||
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
|
||||
cd po && $(MAKE) $(MAKECMDGOALS)
|
||||
rm -f include/exiv2/exv_conf.h src/svn_version.h
|
||||
rm -f include/exiv2/exv_conf.h
|
||||
|
||||
# `make distclean' also removes files created by configuring
|
||||
# the program. Running `make all distclean' prepares the project
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# ***************************************************** -*- Makefile -*-
|
||||
#
|
||||
# Copyright (C) 2004-2015 Andreas Huggel <ahuggel@gmx.net>
|
||||
# Copyright (C) 2004-2017 Andreas Huggel <ahuggel@gmx.net>
|
||||
#
|
||||
# This Makefile is part of the Exiv2 distribution.
|
||||
#
|
||||
@ -133,12 +133,9 @@ configure:
|
||||
config:
|
||||
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
|
||||
|
||||
xmpsdk: src/svn_version.h config/config.mk
|
||||
xmpsdk: config/config.mk
|
||||
if test "x$(ENABLE_XMP)" = "x1"; then cd xmpsdk/src && $(MAKE) $@; fi;
|
||||
|
||||
src/svn_version.h:
|
||||
cd src && $(MAKE) svn_version.h
|
||||
|
||||
mostlyclean clean: config/config.mk
|
||||
cd src && $(MAKE) $(MAKECMDGOALS)
|
||||
cd doc && $(MAKE) $(MAKECMDGOALS)
|
||||
@ -147,7 +144,7 @@ mostlyclean clean: config/config.mk
|
||||
cd xmpsdk/src && $(MAKE) $(MAKECMDGOALS)
|
||||
cd config && $(MAKE) -f config.make $(MAKECMDGOALS)
|
||||
cd po && $(MAKE) $(MAKECMDGOALS)
|
||||
rm -f include/exiv2/exv_conf.h src/svn_version.h
|
||||
rm -f include/exiv2/exv_conf.h
|
||||
|
||||
# `make distclean' also removes files created by configuring
|
||||
# the program. Running `make all distclean' prepares the project
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
#ifndef SVN_VERSION
|
||||
#define SVN_VERSION 0
|
||||
#endif
|
||||
15
src/Makefile
15
src/Makefile
@ -227,18 +227,12 @@ ifdef DEP_TRACKING
|
||||
-include $(DEP)
|
||||
endif
|
||||
|
||||
# Be sure to rewrite exv_conf.h and svn_version.h before compiling anything
|
||||
$(SRC): ../include/exiv2/exv_conf.h svn_version.h
|
||||
# Be sure to rewrite exv_conf.h before compiling anything
|
||||
$(SRC): ../include/exiv2/exv_conf.h
|
||||
|
||||
../include/exiv2/exv_conf.h: $(top_srcdir)/config/config.h
|
||||
LC_ALL=C sed 's/#define \([A-Z]\)/#define EXV_\1/; s/#undef \([A-Z]\)/#undef EXV_\1/' < $< > $@
|
||||
|
||||
# svn_version.h is only rewritten when the svn info | grep Revision has changed
|
||||
svn_version.h:
|
||||
./svn_version.sh
|
||||
|
||||
version.hpp : svn_version.h
|
||||
|
||||
$(LIBTOOL): $(LIBTOOL_DEPS)
|
||||
$(SHELL) $(top_srcdir)/config.status --recheck
|
||||
|
||||
@ -263,10 +257,6 @@ install-header:
|
||||
$(INSTALL_DATA) ../include/exiv2/$$p $(DESTDIR)$(incdir)/$$p; \
|
||||
else :; fi; \
|
||||
done ; \
|
||||
if test -e svn_version.h; then \
|
||||
echo "$(INSTALL_DATA) svn_version.h $(DESTDIR)$(incdir)/svn_version.h"; \
|
||||
$(INSTALL_DATA) svn_version.h $(DESTDIR)$(incdir)/svn_version.h; \
|
||||
fi
|
||||
|
||||
install-lib: lib install-header
|
||||
$(INSTALL_DIRS) $(DESTDIR)$(libdir)
|
||||
@ -288,7 +278,6 @@ uninstall-header:
|
||||
echo "$(RM) $(DESTDIR)$(incdir)/$$p"; \
|
||||
$(RM) $(DESTDIR)$(incdir)/$$p; \
|
||||
done
|
||||
$(RM) $(DESTDIR)$(incdir)/svn_version.h
|
||||
-rmdir $(DESTDIR)$(incdir)
|
||||
|
||||
uninstall-lib: uninstall-header
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
##
|
||||
# update svn_version_h when revision changes
|
||||
##
|
||||
|
||||
svn_version_h=svn_version.h
|
||||
svn_version=$(svn info .. 2>/dev/null)
|
||||
s=$?
|
||||
|
||||
##
|
||||
# from Jenkins, svn is almost always a disaster because
|
||||
# Jenkins SVN Plugin is 1.7 and the build machine is normally at least 1.8
|
||||
if [ "$s" == "0" ]; then
|
||||
svn_version=$(svn info .. | grep '^Last Changed Rev' | cut -f 2 -d':' | tr -d ' ')
|
||||
if [ -z "$svn_version" ]; then svn_version=0 ; fi
|
||||
else
|
||||
svn_version=0
|
||||
fi
|
||||
|
||||
##
|
||||
# report svn_version to output
|
||||
set | grep svn_version | grep -v -e BASH | grep -v -e $svn_version_h
|
||||
|
||||
##
|
||||
# sniff svn_version in svn_version.h and delete the file if incorrect
|
||||
if [ -e "$svn_version_h" ]; then
|
||||
old=$(cut -f 3 -d' ' "$svn_version_h")
|
||||
if [ "$old" != "$svn_version" ]; then
|
||||
rm -rf "$svn_version_h"
|
||||
fi
|
||||
fi
|
||||
|
||||
##
|
||||
# write svn_version to file
|
||||
if [ ! -e "$svn_version_h" ]; then
|
||||
echo "#ifndef SVN_VERSION" > "$svn_version_h"
|
||||
echo "#define SVN_VERSION $svn_version" >> "$svn_version_h"
|
||||
echo "#endif" >> "$svn_version_h"
|
||||
fi
|
||||
|
||||
# That's all Folks!
|
||||
##
|
||||
@ -82,7 +82,6 @@ EXIV2_RCSID("@(#) $Id$")
|
||||
#endif
|
||||
|
||||
#include "http.hpp"
|
||||
#include "svn_version.h"
|
||||
#include "version.hpp"
|
||||
#include "makernote_int.hpp"
|
||||
|
||||
@ -526,7 +525,6 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
|
||||
output(os,keys,"version" , __VERSION__);
|
||||
output(os,keys,"date" , __DATE__ );
|
||||
output(os,keys,"time" , __TIME__ );
|
||||
output(os,keys,"svn" , SVN_VERSION);
|
||||
output(os,keys,"ssh" , EXV_USE_SSH);
|
||||
#if EXV_USE_CURL == 1
|
||||
std::string curl_protocols;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user