Jac:  Actually, try this version, which does the buildDate piece too:

version.c:
        @rm -f $@ [email protected] [email protected]
# Create a file with the pieces and parts of the buildDate line
#        use ! vs double quotes because some echo's handle the quotes oddly
#        Remember each piece will end w/ CR LF, which we have to strip out!
        @echo.'char *buildDate = !' >> [email protected]
        @date /t >> [email protected]
        @echo.'at' >> [email protected]
        @time /t >> [email protected]
        @echo.'!;' >> [email protected]
#  Turn the !s into double quotes AND remove the extra CR LFs
#        Remember for below, this means version.c.dt has NO terminating CR
LF
        @tr ! \42 < [email protected] | @tr -d \12\15 > [email protected]
#
# Now build the version.c file:
#
        @rm -f [email protected]
        @echo 'char *version = "$(VERSION)";' >> [email protected]
        @cat <[email protected] >>[email protected]
        @echo.>>[email protected]
        @echo 'char *author  = "Luca Deri <[EMAIL PROTECTED]>";' >> [email protected]
        @echo 'char *compiler_cflags = "$(CFLAGS)";' >> [email protected]
        @echo 'char *core_libs       = "$(LIBS)";' >> [email protected]
        @echo 'char *system_libs     = "$(LDIRS)";' >> [email protected]
        @echo Created [email protected] fixup
# Strip off the single quotes that some versions put into the file
        @tr -d \47 < [email protected] > $@
        @echo $@ complete:
        @rm -f [email protected] [email protected]

-----Burton


_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

Reply via email to