mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Automatically update the default update channel.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Extract the version string from nmap.h.
|
||||
export NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
|
||||
export NMAP_UPDATE_CHANNEL := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_UPDATE_CHANNEL' nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
|
||||
NMAP_NAME= Nmap
|
||||
NMAP_URL= http://nmap.org
|
||||
NMAP_PLATFORM=@host@
|
||||
@@ -151,6 +152,7 @@ lua_build: $(LIBLUADIR)/Makefile
|
||||
liblinear_build: $(LIBLINEARDIR)/Makefile
|
||||
@echo Compiling liblinear; cd $(LIBLINEARDIR) && $(MAKE) liblinear.a CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)"
|
||||
|
||||
build-nmap-update: nmap-update/default_channel.h
|
||||
|
||||
#$(LIBPCAPDIR)/Makefile:
|
||||
# @echo Configuring libpcap; cd $(LIBPCAPDIR); ./configure
|
||||
@@ -285,6 +287,10 @@ $(NPINGDIR)/nping.h: nmap.h
|
||||
$(ZENMAPDIR)/zenmapCore/Version.py $(ZENMAPDIR)/share/zenmap/config/zenmap_version: nmap.h
|
||||
cd $(ZENMAPDIR) && $(PYTHON) install_scripts/utils/version_update.py "$(NMAP_VERSION)"
|
||||
|
||||
nmap-update/default_channel.h: nmap.h
|
||||
sed -e 's/^#[ \t]*define[ \t]\+DEFAULT_CHANNEL[ \t]\+\(".*"\)/#define DEFAULT_CHANNEL "$(NMAP_UPDATE_CHANNEL)"/' $@ > $@.tmp
|
||||
mv -f $@.tmp $@
|
||||
|
||||
# By default distutils rewrites installed scripts to hardcode the
|
||||
# location of the Python interpreter they were built with (something
|
||||
# like #!/usr/bin/python2.4). This is the wrong thing to do when
|
||||
|
||||
1
nmap-update/default_channel.h
Normal file
1
nmap-update/default_channel.h
Normal file
@@ -0,0 +1 @@
|
||||
#define DEFAULT_CHANNEL "5.61TEST2"
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <svn_types.h>
|
||||
#endif
|
||||
|
||||
#define NMAP_VERSION "5.61TEST2"
|
||||
#include "default_channel.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define PATHSEP "\\"
|
||||
@@ -48,7 +48,7 @@
|
||||
static const char *SVN_REPO = "https://svn.nmap.org";
|
||||
static const char *SVN_DIR = "/updates";
|
||||
|
||||
static const char *DEFAULT_CHANNELS[] = { NMAP_VERSION };
|
||||
static const char *DEFAULT_CHANNELS[] = { DEFAULT_CHANNEL };
|
||||
|
||||
|
||||
/* Internal error handling. */
|
||||
@@ -658,7 +658,7 @@ static void usage(FILE *fp)
|
||||
fprintf(fp, "\
|
||||
Usage: %s [-d INSTALL_DIR] [CHANNEL...]\n\
|
||||
Updates system-independent Nmap files. By default the new files are installed to\n\
|
||||
%s. Each CHANNEL is a version number like \"" NMAP_VERSION "\".\n\
|
||||
%s. Each CHANNEL is a version number like \"" DEFAULT_CHANNEL "\".\n\
|
||||
\n\
|
||||
-d DIR install files to DIR (default %s).\n\
|
||||
-h, --help show this help.\n\
|
||||
|
||||
Reference in New Issue
Block a user