Commit 317d2959 authored by Shashi Guruprasad's avatar Shashi Guruprasad

A script make nse patch files

parent ffdb2080
...@@ -1224,6 +1224,7 @@ else ...@@ -1224,6 +1224,7 @@ else
event/proxy/GNUmakefile \ event/proxy/GNUmakefile \
event/nsetrafgen/GNUmakefile \ event/nsetrafgen/GNUmakefile \
event/nsetrafgen/nseinput.tcl \ event/nsetrafgen/nseinput.tcl \
event/nsetrafgen/nse-makepatch \
event/delay-agent/GNUmakefile \ event/delay-agent/GNUmakefile \
event/program-agent/GNUmakefile \ event/program-agent/GNUmakefile \
event/stated/waitForState \ event/stated/waitForState \
...@@ -1297,7 +1298,7 @@ fi ...@@ -1297,7 +1298,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1301: checking for a BSD compatible install" >&5 echo "configure:1302: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
......
...@@ -337,6 +337,7 @@ else ...@@ -337,6 +337,7 @@ else
event/proxy/GNUmakefile \ event/proxy/GNUmakefile \
event/nsetrafgen/GNUmakefile \ event/nsetrafgen/GNUmakefile \
event/nsetrafgen/nseinput.tcl \ event/nsetrafgen/nseinput.tcl \
event/nsetrafgen/nse-makepatch \
event/delay-agent/GNUmakefile \ event/delay-agent/GNUmakefile \
event/program-agent/GNUmakefile \ event/program-agent/GNUmakefile \
event/stated/waitForState \ event/stated/waitForState \
......
...@@ -40,6 +40,10 @@ buildnse: ...@@ -40,6 +40,10 @@ buildnse:
ln -sf $(SRCDIR)/../lib/event.h . ln -sf $(SRCDIR)/../lib/event.h .
$(SRCDIR)/nse-install $(SRCDIR)/nse.patch $(SRCDIR)/nse-install $(SRCDIR)/nse.patch
makepatch:
chmod +x nse-makepatch
./nse-makepatch
sup-install: sup-install:
-mkdir -p $(INSTALL_SUPDIR)/$(CLIENT_BINDIR)/ -mkdir -p $(INSTALL_SUPDIR)/$(CLIENT_BINDIR)/
-cp $(INSTALL_FILES) $(INSTALL_SUPDIR)/$(CLIENT_BINDIR) -cp $(INSTALL_FILES) $(INSTALL_SUPDIR)/$(CLIENT_BINDIR)
......
#!/bin/sh
SRCDIR=@srcdir@
if [ ! -d ns-allinone-2.26 ]; then
echo "ns-2.26 source does not exist in the current directory" 1>&2
echo "Cannot make patch file" 1>&2
exit 1
fi
if [ ! -d dist-ns-allinone-2.26 ]; then
mkdir dist
cd dist
echo "Downloading ns2.26 source from www.emulab.net"
fetch http://www.emulab.net/downloads/ns-allinone-2.26.tar.gz
if [ $? -ne 0 ]; then
echo "Failed..."
echo "Downloading ns2.26 source from www.isi.edu"
fetch http://www.isi.edu/nsnam/dist/ns-allinone-2.26.tar.gz
fi
tar xzf ns-allinone-2.26.tar.gz
cd ..
mv dist/ns-allinone-2.26 dist-ns-allinone-2.26
rmdir dist
fi
if [ -e $SRCDIR/nse.patch ]; then
mv $SRCDIR/nse.patch $SRCDIR/nse.patch.old
fi
for i in `cat $SRCDIR/ns_files_modified.txt`
do
if [ -e dist-ns-allinone-2.26/$i ]; then
diff -u dist-ns-allinone-2.26/$i ns-allinone-2.26/$i >> $SRCDIR/nse.patch
else
diff -u /dev/null ns-allinone-2.26/$i >> $SRCDIR/nse.patch
fi
done
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment