From b063462786de8952f4e8e43753d084fbfbbfc74d Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 24 Oct 2014 14:39:58 +0200 Subject: [PATCH] Move examples to spec dir --- Makefile.in | 14 +++++++++----- configure | 4 ++-- configure.ac | 2 +- {src => spec}/example/Makefile.in | 4 ++-- {src => spec}/example/example-all-functions.c | 0 {src => spec}/example/example-reverse.c | 0 {src => spec}/example/example-simple-answers.c | 0 {src => spec}/example/example-synchronous.c | 0 {src => spec}/example/example-tree.c | 0 {src => spec}/example/getdns_core_only.h | 0 {src => spec}/example/getdns_libevent.h | 0 src/Makefile.in | 10 ++-------- 12 files changed, 16 insertions(+), 18 deletions(-) rename {src => spec}/example/Makefile.in (97%) rename {src => spec}/example/example-all-functions.c (100%) rename {src => spec}/example/example-reverse.c (100%) rename {src => spec}/example/example-simple-answers.c (100%) rename {src => spec}/example/example-synchronous.c (100%) rename {src => spec}/example/example-tree.c (100%) rename {src => spec}/example/getdns_core_only.h (100%) rename {src => spec}/example/getdns_libevent.h (100%) diff --git a/Makefile.in b/Makefile.in index bc4ae8bf..ab64e0fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -90,7 +90,7 @@ doc: FORCE cd doc && $(MAKE) $@ example: - cd src && $(MAKE) $@ + cd spec/example && $(MAKE) $@ test: cd src && $(MAKE) $@ @@ -98,6 +98,7 @@ test: clean: cd src && $(MAKE) $@ cd doc && $(MAKE) $@ + cd spec/example && $(MAKE) $@ rm -f *.o depend: @@ -108,6 +109,7 @@ distclean: rmdir src 2>/dev/null || true cd doc && $(MAKE) $@ rmdir doc 2>/dev/null || true + cd spec/example && $(MAKE) $@ rm -f config.log config.status Makefile libtool rm -fR autom4te.cache @@ -130,10 +132,10 @@ $(distdir): mkdir -p $(distdir)/src mkdir -p $(distdir)/src/getdns mkdir -p $(distdir)/src/test - mkdir -p $(distdir)/src/example mkdir -p $(distdir)/src/extension mkdir -p $(distdir)/doc mkdir -p $(distdir)/spec + mkdir -p $(distdir)/spec/example cp $(srcdir)/configure.ac $(distdir) cp $(srcdir)/configure $(distdir) cp $(srcdir)/AUTHORS $(distdir) @@ -160,12 +162,14 @@ $(distdir): cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test cp $(srcdir)/src/test/*.sh $(distdir)/src/test cp $(srcdir)/src/test/*.good $(distdir)/src/test - cp $(srcdir)/src/example/Makefile.in $(distdir)/src/example - cp $(srcdir)/src/example/*.[ch] $(distdir)/src/example cp $(srcdir)/doc/Makefile.in $(distdir)/doc cp $(srcdir)/doc/*.in $(distdir)/doc cp $(srcdir)/doc/manpgaltnames $(distdir)/doc - cp $(srcdir)/spec/* $(distdir)/spec + cp $(srcdir)/spec/*.html $(distdir)/spec + cp $(srcdir)/spec/*.tgz $(distdir)/spec + cp $(srcdir)/spec/example/Makefile.in $(distdir)/spec/example + cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example + distcheck: $(distdir).tar.gz gzip -cd $(distdir).tar.gz | tar xvf - diff --git a/configure b/configure index f820560c..32d17a81 100755 --- a/configure +++ b/configure @@ -11683,7 +11683,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: Default trust anchor: $TRUST_ANCHOR_FILE" >&5 $as_echo "$as_me: Default trust anchor: $TRUST_ANCHOR_FILE" >&6;} -ac_config_files="$ac_config_files Makefile src/Makefile src/getdns/Makefile src/getdns/getdns.h src/example/Makefile src/test/Makefile doc/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/getdns/Makefile src/getdns/getdns.h spec/example/Makefile src/test/Makefile doc/Makefile" if test -n "$DOXYGEN" then ac_config_files="$ac_config_files src/Doxyfile" @@ -12826,7 +12826,7 @@ do "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/getdns/Makefile") CONFIG_FILES="$CONFIG_FILES src/getdns/Makefile" ;; "src/getdns/getdns.h") CONFIG_FILES="$CONFIG_FILES src/getdns/getdns.h" ;; - "src/example/Makefile") CONFIG_FILES="$CONFIG_FILES src/example/Makefile" ;; + "spec/example/Makefile") CONFIG_FILES="$CONFIG_FILES spec/example/Makefile" ;; "src/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/Doxyfile") CONFIG_FILES="$CONFIG_FILES src/Doxyfile" ;; diff --git a/configure.ac b/configure.ac index c72791fa..64f6f127 100644 --- a/configure.ac +++ b/configure.ac @@ -384,7 +384,7 @@ AC_DEFINE_UNQUOTED([TRUST_ANCHOR_FILE], ["$TRUST_ANCHOR_FILE"], [Default trust a AC_SUBST(TRUST_ANCHOR_FILE) AC_MSG_NOTICE([Default trust anchor: $TRUST_ANCHOR_FILE]) -AC_CONFIG_FILES([Makefile src/Makefile src/getdns/Makefile src/getdns/getdns.h src/example/Makefile src/test/Makefile doc/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/getdns/Makefile src/getdns/getdns.h spec/example/Makefile src/test/Makefile doc/Makefile]) if [ test -n "$DOXYGEN" ] then AC_CONFIG_FILES([src/Doxyfile]) fi diff --git a/src/example/Makefile.in b/spec/example/Makefile.in similarity index 97% rename from src/example/Makefile.in rename to spec/example/Makefile.in index 23d99a84..a7139f4a 100644 --- a/src/example/Makefile.in +++ b/spec/example/Makefile.in @@ -45,8 +45,8 @@ EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@ EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@ CC=@CC@ -CFLAGS=@CFLAGS@ -Wall -I.. -I$(srcdir)/.. -I$(srcdir) -std=c99 -LDFLAGS=@LDFLAGS@ -L.. +CFLAGS=@CFLAGS@ -Wall -I$(srcdir) -I$(srcdir)/../../src -std=c99 +LDFLAGS=@LDFLAGS@ -L../../src LDLIBS=-lgetdns @LIBS@ PROGRAMS=example-all-functions example-simple-answers example-tree example-synchronous example-reverse diff --git a/src/example/example-all-functions.c b/spec/example/example-all-functions.c similarity index 100% rename from src/example/example-all-functions.c rename to spec/example/example-all-functions.c diff --git a/src/example/example-reverse.c b/spec/example/example-reverse.c similarity index 100% rename from src/example/example-reverse.c rename to spec/example/example-reverse.c diff --git a/src/example/example-simple-answers.c b/spec/example/example-simple-answers.c similarity index 100% rename from src/example/example-simple-answers.c rename to spec/example/example-simple-answers.c diff --git a/src/example/example-synchronous.c b/spec/example/example-synchronous.c similarity index 100% rename from src/example/example-synchronous.c rename to spec/example/example-synchronous.c diff --git a/src/example/example-tree.c b/spec/example/example-tree.c similarity index 100% rename from src/example/example-tree.c rename to spec/example/example-tree.c diff --git a/src/example/getdns_core_only.h b/spec/example/getdns_core_only.h similarity index 100% rename from src/example/getdns_core_only.h rename to spec/example/getdns_core_only.h diff --git a/src/example/getdns_libevent.h b/spec/example/getdns_libevent.h similarity index 100% rename from src/example/getdns_libevent.h rename to spec/example/getdns_libevent.h diff --git a/src/Makefile.in b/src/Makefile.in index 965bf615..31881599 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -56,10 +56,10 @@ have_libev = @have_libev@ # datarootdir is here to please some checkers datarootdir=@datarootdir@ INSTALL = @INSTALL@ -LIBTOOL = ../libtool srcdir = @srcdir@ VPATH = @srcdir@ +LIBTOOL = ../libtool CC=@CC@ CFLAGS=@CFLAGS@ -Wall -I$(srcdir) -I. -std=c99 -D_POSIX_C_SOURCE=200112L @@ -142,20 +142,14 @@ libgetdns.la: $(GETDNS_OBJ) $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) test: FORCE cd test && $(MAKE) $@ -example: FORCE - cd example && $(MAKE) $@ - clean: cd test && $(MAKE) $@ - cd example && $(MAKE) $@ rm -f *.o *.lo extension/*.lo extension/*.o $(PROGRAMS) libgetdns.la libgetdns_ext_*.la rm -rf .libs extension/.libs distclean : clean cd test && $(MAKE) $@ rmdir test 2>/dev/null || true - cd example && $(MAKE) $@ - rmdir example 2>/dev/null || true rm -f Makefile config.status config.log Doxyfile config.h getdns/Makefile getdns/getdns.h rmdir getdns 2>/dev/null || true rmdir extension 2>/dev/null || true @@ -204,7 +198,7 @@ depend: (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ || mv Makefile.in.new Makefile.in ) -.PHONY: clean test example +.PHONY: clean test FORCE: # Dependencies for gldns, utils, the mini_event extension and compat functions