File: Makefile.am

package info (click to toggle)
nut 2.4.3-1.1squeeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,816 kB
  • ctags: 5,658
  • sloc: ansic: 45,735; sh: 11,290; makefile: 668; python: 448; perl: 179
file content (25 lines) | stat: -rw-r--r-- 986 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
EXTRA_DIST = attribute.h common.h extstate.h parseconf.h proto.h	\
 state.h timehead.h upsconf.h

# http://www.gnu.org/software/automake/manual/automake.html#Clean
BUILT_SOURCES = nut_version.h nut_stdint.h
DISTCLEANFILES = nut_stdint.h
CLEANFILES = nut_version.h

# magic to include SVN revision number in NUT version string

nut_version.h: FORCE
	@SVNREV=`LANG=C svnversion -n $(top_srcdir) 2>/dev/null`; \
	if [ -z "$$SVNREV" -o "$$SVNREV" = "exported" ]; \
		then NUT_VERSION="$(PACKAGE_VERSION)"; \
		else NUT_VERSION="$(PACKAGE_VERSION)-$$SVNREV"; \
	fi ; \
	echo '/* Autogenerated file. Do not change. */'    > _nut_version.h ; \
	echo '/* This file was generated by "make". */'   >> _nut_version.h ; \
	echo "#define NUT_VERSION_MACRO \"$$NUT_VERSION\"" >> _nut_version.h ; \
	echo "NUT_VERSION: \"$$NUT_VERSION\""
	-test -f nut_version.h || cp _nut_version.h nut_version.h
	-cmp -s _nut_version.h nut_version.h || cp _nut_version.h nut_version.h
	-rm -f _nut_version.h

FORCE: