Commit 3c624b70 authored by Craig Silverstein's avatar Craig Silverstein

Wed Oct 13 17:40:12 2010 Google Inc. <opensource@google.com>

	* google-gflags: version 1.4
	* Add a check to prevent passing 0 to DEFINE_string (jorg)
	* Reduce compile (.o) size (jyrki)
	* Some small changes to quiet debug compiles (alexk)
	* PORTING: better support static linking on windows (csilvers)
	* DOCUMENTATION: change default values, use validators, etc.
	* Update the NEWS file to be non-empty
	* Add pkg-config (.pc) files for libgflags and libgflags_nothreads


git-svn-id: https://gflags.googlecode.com/svn/trunk@40 6586e3c6-dcc4-952a-343f-ff74eb82781d
parent c44e0559
Wed Oct 13 17:40:12 2010 Google Inc. <opensource@google.com>
* google-gflags: version 1.4
* Add a check to prevent passing 0 to DEFINE_string (jorg)
* Reduce compile (.o) size (jyrki)
* Some small changes to quiet debug compiles (alexk)
* PORTING: better support static linking on windows (csilvers)
* DOCUMENTATION: change default values, use validators, etc.
* Update the NEWS file to be non-empty
* Add pkg-config (.pc) files for libgflags and libgflags_nothreads
Mon Jan 4 18:09:30 2010 Google Inc. <opensource@google.com> Mon Jan 4 18:09:30 2010 Google Inc. <opensource@google.com>
* google-gflags: version 1.3 * google-gflags: version 1.3
......
...@@ -116,27 +116,27 @@ gflags_unittest_sh: gflags_unittest$(EXEEXT) \ ...@@ -116,27 +116,27 @@ gflags_unittest_sh: gflags_unittest$(EXEEXT) \
gflags_unittest3$(EXEEXT) gflags_unittest3$(EXEEXT)
bash --version >/dev/null 2>&1 && export SH=bash || export SH=sh; \ bash --version >/dev/null 2>&1 && export SH=bash || export SH=sh; \
$$SH "$(top_srcdir)/src/gflags_unittest.sh" \ $$SH "$(top_srcdir)/src/gflags_unittest.sh" \
"$(PWD)/gflags_unittest" "$(top_srcdir)" "@TEST_TMPDIR@" "`pwd`/gflags_unittest" "$(top_srcdir)" "@TEST_TMPDIR@"
# These are negative-compilation tests. We want to make sure these # These are negative-compilation tests. We want to make sure these
# erroneous use of the flags macros correctly fail to compile. # erroneous use of the flags macros correctly fail to compile.
# Again, we just bother testing with the no-threads version of the library. # Again, we just bother testing with the no-threads version of the library.
check_SCRIPTS += gflags_nc_test1 check_SCRIPTS += gflags_nc_test1
gflags_nc_test1: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test1: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_SWAPPED_ARGS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test1.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_SWAPPED_ARGS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test1.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
check_SCRIPTS += gflags_nc_test2 check_SCRIPTS += gflags_nc_test2
gflags_nc_test2: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test2: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_INT_INSTEAD_OF_BOOL $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test2.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_INT_INSTEAD_OF_BOOL $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test2.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
check_SCRIPTS += gflags_nc_test3 check_SCRIPTS += gflags_nc_test3
gflags_nc_test3: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test3: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_BOOL_IN_QUOTES $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test3.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_BOOL_IN_QUOTES $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test3.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
# This one, on the other hand, should succeed. # This one, on the other hand, should succeed.
check_SCRIPTS += gflags_nc_test4 check_SCRIPTS += gflags_nc_test4
gflags_nc_test4: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test4: $(gflagsinclude_HEADERS) src/gflags_nc.cc
$(CXX) -DSANITY $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test4.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" $(CXX) -DSANITY $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test4.o $(srcdir)/src/gflags_nc.cc
# This file isn't covered under any rule that would cause it to be distributed. # This file isn't covered under any rule that would cause it to be distributed.
dist_noinst_DATA += src/gflags_nc.cc dist_noinst_DATA += src/gflags_nc.cc
...@@ -155,8 +155,37 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec ...@@ -155,8 +155,37 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
deb: dist-gzip packages/deb.sh packages/deb/* deb: dist-gzip packages/deb.sh packages/deb/*
@cd packages && ./deb.sh ${PACKAGE} ${VERSION} @cd packages && ./deb.sh ${PACKAGE} ${VERSION}
# http://linux.die.net/man/1/pkg-config, http://pkg-config.freedesktop.org/wiki
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lib${PACKAGE}.pc lib${PACKAGE}_nothreads.pc
CLEANFILES += $(pkgconfig_DATA)
# I get the description and URL lines from the rpm spec. I use sed to
# try to rewrite exec_prefix, libdir, and includedir in terms of
# prefix, if possible.
lib${PACKAGE}.pc: Makefile packages/rpm/rpm.spec
echo 'prefix=$(prefix)' > "$@".tmp
echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}@'` >> "$@".tmp
echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
echo '' >> "$@".tmp
echo 'Name: $(PACKAGE)' >> "$@".tmp
echo 'Version: $(VERSION)' >> "$@".tmp
-grep '^Summary:' packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "$@".tmp
-grep '^URL: ' packages/rpm/rpm.spec >> "$@".tmp
echo 'Requires:' >> "$@".tmp
echo 'Libs: -L$${libdir} -l$(PACKAGE)' >> "$@".tmp
echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp
echo 'Cflags: -I$${includedir}' >> "$@".tmp
mv -f "$@".tmp "$@"
# The nothreads version is mostly the same
lib${PACKAGE}_nothreads.pc: lib${PACKAGE}.pc
grep -v Libs.private lib${PACKAGE}.pc | sed s/-l$(PACKAGE)/-l$(PACKAGE)_nothreads/ > "$@"
libtool: $(LIBTOOL_DEPS) libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
libtool $(SCRIPTS) \ libtool $(SCRIPTS) \
src/windows/config.h src/windows/port.h src/windows/port.cc \ src/windows/config.h src/windows/port.h src/windows/port.cc \
......
...@@ -75,7 +75,8 @@ am__vpath_adj = case $$p in \ ...@@ -75,7 +75,8 @@ am__vpath_adj = case $$p in \
esac; esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(docdir)" "$(DESTDIR)$(gflagsincludedir)" \ "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(gflagsincludedir)" \
"$(DESTDIR)$(googleincludedir)" "$(DESTDIR)$(googleincludedir)"
libLTLIBRARIES_INSTALL = $(INSTALL) libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES) LTLIBRARIES = $(lib_LTLIBRARIES)
...@@ -145,7 +146,8 @@ DIST_SOURCES = $(libgflags_la_SOURCES) \ ...@@ -145,7 +146,8 @@ DIST_SOURCES = $(libgflags_la_SOURCES) \
$(gflags_unittest_SOURCES) $(gflags_unittest2_SOURCES) \ $(gflags_unittest_SOURCES) $(gflags_unittest2_SOURCES) \
$(gflags_unittest3_SOURCES) $(gflags_unittest3_SOURCES)
dist_docDATA_INSTALL = $(INSTALL_DATA) dist_docDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_doc_DATA) $(dist_noinst_DATA) pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_doc_DATA) $(dist_noinst_DATA) $(pkgconfig_DATA)
gflagsincludeHEADERS_INSTALL = $(INSTALL_HEADER) gflagsincludeHEADERS_INSTALL = $(INSTALL_HEADER)
googleincludeHEADERS_INSTALL = $(INSTALL_HEADER) googleincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(gflagsinclude_HEADERS) $(googleinclude_HEADERS) HEADERS = $(gflagsinclude_HEADERS) $(googleinclude_HEADERS)
...@@ -337,7 +339,8 @@ check_SCRIPTS = gflags_unittest_sh gflags_nc_test1 gflags_nc_test2 \ ...@@ -337,7 +339,8 @@ check_SCRIPTS = gflags_unittest_sh gflags_nc_test1 gflags_nc_test2 \
# Every time you add a unittest to check_SCRIPTS, add it here too # Every time you add a unittest to check_SCRIPTS, add it here too
noinst_SCRIPTS = src/gflags_unittest.sh noinst_SCRIPTS = src/gflags_unittest.sh
# Used for auto-generated source files # Used for auto-generated source files
CLEANFILES = src/gflags_unittest-main.cc src/gflags_unittest_main.cc CLEANFILES = src/gflags_unittest-main.cc src/gflags_unittest_main.cc \
$(pkgconfig_DATA)
GFLAGS_SOURCES = $(gflagsinclude_HEADERS) src/mutex.h \ GFLAGS_SOURCES = $(gflagsinclude_HEADERS) src/mutex.h \
src/gflags.cc src/gflags_reporting.cc \ src/gflags.cc src/gflags_reporting.cc \
src/gflags_completions.cc src/gflags_completions.cc
...@@ -368,6 +371,10 @@ gflags_unittest3_LDADD = libgflags_nothreads.la ...@@ -368,6 +371,10 @@ gflags_unittest3_LDADD = libgflags_nothreads.la
# This file isn't covered under any rule that would cause it to be distributed. # This file isn't covered under any rule that would cause it to be distributed.
dist_noinst_DATA = src/gflags_unittest_flagfile src/gflags_nc.cc dist_noinst_DATA = src/gflags_unittest_flagfile src/gflags_nc.cc
# http://linux.die.net/man/1/pkg-config, http://pkg-config.freedesktop.org/wiki
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lib${PACKAGE}.pc lib${PACKAGE}_nothreads.pc
EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
libtool $(SCRIPTS) \ libtool $(SCRIPTS) \
src/windows/config.h src/windows/port.h src/windows/port.cc \ src/windows/config.h src/windows/port.h src/windows/port.cc \
...@@ -665,6 +672,23 @@ uninstall-dist_docDATA: ...@@ -665,6 +672,23 @@ uninstall-dist_docDATA:
echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
rm -f "$(DESTDIR)$(docdir)/$$f"; \ rm -f "$(DESTDIR)$(docdir)/$$f"; \
done done
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
install-gflagsincludeHEADERS: $(gflagsinclude_HEADERS) install-gflagsincludeHEADERS: $(gflagsinclude_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(gflagsincludedir)" || $(mkdir_p) "$(DESTDIR)$(gflagsincludedir)" test -z "$(gflagsincludedir)" || $(mkdir_p) "$(DESTDIR)$(gflagsincludedir)"
...@@ -956,7 +980,7 @@ check: check-am ...@@ -956,7 +980,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
$(HEADERS) $(HEADERS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(gflagsincludedir)" "$(DESTDIR)$(googleincludedir)"; do \ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(gflagsincludedir)" "$(DESTDIR)$(googleincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(mkdir_p) "$$dir"; \
done done
install: install-am install: install-am
...@@ -1007,7 +1031,7 @@ info: info-am ...@@ -1007,7 +1031,7 @@ info: info-am
info-am: info-am:
install-data-am: install-dist_docDATA install-gflagsincludeHEADERS \ install-data-am: install-dist_docDATA install-gflagsincludeHEADERS \
install-googleincludeHEADERS install-googleincludeHEADERS install-pkgconfigDATA
install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-exec-am: install-binSCRIPTS install-libLTLIBRARIES
...@@ -1039,7 +1063,8 @@ ps-am: ...@@ -1039,7 +1063,8 @@ ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-dist_docDATA \ uninstall-am: uninstall-binSCRIPTS uninstall-dist_docDATA \
uninstall-gflagsincludeHEADERS uninstall-googleincludeHEADERS \ uninstall-gflagsincludeHEADERS uninstall-googleincludeHEADERS \
uninstall-info-am uninstall-libLTLIBRARIES uninstall-info-am uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ .PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
clean clean-generic clean-libLTLIBRARIES clean-libtool \ clean clean-generic clean-libLTLIBRARIES clean-libtool \
...@@ -1052,14 +1077,15 @@ uninstall-am: uninstall-binSCRIPTS uninstall-dist_docDATA \ ...@@ -1052,14 +1077,15 @@ uninstall-am: uninstall-binSCRIPTS uninstall-dist_docDATA \
install-data-am install-dist_docDATA install-exec \ install-data-am install-dist_docDATA install-exec \
install-exec-am install-gflagsincludeHEADERS \ install-exec-am install-gflagsincludeHEADERS \
install-googleincludeHEADERS install-info install-info-am \ install-googleincludeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \ install-libLTLIBRARIES install-man install-pkgconfigDATA \
installcheck-am installdirs maintainer-clean \ install-strip installcheck installcheck-am installdirs \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
tags uninstall uninstall-am uninstall-binSCRIPTS \ pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-dist_docDATA uninstall-gflagsincludeHEADERS \ uninstall-binSCRIPTS uninstall-dist_docDATA \
uninstall-googleincludeHEADERS uninstall-info-am \ uninstall-gflagsincludeHEADERS uninstall-googleincludeHEADERS \
uninstall-libLTLIBRARIES uninstall-info-am uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
src/gflags_unittest-main.cc: src/gflags_unittest.cc src/gflags_unittest-main.cc: src/gflags_unittest.cc
rm -f src/gflags_unittest-main.cc rm -f src/gflags_unittest-main.cc
...@@ -1072,15 +1098,15 @@ gflags_unittest_sh: gflags_unittest$(EXEEXT) \ ...@@ -1072,15 +1098,15 @@ gflags_unittest_sh: gflags_unittest$(EXEEXT) \
gflags_unittest3$(EXEEXT) gflags_unittest3$(EXEEXT)
bash --version >/dev/null 2>&1 && export SH=bash || export SH=sh; \ bash --version >/dev/null 2>&1 && export SH=bash || export SH=sh; \
$$SH "$(top_srcdir)/src/gflags_unittest.sh" \ $$SH "$(top_srcdir)/src/gflags_unittest.sh" \
"$(PWD)/gflags_unittest" "$(top_srcdir)" "@TEST_TMPDIR@" "`pwd`/gflags_unittest" "$(top_srcdir)" "@TEST_TMPDIR@"
gflags_nc_test1: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test1: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_SWAPPED_ARGS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test1.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_SWAPPED_ARGS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test1.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
gflags_nc_test2: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test2: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_INT_INSTEAD_OF_BOOL $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test2.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_INT_INSTEAD_OF_BOOL $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test2.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
gflags_nc_test3: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test3: $(gflagsinclude_HEADERS) src/gflags_nc.cc
! $(CXX) -DTEST_BOOL_IN_QUOTES $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test3.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" if $(CXX) -DTEST_BOOL_IN_QUOTES $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test3.o $(srcdir)/src/gflags_nc.cc; then echo "Compile succeeded but should have failed"; exit 1; else echo "Compile failed, like it was supposed to"; fi
gflags_nc_test4: $(gflagsinclude_HEADERS) src/gflags_nc.cc gflags_nc_test4: $(gflagsinclude_HEADERS) src/gflags_nc.cc
$(CXX) -DSANITY $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test4.o $(srcdir)/src/gflags_nc.cc && echo "Compile failed, like it was supposed to" $(CXX) -DSANITY $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gflags_nc_test4.o $(srcdir)/src/gflags_nc.cc
rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
@cd packages && ./rpm.sh ${PACKAGE} ${VERSION} @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
...@@ -1088,6 +1114,29 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec ...@@ -1088,6 +1114,29 @@ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
deb: dist-gzip packages/deb.sh packages/deb/* deb: dist-gzip packages/deb.sh packages/deb/*
@cd packages && ./deb.sh ${PACKAGE} ${VERSION} @cd packages && ./deb.sh ${PACKAGE} ${VERSION}
# I get the description and URL lines from the rpm spec. I use sed to
# try to rewrite exec_prefix, libdir, and includedir in terms of
# prefix, if possible.
lib${PACKAGE}.pc: Makefile packages/rpm/rpm.spec
echo 'prefix=$(prefix)' > "$@".tmp
echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}@'` >> "$@".tmp
echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'` >> "$@".tmp
echo '' >> "$@".tmp
echo 'Name: $(PACKAGE)' >> "$@".tmp
echo 'Version: $(VERSION)' >> "$@".tmp
-grep '^Summary:' packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "$@".tmp
-grep '^URL: ' packages/rpm/rpm.spec >> "$@".tmp
echo 'Requires:' >> "$@".tmp
echo 'Libs: -L$${libdir} -l$(PACKAGE)' >> "$@".tmp
echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp
echo 'Cflags: -I$${includedir}' >> "$@".tmp
mv -f "$@".tmp "$@"
# The nothreads version is mostly the same
lib${PACKAGE}_nothreads.pc: lib${PACKAGE}.pc
grep -v Libs.private lib${PACKAGE}.pc | sed s/-l$(PACKAGE)/-l$(PACKAGE)_nothreads/ > "$@"
libtool: $(LIBTOOL_DEPS) libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
......
==4 January 2010== ==11 October 2010==
I've just released gflags 1.4. This release has only minor changes
from 1.3, including some documentation tweaks and some work to make
the library smaller. If 1.3 is working well for you, there's no
particular reason to upgrade.
===4 January 2010===
I've just released gflags 1.3. gflags now compiles under MSVC, and I've just released gflags 1.3. gflags now compiles under MSVC, and
all tests pass. I *really* never thought non-unix-y Windows folks all tests pass. I *really* never thought non-unix-y Windows folks
would want gflags, but at least some of them do. would want gflags, but at least some of them do.
The major news, though, is that I've separated out the python package The major news, though, is that I've separated out the python package
into its own library, [http://code.google.com/p/python-gflags into its own library, [http://code.google.com/p/python-gflags python-gflags].
python-gflags]. If you're interested in the Python version of gflags, If you're interested in the Python version of gflags, that's the place to
that's the place to get it now. get it now.
===10 September 2009== ===10 September 2009==
......
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for gflags 1.3. # Generated by GNU Autoconf 2.64 for gflags 1.4.
# #
# Report bugs to <opensource@google.com>. # Report bugs to <opensource@google.com>.
# #
...@@ -703,8 +703,8 @@ MAKEFLAGS= ...@@ -703,8 +703,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='gflags' PACKAGE_NAME='gflags'
PACKAGE_TARNAME='gflags' PACKAGE_TARNAME='gflags'
PACKAGE_VERSION='1.3' PACKAGE_VERSION='1.4'
PACKAGE_STRING='gflags 1.3' PACKAGE_STRING='gflags 1.4'
PACKAGE_BUGREPORT='opensource@google.com' PACKAGE_BUGREPORT='opensource@google.com'
PACKAGE_URL='' PACKAGE_URL=''
...@@ -1439,7 +1439,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1439,7 +1439,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures gflags 1.3 to adapt to many kinds of systems. \`configure' configures gflags 1.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1509,7 +1509,7 @@ fi ...@@ -1509,7 +1509,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of gflags 1.3:";; short | recursive ) echo "Configuration of gflags 1.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1618,7 +1618,7 @@ fi ...@@ -1618,7 +1618,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
gflags configure 1.3 gflags configure 1.4
generated by GNU Autoconf 2.64 generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009 Free Software Foundation, Inc.
...@@ -2248,7 +2248,7 @@ cat >config.log <<_ACEOF ...@@ -2248,7 +2248,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by gflags $as_me 1.3, which was It was created by gflags $as_me 1.4, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2910,7 +2910,7 @@ fi ...@@ -2910,7 +2910,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='gflags' PACKAGE='gflags'
VERSION='1.3' VERSION='1.4'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -20564,7 +20564,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -20564,7 +20564,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by gflags $as_me 1.3, which was This file was extended by gflags $as_me 1.4, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -20628,7 +20628,7 @@ Report bugs to <opensource@google.com>." ...@@ -20628,7 +20628,7 @@ Report bugs to <opensource@google.com>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\ ac_cs_version="\\
gflags config.status 1.3 gflags config.status 1.4
configured by $0, generated by GNU Autoconf 2.64, configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# make sure we're interpreted by some minimal autoconf # make sure we're interpreted by some minimal autoconf
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT(gflags, 1.3, opensource@google.com) AC_INIT(gflags, 1.4, opensource@google.com)
# The argument here is just something that should be in the current directory # The argument here is just something that should be in the current directory
# (for sanity checking) # (for sanity checking)
AC_CONFIG_SRCDIR(README) AC_CONFIG_SRCDIR(README)
......
gflags (1.4-2) unstable; urgency=low
* Accidentally uploaded an outdated .deb to Google Code; this is the right one
-- Google Inc. <opensource@google.com> Wed, 13 Oct 2010 17:48:44 -0700
gflags (1.4-1) unstable; urgency=low
* New upstream release.
-- Google Inc. <opensource@google.com> Wed, 13 Oct 2010 17:40:12 -0700
gflags (1.3-1) unstable; urgency=low gflags (1.3-1) unstable; urgency=low
* New upstream release. * New upstream release.
......
usr/lib usr/lib
usr/lib/pkgconfig
usr/include usr/include
usr/include/google usr/include/google
usr/include/gflags usr/include/gflags
...@@ -3,8 +3,10 @@ usr/include/gflags/* ...@@ -3,8 +3,10 @@ usr/include/gflags/*
usr/lib/lib*.so usr/lib/lib*.so
usr/lib/lib*.a usr/lib/lib*.a
usr/lib/*.la usr/lib/*.la
usr/lib/pkgconfig/*.pc
debian/tmp/usr/include/google/* debian/tmp/usr/include/google/*
debian/tmp/usr/include/gflags/* debian/tmp/usr/include/gflags/*
debian/tmp/usr/lib/lib*.so debian/tmp/usr/lib/lib*.so
debian/tmp/usr/lib/lib*.a debian/tmp/usr/lib/lib*.a
debian/tmp/usr/lib/*.la debian/tmp/usr/lib/*.la
debian/tmp/usr/lib/pkgconfig/*.pc
...@@ -67,9 +67,6 @@ rm -rf $RPM_BUILD_ROOT ...@@ -67,9 +67,6 @@ rm -rf $RPM_BUILD_ROOT
%docdir %{prefix}/share/doc/%{NAME}-%{VERSION} %docdir %{prefix}/share/doc/%{NAME}-%{VERSION}
%{prefix}/share/doc/%{NAME}-%{VERSION}/* %{prefix}/share/doc/%{NAME}-%{VERSION}/*
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
%doc doc/*
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{_bindir}/gflags_completions.sh %{_bindir}/gflags_completions.sh
...@@ -81,3 +78,4 @@ rm -rf $RPM_BUILD_ROOT ...@@ -81,3 +78,4 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a %{_libdir}/*.a
%{_libdir}/*.la %{_libdir}/*.la
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
...@@ -523,6 +523,19 @@ bool IsBoolFlag(bool from); ...@@ -523,6 +523,19 @@ bool IsBoolFlag(bool from);
#define DECLARE_string(name) namespace fLS { extern std::string& FLAGS_##name; } \ #define DECLARE_string(name) namespace fLS { extern std::string& FLAGS_##name; } \
using fLS::FLAGS_##name using fLS::FLAGS_##name
namespace fLS {
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
const char *value) {
return new(stringspot) std::string(value);
}
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
const std::string &value) {
return new(stringspot) std::string(value);
}
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
int value);
} // namespace fLS
// We need to define a var named FLAGS_no##name so people don't define // We need to define a var named FLAGS_no##name so people don't define
// --string and --nostring. And we need a temporary place to put val // --string and --nostring. And we need a temporary place to put val
// so we don't have to evaluate it twice. Two great needs that go // so we don't have to evaluate it twice. Two great needs that go
...@@ -533,7 +546,9 @@ bool IsBoolFlag(bool from); ...@@ -533,7 +546,9 @@ bool IsBoolFlag(bool from);
#define DEFINE_string(name, val, txt) \ #define DEFINE_string(name, val, txt) \
namespace fLS { \ namespace fLS { \
static union { void* align; char s[sizeof(std::string)]; } s_##name[2]; \ static union { void* align; char s[sizeof(std::string)]; } s_##name[2]; \
std::string* const FLAGS_no##name = new (s_##name[0].s) std::string(val); \ std::string* const FLAGS_no##name = ::fLS:: \
dont_pass0toDEFINE_string(s_##name[0].s, \
val); \
static @ac_google_namespace@::FlagRegisterer o_##name( \ static @ac_google_namespace@::FlagRegisterer o_##name( \
#name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \
s_##name[0].s, new (s_##name[1].s) std::string(*FLAGS_no##name)); \ s_##name[0].s, new (s_##name[1].s) std::string(*FLAGS_no##name)); \
......
...@@ -60,4 +60,10 @@ DEFINE_bool(some_bool_flag_4, ...@@ -60,4 +60,10 @@ DEFINE_bool(some_bool_flag_4,
true, true,
"this is the correct usage of DEFINE_bool"); "this is the correct usage of DEFINE_bool");
#elif defined(TEST_DEFINE_STRING_WITH_0)
DEFINE_string(some_string_flag,
0,
"Trying to construct a string by passing 0 would cause a crash.");
#endif #endif
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
# define GFLAGS_DLL_DECL __declspec(dllimport) # define GFLAGS_DLL_DECL __declspec(dllimport)
# endif # endif
# ifndef GFLAGS_DLL_DECLARE_FLAG # ifndef GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_DLL_DECLARE_FLAG __declspec(import) # define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
# endif # endif
# ifndef GFLAGS_DLL_DEFINE_FLAG # ifndef GFLAGS_DLL_DEFINE_FLAG
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport) # define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
...@@ -548,6 +548,19 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from); ...@@ -548,6 +548,19 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from);
#define DECLARE_string(name) namespace fLS { extern GFLAGS_DLL_DECLARE_FLAG std::string& FLAGS_##name; } \ #define DECLARE_string(name) namespace fLS { extern GFLAGS_DLL_DECLARE_FLAG std::string& FLAGS_##name; } \
using fLS::FLAGS_##name using fLS::FLAGS_##name
namespace fLS {
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
const char *value) {
return new(stringspot) std::string(value);
}
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
const std::string &value) {
return new(stringspot) std::string(value);
}
inline std::string* dont_pass0toDEFINE_string(char *stringspot,
int value);
} // namespace fLS
// We need to define a var named FLAGS_no##name so people don't define // We need to define a var named FLAGS_no##name so people don't define
// --string and --nostring. And we need a temporary place to put val // --string and --nostring. And we need a temporary place to put val
// so we don't have to evaluate it twice. Two great needs that go // so we don't have to evaluate it twice. Two great needs that go
...@@ -558,7 +571,9 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from); ...@@ -558,7 +571,9 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from);
#define DEFINE_string(name, val, txt) \ #define DEFINE_string(name, val, txt) \
namespace fLS { \ namespace fLS { \
static union { void* align; char s[sizeof(std::string)]; } s_##name[2]; \ static union { void* align; char s[sizeof(std::string)]; } s_##name[2]; \
std::string* const FLAGS_no##name = new (s_##name[0].s) std::string(val); \ std::string* const FLAGS_no##name = ::fLS:: \
dont_pass0toDEFINE_string(s_##name[0].s, \
val); \
static ::google::FlagRegisterer o_##name( \ static ::google::FlagRegisterer o_##name( \
#name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \
s_##name[0].s, new (s_##name[1].s) std::string(*FLAGS_no##name)); \ s_##name[0].s, new (s_##name[1].s) std::string(*FLAGS_no##name)); \
......
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