diff options
Diffstat (limited to '')
-rw-r--r-- | examples/Makefile.am (renamed from samples/Makefile.am) | 2 | ||||
-rw-r--r-- | examples/Makefile.in (renamed from samples/Makefile.in) | 157 | ||||
-rw-r--r-- | examples/c++/Makefile.in (renamed from samples/c++/Makefile.in) | 201 | ||||
-rw-r--r-- | samples/c++/Makefile.am | 14 | ||||
-rw-r--r-- | samples/c++/sample1.cpp | 47 | ||||
-rw-r--r-- | samples/c++/sample2.cpp | 43 | ||||
-rw-r--r-- | samples/c++/sample3.cpp | 54 | ||||
-rw-r--r-- | samples/c++/stubcpp.cpp | 161 | ||||
-rw-r--r-- | samples/c/Makefile.am | 15 | ||||
-rw-r--r-- | samples/c/sample1.c | 63 | ||||
-rw-r--r-- | samples/c/sample2.c | 52 | ||||
-rw-r--r-- | samples/c/sample3.c | 104 | ||||
-rw-r--r-- | samples/c/stub.c | 84 | ||||
-rw-r--r-- | tinytest/Makefile.in (renamed from samples/c/Makefile.in) | 172 |
14 files changed, 320 insertions, 849 deletions
diff --git a/samples/Makefile.am b/examples/Makefile.am index 252e601..e084bf0 100644 --- a/samples/Makefile.am +++ b/examples/Makefile.am @@ -2,7 +2,5 @@ SUBDIRS = c if BUILDCXX - SUBDIRS += c++ - endif diff --git a/samples/Makefile.in b/examples/Makefile.in index 5a707fb..189a5d1 100644 --- a/samples/Makefile.in +++ b/examples/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +16,9 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,15 +35,16 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @BUILDCXX_TRUE@am__append_1 = c++ -subdir = samples +subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/aux-build/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ac_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -53,10 +56,38 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = c c++ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -79,20 +110,20 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -100,18 +131,23 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -128,7 +164,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -186,14 +222,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu samples/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -211,6 +247,7 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -225,7 +262,7 @@ clean-libtool: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -242,7 +279,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -250,7 +287,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -276,16 +313,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -293,14 +330,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -312,7 +349,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -321,29 +358,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -364,29 +406,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -416,6 +473,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -434,6 +492,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -442,18 +502,28 @@ install-data-am: install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -474,8 +544,8 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -491,6 +561,7 @@ uninstall-am: mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/samples/c++/Makefile.in b/examples/c++/Makefile.in index b84b8dc..798c5db 100644 --- a/samples/c++/Makefile.in +++ b/examples/c++/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,37 +35,39 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -noinst_PROGRAMS = stubcpp$(EXEEXT) sample1$(EXEEXT) sample2$(EXEEXT) \ - sample3$(EXEEXT) -subdir = samples/c++ +noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \ + example3$(EXEEXT) example4$(EXEEXT) +subdir = examples/c++ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/aux-build/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ac_config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) -am_sample1_OBJECTS = sample1.$(OBJEXT) -sample1_OBJECTS = $(am_sample1_OBJECTS) -sample1_LDADD = $(LDADD) -sample1_DEPENDENCIES = -am_sample2_OBJECTS = sample2.$(OBJEXT) -sample2_OBJECTS = $(am_sample2_OBJECTS) -sample2_LDADD = $(LDADD) -sample2_DEPENDENCIES = -am_sample3_OBJECTS = sample3.$(OBJEXT) -sample3_OBJECTS = $(am_sample3_OBJECTS) -sample3_LDADD = $(LDADD) -sample3_DEPENDENCIES = -am_stubcpp_OBJECTS = stubcpp.$(OBJEXT) -stubcpp_OBJECTS = $(am_stubcpp_OBJECTS) -stubcpp_LDADD = $(LDADD) -stubcpp_DEPENDENCIES = +am_example1_OBJECTS = example1.$(OBJEXT) +example1_OBJECTS = $(am_example1_OBJECTS) +example1_LDADD = $(LDADD) +example1_DEPENDENCIES = $(top_builddir)/lib/libconfig++.la +am_example2_OBJECTS = example2.$(OBJEXT) +example2_OBJECTS = $(am_example2_OBJECTS) +example2_LDADD = $(LDADD) +example2_DEPENDENCIES = $(top_builddir)/lib/libconfig++.la +am_example3_OBJECTS = example3.$(OBJEXT) +example3_OBJECTS = $(am_example3_OBJECTS) +example3_LDADD = $(LDADD) +example3_DEPENDENCIES = $(top_builddir)/lib/libconfig++.la +am_example4_OBJECTS = example4.$(OBJEXT) +example4_OBJECTS = $(am_example4_OBJECTS) +example4_LDADD = $(LDADD) +example4_DEPENDENCIES = $(top_builddir)/lib/libconfig++.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/aux-build/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -73,10 +77,10 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(sample1_SOURCES) $(sample2_SOURCES) $(sample3_SOURCES) \ - $(stubcpp_SOURCES) -DIST_SOURCES = $(sample1_SOURCES) $(sample2_SOURCES) \ - $(sample3_SOURCES) $(stubcpp_SOURCES) +SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \ + $(example4_SOURCES) +DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \ + $(example3_SOURCES) $(example4_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -102,20 +106,20 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -123,18 +127,23 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -151,7 +160,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -201,12 +210,16 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -stubcpp_SOURCES = stubcpp.cpp -sample1_SOURCES = sample1.cpp -sample2_SOURCES = sample2.cpp -sample3_SOURCES = sample3.cpp -AM_CPPFLAGS = -I $(top_srcdir) -LDADD = -L../../.libs -lconfig++ +example1_SOURCES = example1.cpp +example2_SOURCES = example2.cpp +example3_SOURCES = example3.cpp +example4_SOURCES = example4.cpp +AM_CPPFLAGS = -I $(top_srcdir)/lib +LDADD = $(top_builddir)/lib/libconfig++.la +EXTRA_DIST = \ + example.cfg invalid.cfg \ + *.vcproj + all: all-am .SUFFIXES: @@ -215,14 +228,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/c++/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu samples/c++/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/c++/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/c++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -240,25 +253,28 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -sample1$(EXEEXT): $(sample1_OBJECTS) $(sample1_DEPENDENCIES) - @rm -f sample1$(EXEEXT) - $(CXXLINK) $(sample1_OBJECTS) $(sample1_LDADD) $(LIBS) -sample2$(EXEEXT): $(sample2_OBJECTS) $(sample2_DEPENDENCIES) - @rm -f sample2$(EXEEXT) - $(CXXLINK) $(sample2_OBJECTS) $(sample2_LDADD) $(LIBS) -sample3$(EXEEXT): $(sample3_OBJECTS) $(sample3_DEPENDENCIES) - @rm -f sample3$(EXEEXT) - $(CXXLINK) $(sample3_OBJECTS) $(sample3_LDADD) $(LIBS) -stubcpp$(EXEEXT): $(stubcpp_OBJECTS) $(stubcpp_DEPENDENCIES) - @rm -f stubcpp$(EXEEXT) - $(CXXLINK) $(stubcpp_OBJECTS) $(stubcpp_LDADD) $(LIBS) + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES) + @rm -f example1$(EXEEXT) + $(CXXLINK) $(example1_OBJECTS) $(example1_LDADD) $(LIBS) +example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES) + @rm -f example2$(EXEEXT) + $(CXXLINK) $(example2_OBJECTS) $(example2_LDADD) $(LIBS) +example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES) + @rm -f example3$(EXEEXT) + $(CXXLINK) $(example3_OBJECTS) $(example3_LDADD) $(LIBS) +example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES) + @rm -f example4$(EXEEXT) + $(CXXLINK) $(example4_OBJECTS) $(example4_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -266,28 +282,28 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubcpp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example4.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -303,14 +319,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -318,29 +334,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -361,13 +382,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -395,6 +420,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -416,6 +442,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -424,18 +452,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -473,6 +511,7 @@ uninstall-am: mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/samples/c++/Makefile.am b/samples/c++/Makefile.am deleted file mode 100644 index b1cdb9b..0000000 --- a/samples/c++/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ - -noinst_PROGRAMS = stubcpp sample1 sample2 sample3 - -stubcpp_SOURCES = stubcpp.cpp - -sample1_SOURCES = sample1.cpp - -sample2_SOURCES = sample2.cpp - -sample3_SOURCES = sample3.cpp - -AM_CPPFLAGS = -I $(top_srcdir) - -LDADD = -L../../.libs -lconfig++ diff --git a/samples/c++/sample1.cpp b/samples/c++/sample1.cpp deleted file mode 100644 index 7344838..0000000 --- a/samples/c++/sample1.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************* - ** Sample1 - ** Load sample.cfg and increment the "X" setting - *************************************************************************/ - -#include <iostream> -#include <libconfig.h++> - -using namespace libconfig; -using namespace std; - -/***************************************************************************/ - -int main() -{ - Config cfg; - - try - { - /* Load the configuration.. */ - cout << "loading [sample.cfg].."; - cfg.readFile("sample.cfg"); - cout << "ok" << endl; - - /* Increment "x" */ - cout << "increment \"x\".."; - Setting& s = cfg.lookup("x"); - long x = s; - s = ++x; - cout << "ok (x=" << x << ")" << endl; - - // Save the configuration - cout << "saving [sample.cfg].."; - cfg.writeFile("sample.cfg"); - cout << "ok" << endl; - - cout << "Done!" << endl; - } - catch (...) - { - cout << "failed" << endl; - } - - return 0; -} - -/***************************************************************************/ diff --git a/samples/c++/sample2.cpp b/samples/c++/sample2.cpp deleted file mode 100644 index defceb8..0000000 --- a/samples/c++/sample2.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/************************************************************************* - ** Sample2 - ** Load sample.cfg and access the "values" array - *************************************************************************/ - -#include <iostream> -#include <libconfig.h++> - -using namespace libconfig; -using namespace std; - -/***************************************************************************/ - -int main() -{ - Config cfg; - try - { - /* Load the configuration.. */ - cout << "loading [sample.cfg].."; - cfg.readFile("sample.cfg"); - cout << "ok" << endl; - - // Display the "values" array - cout << "display the \"values\" array.."; - Setting& s = cfg.lookup("values"); - long value1 = s[0]; - long value2 = s[1]; - cout << "[" << value1 << "," << value2 << "].."; - cout << "ok" << endl; - - cout << "Done!" << endl; - } - catch (...) - { - cout << "failed" << endl; - } - - return 0; -} - - -/***************************************************************************/ diff --git a/samples/c++/sample3.cpp b/samples/c++/sample3.cpp deleted file mode 100644 index da1de79..0000000 --- a/samples/c++/sample3.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - ** Sample3 - ** Load sample.cfg and try to add a setting "foo".. - ** on success save to testfoo.cfg - *************************************************************************/ - -#include <iostream> -#include <libconfig.h++> - -using namespace libconfig; -using namespace std; - -/***************************************************************************/ - -int main() -{ - Config cfg; - try - { - /* Load the configuration.. */ - cout << "loading [sample.cfg]..."; - cfg.readFile("sample.cfg"); - cout << "ok" << endl; - - /* Add setting "foo" */ - cout << "add setting \"foo\"/..."; - Setting &root = cfg.getRoot(); - Setting &foo = root.add("foo", Setting::TypeInt); - foo = 1234; - cout << "ok" << endl; - - /** Look up an array element */ - cout << "looking up array element..."; - Setting &elem = cfg.lookup("arrays.values.[0]"); - int val = elem; - std::cout << "value is: " << val << std::endl; - std::cout << "path is: " << elem.getPath() << std::endl; - - /* Save to "samplefoo.cfg" */ - cout << "saving [samplefoo.cfg]..."; - cfg.writeFile("samplefoo.cfg"); - cout << "ok" << endl; - - cout << "Done!" << endl; - } - catch (...) - { - cout << "failed" << endl; - } - - return 0; -} - -/***************************************************************************/ diff --git a/samples/c++/stubcpp.cpp b/samples/c++/stubcpp.cpp deleted file mode 100644 index 59c9769..0000000 --- a/samples/c++/stubcpp.cpp +++ /dev/null @@ -1,161 +0,0 @@ - -#include <stdio.h> -#include <stdlib.h> -#include <iostream> - -#include "libconfig.h++" - -using namespace libconfig; - -int main(int argc, char **argv) -{ - Config cfg; - char *locale = NULL; - -#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \ - && ! defined(__MINGW32__) - - locale = "French"; - -#elif defined(__APPLE__) - - locale = "fr_CA.ISO8859-1"; - -#else - - locale = "fr_FR.ISO-8859-1"; - -#endif - - printf("new locale: %s\n", setlocale(LC_NUMERIC, locale)); - printf("before locale override; pi is: %f\n", 3.141592); - - try - { - FILE *fp = fopen("test.cfg", "r"); - - if(! fp) - { - printf("Unable to open test.cfg\n"); - exit(1); - } - - cfg.read(fp); - fclose(fp); - -// const ConfigSetting& setting = cfg.lookup("application.window.size.w"); -// long val = setting; - - long val = cfg.lookup("application.window.size.w"); - printf("val: %ld\n", val); - - std::string title = cfg.lookup("application.window.title"); - std::cout << "title: " << title << std::endl; - - Setting &ss = cfg.lookup("application.window.title"); - std::string title2 = ss; - std::cout << "title: " << title2 << std::endl; - - std::string rr = "foo"; - - rr = (const char *)cfg.lookup("application.window.title"); -// rr = (std::string)(cfg.lookup("application.window.title")); - std::cout << "rr: " << rr << std::endl; - - const char *rrr = cfg.lookup("application.window.title"); - std::cout << "rrr: " << rrr << std::endl; - - Setting &s = cfg.lookup("application.group1.my_array"); - long val4; - val4 = s[4]; - printf("item #4 is: %ld\n", val4); - printf("location of my_array is %d\n", s.getSourceLine()); - - Setting &grp = cfg.lookup("application.group1.group2"); - - Setting &zzz = cfg.lookup("application.group1.group2.zzz"); - printf("location of zzz is at %d\n", zzz.getSourceLine()); - - Setting &root = cfg.getRoot(); - - Setting &rootn = root.add("new-one-at-top", Setting::TypeGroup); - - Setting &ngp = rootn.add("element", Setting::TypeFloat); - - Setting &misc = root["misc"]; - unsigned int portnum = 0; - misc.lookupValue("port", portnum); - printf("port # is: %d\n", portnum); - - ngp = 1.1234567890123; - -// long val22 = s[22]; -// printf("item #22 is: %d\n", val22); - - Setting &snew = grp.add("foobar", Setting::TypeArray); - - snew.add(Setting::TypeInt); - snew.add(Setting::TypeInt); - - snew.add(Setting::TypeInt); - snew.add(Setting::TypeInt); - - puts("created new array"); - - snew[0] = 55; - puts("elem 0"); - snew[1] = 66; - puts("elem 1"); - - cfg.setAutoConvert(true); - - double dd = cfg.lookup("application.group1.x"); - printf("auto-converted int->double: %f\n", dd); - - int ii = cfg.lookup("misc.pi"); - printf("auto-converted double->int: %d\n", ii); - - Setting &sdel = cfg.lookup("application"); - - sdel.remove("group1"); - - - Setting &books = cfg.lookup("books"); - puts("found books"); - Setting &book = books.add(Setting::TypeGroup); - puts("added book"); - - Setting &sss = book.add("Title", Setting::TypeString); - puts("added title"); - - sss = "Alice in Wonderland"; - - Setting &sss2 = book.add("Price", Setting::TypeFloat); - sss2 = 9.99; - - cfg.write(stdout); - - Setting &good = cfg.lookup("books.[2].author"); - std::string author = good; - std::cout << "author: " << author << std::endl; - - Setting &bad = books[1]["blargh"]; - } - catch(ParseException& ex) - { - printf("error on line %d: %s\n", ex.getLine(), - ex.getError()); - } - catch(SettingNotFoundException nfex) - { - printf("setting not found: %s\n", nfex.getPath()); - } - catch(ConfigException& cex) - { - printf("config exception!\n"); - } - - printf("locale restored; pi is: %f\n", 3.141592); - - return(0); -} diff --git a/samples/c/Makefile.am b/samples/c/Makefile.am deleted file mode 100644 index 8664b48..0000000 --- a/samples/c/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ - -noinst_PROGRAMS = stub sample1 sample2 sample3 - -stub_SOURCES = stub.c - -sample1_SOURCES = sample1.c - -sample2_SOURCES = sample2.c - -sample3_SOURCES = sample3.c - -AM_CPPFLAGS = -I $(top_srcdir) - -LDADD = -L../../.libs -lconfig - diff --git a/samples/c/sample1.c b/samples/c/sample1.c deleted file mode 100644 index a119c10..0000000 --- a/samples/c/sample1.c +++ /dev/null @@ -1,63 +0,0 @@ -/************************************************************************* - ** Sample1 - ** Load sample.cfg and increment the "X" setting - *************************************************************************/ - -#include <stdio.h> -#include <libconfig.h> - -struct config_t cfg; - -/***************************************************************************/ - -int main(int argc, char **argv) -{ - char *file = "sample.cfg", *var = "x"; - - if(argc >= 2) - file = argv[1]; - - if(argc >= 3) - var = argv[2]; - -/* Initialize the configuration */ - config_init(&cfg); - - /* Load the file */ - printf("loading [%s]...", file); - if(!config_read_file(&cfg, file)) - printf("failed\n"); - else - { - config_setting_t *setting = NULL; - - printf("ok\n"); - - /* Get the variable setting from the configuration.. */ - printf("increment \"%s\"...", var); - setting = config_lookup(&cfg, var); - if(!setting) - printf("failed\n"); - else - { - long x = config_setting_get_int(setting); - x++; - config_setting_set_int(setting, x); - printf("ok (%s=%lu)\n", var, x); - - /* Save the changes */ - printf("saving [%s]...", file); - config_write_file(&cfg, file); - printf("ok\n"); - - printf("Done!\n"); - } - } - - /* Free the configuration */ - config_destroy(&cfg); - - return 0; -} - -/***************************************************************************/ diff --git a/samples/c/sample2.c b/samples/c/sample2.c deleted file mode 100644 index 09c45de..0000000 --- a/samples/c/sample2.c +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - ** Sample2 - ** Load sample.cfg and access the "values" array - *************************************************************************/ - -#include <stdio.h> -#include <libconfig.h> - -struct config_t cfg; - -/***************************************************************************/ - -int main() -{ - /* Initialize the configuration */ - config_init(&cfg); - - /* Load the file */ - printf("loading [sample.cfg].."); - if (!config_read_file(&cfg, "sample.cfg")) - printf("failed\n"); - else - { - config_setting_t *array = NULL; - - printf("ok\n"); - - /* Display the "values" array */ - printf("display \"values\".."); - array = config_lookup(&cfg, "values"); - if (!array) - printf("failed\n"); - else - { - long value1,value2; - value1 = config_setting_get_int_elem(array, 0); - value2 = config_setting_get_int_elem(array, 1); - printf("[%lu %lu]..ok\n", value1, value2); - - printf("Done!\n"); - } - - } - - /* Free the configuration */ - config_destroy(&cfg); - - return 0; -} - - -/***************************************************************************/ diff --git a/samples/c/sample3.c b/samples/c/sample3.c deleted file mode 100644 index 22f5f36..0000000 --- a/samples/c/sample3.c +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************* - ** Sample3 - ** Load sample.cfg and try to add a setting "foo".. - ** on success save to testfoo.cfg - *************************************************************************/ - -#include <stdio.h> -#include <libconfig.h> - -/***************************************************************************/ - -/* - */ - -int print_path(config_setting_t *setting) -{ - if(setting) - { - const char *name = config_setting_name(setting); - - if(print_path(config_setting_parent(setting))) - putchar('.'); - - if(! config_setting_is_root(setting)) - { - if(! name) - printf("[%d]", config_setting_index(setting)); - else - printf(name); - - return(1); - } - } - - return(0); -} - -/* - */ - -int main() -{ - struct config_t cfg; - config_setting_t *setting = NULL; - int i; - - do - { - /* Initialize the configuration */ - config_init(&cfg); - - /* Load the file */ - printf("loading [sample.cfg]..."); - if (!config_read_file(&cfg, "sample.cfg")) - { - puts("failed"); - break; - } - - puts("ok"); - - /* Add setting "foo" */ - printf("add setting \"foo\"..."); - setting = config_setting_add(cfg.root, "foo", CONFIG_TYPE_INT); - if (!setting) - { - puts("failed"); - break; - } - - config_setting_set_int(setting, 1234); - puts("ok"); - - /** Look up an array element */ - printf("looking up array element..."); - setting = config_lookup(&cfg, "arrays.values.[0]"); - if(! setting) - { - puts("failed"); - break; - } - - printf("value is: %d\n", config_setting_get_int(setting)); - printf("path is: "); - print_path(setting); - putchar('\n'); - - /* Save to "samplefoo.cfg" */ - printf("saving [samplefoo.cfg]..."); - config_write_file(&cfg, "samplefoo.cfg"); - puts("ok"); - - puts("Done!"); - } - while(0); - - /* Free the configuration */ - config_destroy(&cfg); - - return 0; -} - - -/***************************************************************************/ diff --git a/samples/c/stub.c b/samples/c/stub.c deleted file mode 100644 index a4608b7..0000000 --- a/samples/c/stub.c +++ /dev/null @@ -1,84 +0,0 @@ -#ifdef _MSC_VER -#pragma warning (disable: 4996) -#endif - -#include <stdio.h> -#include <stdlib.h> -#include "libconfig.h" - -int main(int argc, char **argv) -{ - config_t cfg; - FILE *fp; - int i, x; - const char *s; - const config_setting_t *array; - config_setting_t *old; - - fp = fopen("test.cfg", "rb"); - - if(! fp) - { - printf("Unable to open test.cfg\n"); - exit(1); - } - - config_init(&cfg); - x = config_read(&cfg, fp); - - fclose(fp); - - if(! x) - { - printf("error on line %d: %s\n", cfg.error_line, cfg.error_text); - exit(1); - } - - if(! config_lookup_string(&cfg, "application.group1.group2.zzz", &s)) - puts("NOT FOUND"); - else - printf("found: %s\n", s); - - array = config_lookup(&cfg, "application.group1.my_array"); - if(array) - { - for(i = 0; i < config_setting_length(array); i++) - { - long val = config_setting_get_int_elem(array, i); - printf("value [%i]: %ld\n", i, val); - } - } - - { - config_setting_t *root = config_root_setting(&cfg); - - config_setting_t *new = config_setting_add(root, "foobar", - CONFIG_TYPE_LIST); - - config_setting_t *newgrp, *newval; - - - if(! config_setting_set_float_elem(new, -1, 3.141592654)) - puts("FAILED"); - - if(! config_setting_set_string_elem(new, -1, "Hello, world!")) - puts("FAILED"); - - newgrp = config_setting_add(new, NULL, CONFIG_TYPE_GROUP); - - newval = config_setting_add(newgrp, "baz", CONFIG_TYPE_INT); - - old = config_lookup(&cfg, "application.group1"); - - printf("old is: %p\n", old); - config_setting_remove(old, "group2"); - } - - config_write(&cfg, stdout); - - - config_destroy(&cfg); - - - return(0); -} diff --git a/samples/c/Makefile.in b/tinytest/Makefile.in index 1aaf2be..6b52eb8 100644 --- a/samples/c/Makefile.in +++ b/tinytest/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,37 +35,26 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -noinst_PROGRAMS = stub$(EXEEXT) sample1$(EXEEXT) sample2$(EXEEXT) \ - sample3$(EXEEXT) -subdir = samples/c +subdir = tinytest DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/aux-build/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ac_config.h CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_sample1_OBJECTS = sample1.$(OBJEXT) -sample1_OBJECTS = $(am_sample1_OBJECTS) -sample1_LDADD = $(LDADD) -sample1_DEPENDENCIES = -am_sample2_OBJECTS = sample2.$(OBJEXT) -sample2_OBJECTS = $(am_sample2_OBJECTS) -sample2_LDADD = $(LDADD) -sample2_DEPENDENCIES = -am_sample3_OBJECTS = sample3.$(OBJEXT) -sample3_OBJECTS = $(am_sample3_OBJECTS) -sample3_LDADD = $(LDADD) -sample3_DEPENDENCIES = -am_stub_OBJECTS = stub.$(OBJEXT) -stub_OBJECTS = $(am_stub_OBJECTS) -stub_LDADD = $(LDADD) -stub_DEPENDENCIES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libtinytest_a_AR = $(AR) $(ARFLAGS) +libtinytest_a_LIBADD = +am_libtinytest_a_OBJECTS = tinytest.$(OBJEXT) +libtinytest_a_OBJECTS = $(am_libtinytest_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/aux-build/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @@ -73,10 +64,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(sample1_SOURCES) $(sample2_SOURCES) $(sample3_SOURCES) \ - $(stub_SOURCES) -DIST_SOURCES = $(sample1_SOURCES) $(sample2_SOURCES) \ - $(sample3_SOURCES) $(stub_SOURCES) +SOURCES = $(libtinytest_a_SOURCES) +DIST_SOURCES = $(libtinytest_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -102,20 +91,20 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -123,18 +112,23 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -151,7 +145,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -201,12 +195,9 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -stub_SOURCES = stub.c -sample1_SOURCES = sample1.c -sample2_SOURCES = sample2.c -sample3_SOURCES = sample3.c -AM_CPPFLAGS = -I $(top_srcdir) -LDADD = -L../../.libs -lconfig +noinst_LIBRARIES = libtinytest.a +libtinytest_a_SOURCES = tinytest.c tinytest.h +EXTRA_DIST = tinytest.vcproj all: all-am .SUFFIXES: @@ -215,14 +206,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/c/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu samples/c/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tinytest/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tinytest/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -240,25 +231,14 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -sample1$(EXEEXT): $(sample1_OBJECTS) $(sample1_DEPENDENCIES) - @rm -f sample1$(EXEEXT) - $(LINK) $(sample1_OBJECTS) $(sample1_LDADD) $(LIBS) -sample2$(EXEEXT): $(sample2_OBJECTS) $(sample2_DEPENDENCIES) - @rm -f sample2$(EXEEXT) - $(LINK) $(sample2_OBJECTS) $(sample2_LDADD) $(LIBS) -sample3$(EXEEXT): $(sample3_OBJECTS) $(sample3_DEPENDENCIES) - @rm -f sample3$(EXEEXT) - $(LINK) $(sample3_OBJECTS) $(sample3_LDADD) $(LIBS) -stub$(EXEEXT): $(stub_OBJECTS) $(stub_DEPENDENCIES) - @rm -f stub$(EXEEXT) - $(LINK) $(stub_OBJECTS) $(stub_LDADD) $(LIBS) +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libtinytest.a: $(libtinytest_a_OBJECTS) $(libtinytest_a_DEPENDENCIES) + -rm -f libtinytest.a + $(libtinytest_a_AR) libtinytest.a $(libtinytest_a_OBJECTS) $(libtinytest_a_LIBADD) + $(RANLIB) libtinytest.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -266,28 +246,25 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinytest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -303,14 +280,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -318,29 +295,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -361,19 +343,23 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -395,13 +381,14 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -416,6 +403,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -424,18 +413,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -461,7 +460,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -473,6 +472,7 @@ uninstall-am: mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: |