automake-work-in-progress-20010605
authorMattias Amnefelt <mattiasa@e.kth.se>
Tue, 5 Jun 2001 21:17:46 +0000 (21:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Jun 2001 21:17:46 +0000 (21:17 +0000)
work-in-progress automake work. will not work as-is as it relies on
headers being moved about and that isn't included yet.

18 files changed:
src/Makefile.am.common [new file with mode: 0644]
src/afs/Makefile.am [new file with mode: 0644]
src/cf/Makefile.am.common [new file with mode: 0644]
src/cmd/Makefile.am [new file with mode: 0644]
src/comerr/Makefile.am [new file with mode: 0644]
src/config.h.in [new file with mode: 0644]
src/config/Makefile.am [new file with mode: 0644]
src/configure.in
src/include/Makefile.am [new file with mode: 0644]
src/include/afs/Makefile.am [new file with mode: 0644]
src/include/rx/Makefile.am [new file with mode: 0644]
src/mkinstalldirs [new file with mode: 0644]
src/procmgmt/Makefile.am [new file with mode: 0644]
src/procmgmt/afs/Makefile.am [new file with mode: 0644]
src/regen.sh [new file with mode: 0644]
src/rxgen/Makefile.am [new file with mode: 0644]
src/util/Makefile.am [new file with mode: 0644]
src/util/afs/Makefile.am [new file with mode: 0644]

diff --git a/src/Makefile.am.common b/src/Makefile.am.common
new file mode 100644 (file)
index 0000000..f5ba1d6
--- /dev/null
@@ -0,0 +1,55 @@
+# $Id$
+
+INCLUDES+=-I$(top_builddir)/include 
+
+SYSNAME=@SYSNAME@
+
+CP = cp
+
+LEXLIB = @LEXLIB@
+
+COMPILE_ET = $(top_builddir)/comerr/compile_et
+
+.et.h:
+       $(COMPILE_ET) $<
+.et.c:
+       $(COMPILE_ET) $<
+
+buildinclude = $(top_builddir)/include
+
+all-local: install-build-headers
+
+install-build-headers:: $(include_HEADERS) $(build_HEADERZ) $(rxbuild_HEADERZ= $(afsbuild_HEADERZ)
+       @foo='$(include_HEADERS) $(build_HEADERZ)'; \
+       for f in $$foo; do \
+               f=`basename $$f`; \
+               if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
+               else file="$$f"; fi; \
+               if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
+               : ; else \
+                       echo " $(CP) $$file $(buildinclude)/$$f"; \
+                       $(CP) $$file $(buildinclude)/$$f; \
+               fi ; \
+       done
+       @foo='$(afsbuild_HEADERZ)'; \
+       for f in $$foo; do \
+               f=`basename $$f`; \
+               if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
+               else file="$$f"; fi; \
+               if cmp -s  $$file $(buildinclude)/afs/$$f 2> /dev/null ; then \
+               : ; else \
+                       echo " $(CP) $$file $(buildinclude)/afs/$$f"; \
+                       $(CP) $$file $(buildinclude)/afs/$$f; \
+               fi ; \
+       done
+       @foo='$(rxinclude_HEADERZ)'; \
+       for f in $$foo; do \
+               f=`basename $$f`; \
+               if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
+               else file="$$f"; fi; \
+               if cmp -s  $$file $(buildinclude)/rx/$$f 2> /dev/null ; then \
+               : ; else \
+                       echo " $(CP) $$file $(buildinclude)/rx/$$f"; \
+                       $(CP) $$file $(buildinclude)/rx/$$f; \
+               fi ; \
+       done
diff --git a/src/afs/Makefile.am b/src/afs/Makefile.am
new file mode 100644 (file)
index 0000000..3547ff0
--- /dev/null
@@ -0,0 +1,5 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+SUBDIRS= "foo"
diff --git a/src/cf/Makefile.am.common b/src/cf/Makefile.am.common
new file mode 100644 (file)
index 0000000..025b752
--- /dev/null
@@ -0,0 +1,178 @@
+# $Id$
+
+AUTOMAKE_OPTIONS = foreign no-dependencies
+
+SUFFIXES = .et .h
+
+INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
+
+AM_CFLAGS += $(WFLAGS)
+
+CP     = cp
+
+COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
+
+## set build_HEADERZ to headers that should just be installed in build tree
+
+buildinclude = $(top_builddir)/include
+
+## these aren't detected by automake
+LIB_XauReadAuth                = @LIB_XauReadAuth@
+LIB_crypt              = @LIB_crypt@
+LIB_dbm_firstkey       = @LIB_dbm_firstkey@
+LIB_dbopen             = @LIB_dbopen@
+LIB_dlopen             = @LIB_dlopen@
+LIB_dn_expand          = @LIB_dn_expand@
+LIB_el_init            = @LIB_el_init@
+LIB_getattr            = @LIB_getattr@
+LIB_gethostbyname      = @LIB_gethostbyname@
+LIB_getpwent_r         = @LIB_getpwent_r@
+LIB_getpwnam_r         = @LIB_getpwnam_r@
+LIB_getsockopt         = @LIB_getsockopt@
+LIB_logout             = @LIB_logout@
+LIB_logwtmp            = @LIB_logwtmp@
+LIB_odm_initialize     = @LIB_odm_initialize@
+LIB_pidfile            = @LIB_pidfile@
+LIB_readline           = @LIB_readline@
+LIB_res_search         = @LIB_res_search@
+LIB_setpcred           = @LIB_setpcred@
+LIB_setsockopt         = @LIB_setsockopt@
+LIB_socket             = @LIB_socket@
+LIB_syslog             = @LIB_syslog@
+LIB_tgetent            = @LIB_tgetent@
+
+LIBS                   = @LIBS@
+
+HESIODLIB = @HESIODLIB@
+HESIODINCLUDE = @HESIODINCLUDE@
+INCLUDE_hesiod = @INCLUDE_hesiod@
+LIB_hesiod = @LIB_hesiod@
+
+INCLUDE_krb4 = @INCLUDE_krb4@
+LIB_krb4 = @LIB_krb4@
+
+INCLUDE_openldap = @INCLUDE_openldap@
+LIB_openldap = @LIB_openldap@
+
+INCLUDE_readline = @INCLUDE_readline@
+LIB_readline = @LIB_readline@
+
+LEXLIB = @LEXLIB@
+
+install-suid-programs:
+       @foo='$(bin_SUIDS)'; \
+       for file in $$foo; do \
+       x=$(DESTDIR)$(bindir)/$$file; \
+       if chown 0:0 $$x && chmod u+s $$x; then :; else \
+       echo "*"; \
+       echo "* Failed to install $$x setuid root"; \
+       echo "*"; \
+       fi; done
+
+install-exec-hook: install-suid-programs
+
+install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
+       @foo='$(include_HEADERS) $(build_HEADERZ)'; \
+       for f in $$foo; do \
+               f=`basename $$f`; \
+               if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
+               else file="$$f"; fi; \
+               if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
+               : ; else \
+                       echo " $(CP) $$file $(buildinclude)/$$f"; \
+                       $(CP) $$file $(buildinclude)/$$f; \
+               fi ; \
+       done
+
+all-local: install-build-headers
+
+SUFFIXES += .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
+
+NROFF_MAN = groff -mandoc -Tascii
+#NROFF_MAN = nroff -man
+.1.cat1:
+       $(NROFF_MAN) $< > $@
+.3.cat3:
+       $(NROFF_MAN) $< > $@
+.5.cat5:
+       $(NROFF_MAN) $< > $@
+.8.cat8:
+       $(NROFF_MAN) $< > $@
+
+## MAINTAINERCLEANFILES += 
+
+dist-cat1-mans:
+       @foo='$(man1_MANS)'; \
+       bar='$(man_MANS)'; \
+       for i in $$bar; do \
+       case $$i in \
+       *.1) foo="$$foo $$i";; \
+       esac; done ;\
+       for i in $$foo; do \
+               x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \
+               echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
+               $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
+       done
+
+dist-cat3-mans:
+       @foo='$(man3_MANS)'; \
+       bar='$(man_MANS)'; \
+       for i in $$bar; do \
+       case $$i in \
+       *.3) foo="$$foo $$i";; \
+       esac; done ;\
+       for i in $$foo; do \
+               x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \
+               echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
+               $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
+       done
+
+dist-cat5-mans:
+       @foo='$(man5_MANS)'; \
+       bar='$(man_MANS)'; \
+       for i in $$bar; do \
+       case $$i in \
+       *.5) foo="$$foo $$i";; \
+       esac; done ;\
+       for i in $$foo; do \
+               x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \
+               echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
+               $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
+       done
+
+dist-cat8-mans:
+       @foo='$(man8_MANS)'; \
+       bar='$(man_MANS)'; \
+       for i in $$bar; do \
+       case $$i in \
+       *.8) foo="$$foo $$i";; \
+       esac; done ;\
+       for i in $$foo; do \
+               x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \
+               echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
+               $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
+       done
+
+dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans
+
+install-cat-mans:
+       $(SHELL) $(top_srcdir)/cf/install-catman.sh "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
+
+install-data-local: install-cat-mans
+
+
+.et.h:
+       $(COMPILE_ET) $<
+.et.c:
+       $(COMPILE_ET) $<
+
+if KRB4
+LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
+endif
+
+if KRB5
+LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
+       $(top_builddir)/lib/asn1/libasn1.la
+LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
+endif
+
diff --git a/src/cmd/Makefile.am b/src/cmd/Makefile.am
new file mode 100644 (file)
index 0000000..2666bf1
--- /dev/null
@@ -0,0 +1,16 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+afsincludedir = $(top_builddir)/include/afs
+afsinclude_HEADERS = com_err.h error_table.h mit-sipb-cr.h
+afsbuild_HEADERZ=$(afsinclude_HEADERS)
+
+bin_PROGRAMS = compile_et
+
+compile_et_SOURCES = compile_et.c parse.y lex.l 
+compile_et_LDADD = -L../util -lutil
+
+lib_LIBRARIES=libcom_err.a
+
+libcom_err_a_SOURCES =  error_msg.c et_name.c com_err.c 
diff --git a/src/comerr/Makefile.am b/src/comerr/Makefile.am
new file mode 100644 (file)
index 0000000..157f0db
--- /dev/null
@@ -0,0 +1,18 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+YFLAGS = -d
+
+afsincludedir = $(top_builddir)/include/afs
+afsinclude_HEADERS = com_err.h error_table.h mit-sipb-cr.h
+afsbuild_HEADERZ=$(afsinclude_HEADERS)
+
+bin_PROGRAMS = compile_et
+
+compile_et_SOURCES = compile_et.c parse.y lex.l 
+compile_et_LDADD = -L../util -lutil
+
+lib_LIBRARIES=libcom_err.a
+
+libcom_err_a_SOURCES =  error_msg.c et_name.c com_err.c 
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644 (file)
index 0000000..6bf33aa
--- /dev/null
@@ -0,0 +1,11 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if lex declares yytext as a char * by default, not a char[].  */
+#undef YYTEXT_POINTER
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
diff --git a/src/config/Makefile.am b/src/config/Makefile.am
new file mode 100644 (file)
index 0000000..e5f2eb8
--- /dev/null
@@ -0,0 +1,18 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+afsincludedir = $(includedir)/afs
+afsinclude_HEADERS =   \
+       stds.h          \
+       icl.h           \
+       afs_args.h      \
+       venus.h         \
+       debug.h         \
+       param.h         \
+       afs_sysnames.h
+
+afsbuild_HEADERZ=$(afsinclude_HEADERS)
+
+param.h:       param.$(SYSNAME).h
+       cp $(srcdir)/param.$(SYSNAME).h param.h
index 6228a2e..f2f5463 100644 (file)
@@ -1,4 +1,5 @@
 AC_INIT(src/config/stds.h)
+AM_INIT_AUTOMAKE(openafs,devel)
 AC_CANONICAL_HOST
 AC_CONFIG_HEADER(src/afsconfig.h)
 
@@ -30,6 +31,8 @@ dnl Checks for programs.
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_RANLIB
+AC_PROG_YACC
+AM_PROG_LEX
 
 dnl fix to use config.sub output
 AC_MSG_CHECKING(your OS)
@@ -133,3 +136,17 @@ AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h)
 AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
 
 AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
+
+AC_OUTPUT(             \
+Makefile               \
+config/Makefile                \
+procmgmt/Makefile      \
+procmgmt/afs/Makefile  \
+util/Makefile          \
+util/afs/Makefile      \
+comerr/Makefile                \
+rxgen/Makefile         \
+include/Makefile       \
+include/afs/Makefile   \
+include/rx/Makefile
+)
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
new file mode 100644 (file)
index 0000000..e0f24bb
--- /dev/null
@@ -0,0 +1,13 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+SUBDIRS =      \
+       afs     \
+       rx
+
+CLEANFILES =            \
+       com_err.h       \
+       error_table.h   \
+       mit-sipb-cr.h   
+
diff --git a/src/include/afs/Makefile.am b/src/include/afs/Makefile.am
new file mode 100644 (file)
index 0000000..d9ef23f
--- /dev/null
@@ -0,0 +1,6 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+CLEANFILES =            \
+       param.h         
diff --git a/src/include/rx/Makefile.am b/src/include/rx/Makefile.am
new file mode 100644 (file)
index 0000000..242ee74
--- /dev/null
@@ -0,0 +1,7 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+CLEANFILES =            \
+       afs_sysnames.h  \
+       param.h         
diff --git a/src/mkinstalldirs b/src/mkinstalldirs
new file mode 100644 (file)
index 0000000..d0fd194
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id$
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp" 1>&2
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+         errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/src/procmgmt/Makefile.am b/src/procmgmt/Makefile.am
new file mode 100644 (file)
index 0000000..7d7247c
--- /dev/null
@@ -0,0 +1,9 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+SUBDIRS = afs
+
+lib_LIBRARIES=libprocmgmt.a
+
+libprocmgmt_a_SOURCES = procmgmt_unix.c
diff --git a/src/procmgmt/afs/Makefile.am b/src/procmgmt/afs/Makefile.am
new file mode 100644 (file)
index 0000000..3c9a2b0
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+buildinclude = $(top_builddir)/include/afs
+
+afsincludedir = $(includedir)/afs
+afsinclude_HEADERS =   \
+       procmgmt.h
+
+build_HEADERZ = $(afsinclude_HEADERS)
+
diff --git a/src/regen.sh b/src/regen.sh
new file mode 100644 (file)
index 0000000..9bb261a
--- /dev/null
@@ -0,0 +1,8 @@
+echo "Running aclocal"
+aclocal -I cf
+echo "Running autoconf"
+autoconf
+echo "Running autoheader"
+autoheader
+echo "Running automake"
+automake
diff --git a/src/rxgen/Makefile.am b/src/rxgen/Makefile.am
new file mode 100644 (file)
index 0000000..fe9f287
--- /dev/null
@@ -0,0 +1,19 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+bin_PROGRAMS = rxgen
+
+rxgen_SOURCES =        \
+       rpc_main.c      \
+       rpc_hout.c      \
+       rpc_cout.c      \
+       rpc_parse.c     \
+       rpc_scan.c      \
+       rpc_util.c      \
+       rpc_svcout.c    \
+       rpc_clntout.c   \
+       rpc_util.h      \
+       rpc_parse.h     \
+       rpc_scan.h
+
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
new file mode 100644 (file)
index 0000000..aeb1d61
--- /dev/null
@@ -0,0 +1,31 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+SUBDIRS = afs
+
+#bin_PROGRAMS = sys
+
+lib_LIBRARIES=libutil.a
+
+libutil_a_SOURCES =    \
+       assert.c        \
+       base64.c        \
+       casestrcpy.c    \
+       ktime.c         \
+       volparse.c      \
+       hostparse.c     \
+       hputil.c        \
+       kreltime.c      \
+       isathing.c      \
+       get_krbrlm.c    \
+       uuid.c          \
+       serverLog.c     \
+       dirpath.c       \
+       fileutil.c      \
+       netutils.c      \
+       flipbase64.c    \
+       afs_atomlist.c  \
+       afs_lhash.c     \
+       snprintf.c
+
diff --git a/src/util/afs/Makefile.am b/src/util/afs/Makefile.am
new file mode 100644 (file)
index 0000000..15a5f2f
--- /dev/null
@@ -0,0 +1,26 @@
+# $Id$
+
+include $(top_srcdir)/Makefile.am.common
+
+buildinclude = $(top_builddir)/include/afs
+
+afsincludedir = $(includedir)/afs
+afsinclude_HEADERS =   \
+       assert.h        \
+       potpourri.h     \
+       itc.h           \
+       errors.h        \
+       afsutil.h       \
+       pthread_glock.h \
+       dirpath.h       \
+       afs_atomlist.h  \
+       fileutil.h      \
+       ktime.h         \
+       netutils.h      \
+       packages.h      \
+       pthread_nosigs.h \
+       remote.h        \
+       afs_lhash.h
+
+build_HEADERZ = $(afsinclude_HEADERS)
+