Use a temporary file when setting the version number in ncat.h to work

around NetBSD sed that doesn't have the -i option.
This commit is contained in:
david 2009-09-01 15:44:55 +00:00
parent 8686ca7c06
commit 6a25f40b64

View file

@ -214,7 +214,8 @@ install-nmap: $(TARGET)
# Update the Ncat version number.
$(NCATDIR)/ncat.h: nmap.h
sed -i -e 's/^#[ \t]*define[ \t]\+NCAT_VERSION[ \t]\+\(".*"\)/#define NCAT_VERSION "$(NMAP_VERSION)"/' $@
sed -e 's/^#[ \t]*define[ \t]\+NCAT_VERSION[ \t]\+\(".*"\)/#define NCAT_VERSION "$(NMAP_VERSION)"/' $@ > $@.tmp
mv -f $@.tmp $@
# Update the version number used by Zenmap.
$(ZENMAPDIR)/zenmapCore/Version.py $(ZENMAPDIR)/share/zenmap/config/zenmap_version: nmap.h