OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/Makefile.in versions 1.24 and 1.25
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/Makefile.in 1.24 -> 1.25

--- Makefile.in  2001/08/09 19:58:35     1.24
+++ Makefile.in  2001/08/11 15:23:09     1.25
@@ -27,49 +27,80 @@
 ##  Makefile.in: make(1) build procedure
 ##
 
-CC        = @CC@
-AR        = ar
-RANLIB    = @RANLIB@
-CPPFLAGS  = @CPPFLAGS@ @DEFS@ -D_GNU_SOURCE
-CFLAGS    = @CFLAGS@
-LDFLAGS   = @LDFLAGS@
-LIBS      = @LIBS@
-POD2MAN   = @POD2MAN@
-
-LIB_NAME  = libxds.a
-LIB_OBJS  = xds.o xds_engine_xdr.o xds_engine_xml.o
-TST_SRCS  = xds_test_lib.c xds_test_xdr.c xds_test_xml.c
+@SET_MAKE@
+
+#   installation paths
+DESTDIR     =
+TOP         = .
+prefix      = @prefix@
+exec_prefix = @exec_prefix@
+bindir      = @bindir@
+libdir      = @libdir@
+includedir  = @includedir@
+mandir      = @mandir@
+
+#   build tools
+CC          = @CC@
+LIBTOOL     = ./libtool
+SHTOOL      = ./shtool
+CPPFLAGS    = @CPPFLAGS@ @DEFS@ -D_GNU_SOURCE
+CFLAGS      = @CFLAGS@
+LDFLAGS     = @LDFLAGS@
+LIBS        = @LIBS@
+POD2MAN     = @POD2MAN@
+
+#   list of objects
+LIB_NAME    = libxds.la
+LIB_OBJS    = xds.lo xds_engine_xdr.lo xds_engine_xml.lo
+TST_SRCS    = xds_test_lib.c xds_test_xdr.c xds_test_xml.c
+
+#   file containing the official version information
+_VERSION_FILE = \
+    xds_version.c
+
+#   helper macro for updating version information
+_VERSION = \
+    $(SHTOOL) version -lc -nXDS -pxds_ $$OPT $(_VERSION_FILE);\
+    V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`;\
+    sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README
+
+#   helper macro for generating a Unix manual page
+_MANPAGE = \
+    V1=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \
+    V2=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \
+    D=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE) |\
+       sed -e 's;.*(;;' -e 's;).*;;'`; \
+    $(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \
+               --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\
+    sed -e "s;XDS_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}
 
 .SUFFIXES:
-.SUFFIXES: .c .o .pod .3
+.SUFFIXES: .c .lo
+
+.PHONY: clean distclean realclean check
+
+.c.lo:
+        $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+
+all: $(LIB_NAME) xds.3 xds-config.1
+
+$(LIB_NAME): $(LIB_OBJS)
+        $(LIBTOOL) --mode=link --quiet $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
+            -version-info `$(SHTOOL) version -l c -d libtool xds_version.c`
 
-.PHONY: clean distclean realclean check docs
+clean:
+        -$(RM) $(LIB_OBJS)
+        -$(RM) ./.*.t ./.*.l
+        -$(RM) $(LIB_NAME)
+        -$(RM) xds.3
 
-.c.o:
-        $(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) -c $<
-.pod.3:
-        $(POD2MAN) --section=3 --center="XDS Library Programmer API" $< >$@
-
-all: $(LIB_NAME) xds.3
-
-$(LIB_NAME):    $(LIB_OBJS)
-        @rm -f $@
-        $(AR) cr $@ $(LIB_OBJS)
-        $(RANLIB) $@
-
-clean::
-        @(cd docs && $(MAKE) $@)
-        -rm -f $(LIB_OBJS)
-        -rm -f ./.*.t ./.*.l
-        -rm -f $(LIB_NAME)
-        -rm -f xds.3
-
-distclean::     clean
-        @(cd docs && $(MAKE) $@)
-        -rm -f config.log config.status Makefile
+distclean: clean
+        -$(RM) config.log config.status Makefile
+        -$(RM) -r .libs >/dev/null 2>&1 || true
+        -$(RM) xds.h
 
-realclean::     distclean
-        -rm -f configure
+realclean: distclean
+        -$(RM) configure
 
 check:          $(LIB_NAME) $(TST_SRCS)
         -@for filename in $(TST_SRCS); do \
@@ -77,15 +108,69 @@
             filebase=`echo $$filename | sed -e 's;\.c;;'`; \
             testbase=`echo $$testname | sed -e 's;^XDS_TEST_;;'`; \
                 if [ ! -f ".$$testbase.t" ]; then \
-                echo "$(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME)"; \
-                $(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME); \
+                    echo "$(LIBTOOL) --mode=link --quiet $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME) $(LIBS)"; \
+                    $(LIBTOOL) --mode=link --quiet $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -D$$testname -o .$$testbase.t $$filebase.c $(LIB_NAME) $(LIBS); \
             fi; \
         done; \
     done; \
-    sh ./xds_test.sh ./.*.t
+    sh ./xds_test.sh "$(LIBTOOL) --mode=execute" ./.*.t
 
-docs:
-        @(cd docs && $(MAKE))
+#   build Unix manual pages
+xds-config.1: xds-config.pod $(_VERSION_FILE)
+        BASENAME="xds-config"; SEC=1; \
+        NAME="XDS"; ONELINE="Extensible Data Serialization"; \
+        $(_MANPAGE)
+xds.3: xds.pod $(_VERSION_FILE)
+        BASENAME="xds"; SEC=3; \
+        NAME="XDS"; ONELINE="Extensible Data Serialization"; \
+        $(_MANPAGE)
+
+#   perform standard installation procedure
+install: all
+        $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(bindir)
+        $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(includedir)
+        $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(libdir)
+        $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man1
+        $(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man3
+        $(SHTOOL) install -c -m 755 xds-config $(DESTDIR)$(bindir)/xds-config
+        $(SHTOOL) install -c -m 644 xds-config.1 $(DESTDIR)$(mandir)/man1/xds-config.1
+        $(SHTOOL) install -c -m 644 xds.3 $(DESTDIR)$(mandir)/man3/xds.3
+        $(SHTOOL) install -c -m 644 xds.h $(DESTDIR)$(includedir)/xds.h
+        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 \
+            libxds.la $(DESTDIR)$(libdir)/libxds.la
+
+#   perform standard uninstallation procedure
+uninstall:
+        @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libxds.la
+        $(RM) $(DESTDIR)$(includedir)/xds.h
+        $(RM) $(DESTDIR)$(mandir)/man3/xds.3
+        $(RM) $(DESTDIR)$(mandir)/man1/xds-config.1
+        $(RM) $(DESTDIR)$(bindir)/xds-config
+        $(RMDIR) $(DESTDIR)$(mandir)/man3
+        $(RMDIR) $(DESTDIR)$(mandir)/man1
+        $(RMDIR) $(DESTDIR)$(mandir)
+        $(RMDIR) $(DESTDIR)$(libdir)
+        $(RMDIR) $(DESTDIR)$(includedir)
+        $(RMDIR) $(DESTDIR)$(bindir)
+
+#   roll a distribution tarball
+dist: distclean
+        @$(SHTOOL) fixperm -v .; \
+        V=`$(SHTOOL) version -l c -d short xds_version.c`; \
+        $(SHTOOL) tarball -o xds-$${V}.tar.gz -d str-$${V} -u ossp -g ossp \
+                          -e 'CVS,\.cvsignore,\.[ao],^\.' -c 'gzip --best' .
+
+#   increase or update version information
+new-version:
+        @V="$(VERSION)"; \
+        if [ ".$$V" != . ]; then \
+                OPT="-s$$V"; \
+        else \
+                OPT="-e"; \
+        fi; \
+        $(_VERSION)
+update-version:
+        @OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION)
 
 # Dependencies
 

CVSTrac 2.0.1