You have a problem with your echo... As defined by Microsoft, echo doesn't require quotes. In fact, it echos them too (both ' and ") which creates a version.c that won't work... Try it:
D:\>ver Microsoft Windows 2000 [Version 5.00.2195] D:\>echo /? Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. D:\>echo '' '' D:\>echo "" "" I just checked on my Win98 laptop and it's the same... I've worked with DOS as far back as 2.x (a little DOS 1.03? on the Lotus 1-2-3 diskettes)... and it's always worked that way. Now if you want to propose a sed script to strip off the 's, I'll listen... This change: "rm $@" to "rm -f $@" I have no problem with... and I'll do it in the cvs. (Done) I haven't seen the ntop_win32.c patch - I don't see [EMAIL PROTECTED] stuff, only Luca... As to UnxUtils, yeah I had found it. But it worries me a bit, because it's a port, vs. using the MinGW libaries. I see no reason why it won't work, just didn't want to introduce another thing if the rm.bat file was sufficient. Anyway, I updated the BUILD-MinGW.txt file this morning, so your changes are now hard to reconcile. Might send me a diff w/ a note that rm is also available from the UnxUtils URL (sourceforge is a better one, maybe) and other changes and I'll take a look. As for Version & OS name, I *think* there are hard constants in ntop_win32.c that need to be deleted, so that the version.c values are displayed. Can you check for me? TIA -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jac Engel Sent: Friday, June 14, 2002 12:40 PM To: [EMAIL PROTECTED] Cc: Juan Ramon Duarte Subject: RE: [Ntop-dev] New ntop commit (author burton) Burton, I use RM (and PATCH) from GNU unix_utils. When makefile.mingw is changed from "rm $@" to "rm -f $@" this will work for GNU RM.exe All other RM lines in makefile.mingw use "rm -f $@" I tested also rm.bat this works also ok. A version.c file will only be created if I changed the 7 echo lines to (added between ' ' what should go into version.c added between " " what should be displayed on the screen) : @echo 'char *version = "$(VERSION)";' > $@ @echo 'char *osName = "$(OSNAME)";' >> $@ @echo 'char *author = "Luca Deri <[EMAIL PROTECTED]>";' >> $@ @echo 'char *compiler_cflags = "$(CFLAGS)";' >> $@ @echo 'char *core_libs = "$(LIBS)";' >> $@ @echo 'char *system_libs = "$(LDIRS)";' >> $@ echo "Created version.c..." Burton ,I attached the buildmingw.txt file I use to succesful build ntop on Win2K with all prerequisites defined. from cvs 02-06-13 I added 2 changes which will be patched into the cvs I hope : 1) implemented above described echo changes 2) applied the patch for ntop_win32.c from Juan Ramon Duarte [[EMAIL PROTECTED]] so that the problem I reported is fixed about that the first option ,in this case -i1, is always ignored in command e.g : ntop /i -i1 -w4000 to run ntop as a service. Juan Ramon Duarte has sent this patch to [EMAIL PROTECTED] , I attached this diff file he sent also. Last remark, with this version.c file I see the results on the About-Configuration page displayed as defined in version.c EXCEPT for: Ntop Version = 2.0.99rc2 and Os = WinNT/2K/XP Note: I never sent patches to [EMAIL PROTECTED] only I report my findings to ntop or ntop-dev . Jac -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Burton M. Strauss III Sent: Friday, June 14, 2002 4:14 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Ntop-dev] New ntop commit (author burton) Wrong answer... The BEST answer is to get a copy of fileutils-4.1 compiled under MinGW. That seems to be hard to track down. I thought I had one, but it was fileutils-4.0 and the one missing was... <drum-roll /> rm. I found another, but it's not actually MinGW, rather a separate port of the standard utils to Win32. Anyway, as a kludgy work-around, I added a .bat version of rm to the documentation and Luca put it into the cvs. Unfortunately it's under gdchart0.94c, which is probably sub optimal. I've listed it below. It does the "if exist" test and should not cause the problem. Also, while I'm on the soap box, please be aware that I don't have access to [EMAIL PROTECTED] and don't see what you sent - but it seems like we've been working at cross purposes on the Makefiles. I'll be honest, I've ignored a lot of your work and done it myself, differently, for three reasons... 1. I was working on adding MORE to the version.c file, not removing it 2. (as were many of my patches when I first started), you need to remember to do things in a common, portable way, not just ones unique to your particular setup. 3. I haven't seen all of your patches because I don't see that mail box. 4. If you're going to whine about a commit, please change the subject to something meaningful, so people can find the messages in the back-traffic... Anyway, back to rm.bat - stick it somewhere on your path. I'll email Luca separately and ask him to move it to the ntop directory from the gdchart0.94c directory. With this, it should, correctly, create versions.c that looks like this: char *version = "2.0.99RC2+"; char *osName = "Windows-MinGW"; char *author = "Luca Deri <[EMAIL PROTECTED]>"; char *compiler_cflags = "-O -DHAVE_FCNTL_H=1 -DHAVE_PCAP_H=1 -DHAVE_STDARG_H=1 -I. -Id:/MinGW/includ e -Id:/MinGW/wpdpack/include -Id:/MinGW/wpdpack/include/NET -I../gdchart0.94 c"; char *core_libs = "-lgdbm -lwpcap -lgdchart -lgd -lpng -lz -lwsock32"; char *system_libs = "-Ld:/MinGW/wpdpack/lib -Ld:/MinGW/lib -L../gdchart0.94c -L../gdchart0.94c/z lib-1.1.4 -L../gdchart0.94c/gd-1.8.3 -L../gdchart0.94c/gd-1.8.3/libpng-1.2.1 "; @echo off if /%1 == /-f shift if /%1 == / goto :usage :loop if /%1 == / goto :done if exist %1 del %1 shift goto :loop goto :done :usage echo "Usage: rm [-f] file [, file ...]" :done -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jac Engel Sent: Thursday, June 13, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: RE: [Ntop-dev] New ntop commit (author burton) >>Notable: >>1) Fixed Makefile.mingw to generate the version.c file correctly, >> fixed zlib and libpng version numbers, fixed the major version number >> for ntop.exe and the "OSname". Removed the rpm, deb, etc. generation >> stuff, since it's not meaningful under MinGW. >>-----Burton (Ref BMS0084 & various whines on the mailing list) Compiling Ntop cvs 02-06-13 Make of ntop failed error: rm: version.c: No such file or directory make: *** [version.c] Error 1 workaround : created version.c file (0 bytes) in ntop dir ntop about-configuration shows :(NOT version :2.0.99rc2+ and OS =Windows-MinGW as stated in makefile.mingw ) Basic information ntop version 2.0.99rc2 Built on 11/06/2002 OS WinNT/2K/XP Jac _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev
