From: ian Date: Sun, 28 Mar 1999 20:17:43 +0000 (+0000) Subject: Progress towards Standards.info X-Git-Tag: abandon.1999-04-10.multithread~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=9579019a0c8a57a67465cb35775ee0cce0ccf804 Progress towards Standards.info --- diff --git a/.cvsignore b/.cvsignore index 42d3dc2..86f3f5c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ +Makefile config.log config.cache config.status diff --git a/Makefile.in b/Makefile.in index 09e6ff4..9504855 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,23 +16,22 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -SUBDIR= -SUBDIRS= src dynamic client regress +srcdir= @srcdir@ +VPATH= @srcdir@ -all: - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d all; done +SUBDIRS= src dynamic client regress -check: all - $(MAKE) -C regress check +all install uninstall clean distclean mostlyclean maintainer-clean distprep: + set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done -install: - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install; done +install-strip: + $(MAKE) INSTALL_PROGRAM_FLAGS=-s -clean: - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done +dist: distprep + false not implemented yet -distclean: - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d distclean; done +check: all + $(MAKE) -C regress check -maintainer-clean: - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d maintainer-clean; done +TAGS info dvi: + # do nothing diff --git a/client/.cvsignore b/client/.cvsignore index d51e7a7..777b57a 100644 --- a/client/.cvsignore +++ b/client/.cvsignore @@ -1 +1,2 @@ +Makefile adnstest diff --git a/client/Makefile.in b/client/Makefile.in index 76a8bd9..2d3638e 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -16,13 +16,19 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -SUBDIR=/client -DIRCFLAGS= -I$(srcdir)/src +srcdir= @srcdir@ +VPATH= @srcdir@ + TARGETS= adnstest +include $(srcdir)/../settings.make -include $(srcdir)/settings.make +DIRCFLAGS= -I$(srcdir)/../src install: $(TARGETS) - $(INSTALL_BIN) $(TARGETS) $(bin_dir) + set -xe; for f in $(TARGETS); \ + do $(INSTALL_PROGRAM) $$f $(bin_dir)/$$f; done + +uninstall: + for f in $(TARGETS); do rm -f $(bin_dir)/$$f; done -adnstest: adnstest.o $(srcdir)/dynamic/$(SHLIBFILE) +adnstest: adnstest.o $(srcdir)/../dynamic/$(SHLIBFILE) diff --git a/configure b/configure index ef233f1..5cc73d5 100755 --- a/configure +++ b/configure @@ -689,23 +689,52 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:696: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6 -echo "configure:696: checking __attribute__((,,))" >&5 +echo "configure:725: checking __attribute__((,,))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_supported'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_supported=yes else @@ -727,20 +756,20 @@ EOF echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:731: checking __attribute__((noreturn))" >&5 +echo "configure:760: checking __attribute__((noreturn))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_noreturn'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_noreturn=yes else @@ -767,20 +796,20 @@ EOF echo $ac_n "checking __attribute__((const))""... $ac_c" 1>&6 -echo "configure:771: checking __attribute__((const))" >&5 +echo "configure:800: checking __attribute__((const))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_const=yes else @@ -807,20 +836,20 @@ EOF echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6 -echo "configure:811: checking __attribute__((format...))" >&5 +echo "configure:840: checking __attribute__((format...))" >&5 if eval "test \"`echo '$''{'adns_cv_attribute_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_attribute_format=yes else @@ -974,7 +1003,9 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "settings.make src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "settings.make Makefile + src/Makefile client/Makefile dynamic/Makefile regress/Makefile + src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index 4fabdad..8d40cc1 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,7 @@ AC_INIT(src/adns.h) AC_CONFIG_HEADER(src/config.h) AC_PROG_CC +AC_PROG_RANLIB ADNS_C_GCCATTRIB AC_SUBST(WARNS) @@ -43,4 +44,7 @@ MKSHLIB_3='-lc' SHLIBFILE='libadns.so.$(MAJOR).$(MINOR)' SHLIBSONAME='libadns.so.$(MAJOR)' -AC_OUTPUT(settings.make) +AC_OUTPUT( + settings.make Makefile + src/Makefile client/Makefile dynamic/Makefile regress/Makefile +) diff --git a/dynamic/.cvsignore b/dynamic/.cvsignore index 31cab98..ed7bf53 100644 --- a/dynamic/.cvsignore +++ b/dynamic/.cvsignore @@ -1 +1,2 @@ +Makefile libadns.so.* diff --git a/dynamic/Makefile.in b/dynamic/Makefile.in index b591b55..3393c2b 100644 --- a/dynamic/Makefile.in +++ b/dynamic/Makefile.in @@ -16,24 +16,27 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -SUBDIR=/dynamic -TARGETS= $(SHLIBFILE) +srcdir= @srcdir@ +VPATH= @srcdir@ -include $(srcdir)/settings.make -include $(srcdir)/src/adns.make +TARGETS= $(SHLIBFILE) +include $(srcdir)/../settings.make +include $(srcdir)/../src/adns.make ALLOBJS= $(addsuffix _p.o, $(basename $(LIBOBJS))) install: - $(INSTALL_LIB) $(SHLIBFILE) $(lib_dir) - $(INSTALL_HDR) $(srcdir)/src/adns.h $(include_dir) + $(INSTALL_PROGRAM) $(SHLIBFILE) $(lib_dir)/$(SHLIBFILE) + +uninstall: + rm -f $(lib_dir)/$(SHLIBFILE) $(SHLIBFILE): $(ALLOBJS) rm -f $@ $(MKSHLIB_1) $@ $(MKSHLIB_2) $(ALLOBJS) $(MKSHLIB_3) -%_p.o: $(srcdir)/src/%.c $(srcdir)/src/adns.h \ - $(srcdir)/src/internal.h $(srcdir)/src/config.h - $(SHLIBCC) -I$(srcdir)/src -c -o $@ $< +%_p.o: $(srcdir)/../src/%.c $(srcdir)/../src/adns.h \ + $(srcdir)/../src/internal.h $(srcdir)/../src/config.h + $(SHLIBCC) -I$(srcdir)/../src -c -o $@ $< $(LIBOBJS): diff --git a/regress/.cvsignore b/regress/.cvsignore index 4c446f9..154e5a9 100644 --- a/regress/.cvsignore +++ b/regress/.cvsignore @@ -1,3 +1,4 @@ +Makefile harness.h hcommon.c hrecord diff --git a/regress/Makefile.in b/regress/Makefile.in index 4419b15..f1bab3c 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -16,8 +16,14 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -SUBDIR=/regress -DIRCFLAGS= -I$(srcdir)/src +srcdir= @srcdir@ +VPATH= @srcdir@ + +TARGETS= hplayback hrecord +include $(srcdir)/../settings.make +include $(srcdir)/../src/adns.make + +DIRCFLAGS= -I$(srcdir)/../src HCPPFLAGS:= $(foreach F, \ gettimeofday select \ @@ -29,25 +35,20 @@ HARNLOBJS= $(addsuffix _d.o, $(basename $(LIBOBJS))) ALLOBJS= $(HARNLOBJS) dtest.o hrecord.o hplayback.o hcommon.o AUTOCSRCS= harness.h hrecord.c hplayback.c hcommon.c -TARGETS= hplayback hrecord - -include $(srcdir)/settings.make -include $(srcdir)/src/adns.make - .PRECIOUS: $(AUTOCSRCS) check: $(TARGETS) ./checkall -hrecord: $(srcdir)/client/adnstest.o hrecord.o hcommon.o $(HARNLOBJS) -hplayback: $(srcdir)/client/adnstest.o hplayback.o hcommon.o $(HARNLOBJS) +hrecord: $(srcdir)/../client/adnstest.o hrecord.o hcommon.o $(HARNLOBJS) +hplayback: $(srcdir)/../client/adnstest.o hplayback.o hcommon.o $(HARNLOBJS) -%_d.o: $(srcdir)/src/%.c +%_d.o: $(srcdir)/../src/%.c $(CC) $(HCPPFLAGS) -c -g -o $@ $< -$(ALLOBJS): $(srcdir)/src/adns.h $(srcdir)/src/internal.h harness.h +$(ALLOBJS): $(srcdir)/../src/adns.h $(srcdir)/../src/internal.h harness.h %:: %.m4 hmacros.i4 hsyscalls.i4 - m4 -P $< >$@-a.new + $(M4) -P $< >$@-a.new sed -e 's/hm_comma/,/g; s/hm_squote/'\''/g; /^[ ]*$$/d' <$@-a.new >$@-b.new @mv -f $@-b.new $@; rm -f $@-a.new diff --git a/settings.make.in b/settings.make.in index 70d7a8a..4313972 100644 --- a/settings.make.in +++ b/settings.make.in @@ -17,9 +17,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -srcdir= @srcdir@ -VPATH= @srcdir@$(SUBDIR) - +DISTVERSION= 0.1 MAJOR= 0 MINOR= 1 SHLIBFILE= @SHLIBFILE@ @@ -31,6 +29,9 @@ AUTOCFLAGS= @CFLAGS@ WARNS= @WARNS@ #WERROR= -Werror +M4= m4 +RANLIB= @RANLIB@ + SHLIBCC= @SHLIBCC@ MKSHLIB_1= @MKSHLIB_1@ @@ -38,19 +39,25 @@ MKSHLIB_2= @MKSHLIB_2@ MKSHLIB_3= @MKSHLIB_3@ prefix= @prefix@ -bin_dir= $(prefix)/bin -lib_dir= $(prefix)/lib +exec_prefix= @exec_prefix@ +bin_dir= $(exec_prefix)/bin +lib_dir= $(exec_prefix)/lib include_dir= $(prefix)/include -INSTALL= install -o 0 -g 0 -INSTALL_LIB= $(INSTALL) -m 755 -INSTALL_BIN= $(INSTALL) -m 755 -INSTALL_HDR= $(INSTALL) -m 644 +INSTALL= install -o 0 -g 0 +INSTALL_PROGRAM= $(INSTALL) -m 755 $(INSTALL_PROGRAM_FLAGS) +INSTALL_DATA= $(INSTALL) -m 644 -all: $(TARGETS) +all: $(TARGETS) -clean: +clean mostlyclean: rm -f *.o -maintainer-clean distclean: clean +distclean: clean rm -f $(TARGETS) *~ ./#*# core *.orig *.rej + rm -f Makefile settings.make config.h config.cache config.log + +distprep: $(AUTOCSRCS) + +maintainer-clean: distclean + -rm -f $(AUTOCSRCS) diff --git a/src/.cvsignore b/src/.cvsignore index 0e56cf2..547646a 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -1 +1,2 @@ +Makefile config.h diff --git a/src/Makefile.in b/src/Makefile.in index 2a892d9..2c8043d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -16,18 +16,28 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -SUBDIR=/src -TARGETS= libadns.a +srcdir= @srcdir@ +VPATH= @srcdir@ -include ../settings.make -include adns.make +TARGETS= libadns.a +include $(srcdir)/../settings.make +include adns.make install: + set -xe; for f in $(TARGETS); \ + do $(INSTALL_DATA) $$f $(lib_dir)/$$f; done + $(INSTALL_DATA) $(srcdir)/../src/adns.h $(include_dir)/adns.h + +uninstall: + for f in $(TARGETS); do rm -f $(lib_dir)/$$f; done + rm -f $(include_dir)/adns.h ALLOBJS= $(LIBOBJS) libadns.a: $(LIBOBJS) rm -f $@ - $(AR) cqsv $@ $(LIBOBJS) + $(AR) cqv $@.new $(LIBOBJS) + $(RANLIB) $@.new + mv -f $@.new $@ $(LIBOBJS): adns.h internal.h config.h