File: Makefile.add

package info (click to toggle)
w-scan 20210218-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,800 kB
  • sloc: ansic: 12,757; sh: 4,310; xml: 33; makefile: 17
file content (14 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
__VERSION=$(shell date +%Y%m%d)
__OLDVER=$(shell cat configure.ac | grep AC_INIT | sed -e "s|\[|\\\[|g" -e "s|\]|\\\]|g")

version:
	@echo "/* AUTOMATICALLY GENERATED - DO NOT EDIT MANUALLY */" > version.h
	@echo "#ifndef W_SCAN_VERSION_H" >> version.h
	@echo "#define W_SCAN_VERSION_H" >> version.h
	@echo "unsigned version=$(__VERSION);" >> version.h
	@echo "#endif" >> version.h
	@echo "" >> version.h
	@chmod a-x version.h
	@sed -i -e "s|$(__OLDVER)|AC_INIT(\[$(PACKAGE)\]\, \[$(__VERSION)\])|" configure.ac
	autoconf