OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/Makefile.in versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/Makefile.in 1.2 -> 1.3

--- Makefile.in  2001/05/11 18:37:25     1.2
+++ Makefile.in  2001/05/11 19:50:52     1.3
@@ -30,6 +30,9 @@
 @SET_MAKE@
 
 TOP         = .
+
+#   installation paths
+DESTDIR     =
 prefix      = @prefix@
 exec_prefix = @exec_prefix@
 bindir      = @bindir@
@@ -37,6 +40,7 @@
 includedir  = @includedir@
 mandir      = @mandir@
 
+#   build tools
 CC          = @CC@
 CXX         = @CXX@
 CFLAGS      = @CFLAGS@ -I.
@@ -46,69 +50,80 @@
 AR          = @AR@
 RANLIB      = @RANLIB@
 RM          = rm -f
+RMDIR       = rmdir
 POD2MAN     = pod2man
 SHTOOL      = ./shtool
 LIBTOOL     = ./libtool
 
-SRCS=\
-l2_stream.c    \
-l2_channel.c   \
-l2_ch_fd.c     \
-l2_ch_file.c   \
-l2_ch_pipe.c   \
-l2_ch_syslog.c \
-l2_ch_socket.c \
-l2_ch_null.c   \
-l2_ch_filter.c \
-l2_ch_prefix.c \
-l2_ch_buffer.c
-
-OBJS=\
-l2_stream.lo    \
-l2_channel.lo   \
-l2_ch_fd.lo     \
-l2_ch_file.lo   \
-l2_ch_pipe.lo   \
-l2_ch_syslog.lo \
-l2_ch_socket.lo \
-l2_ch_null.lo   \
-l2_ch_filter.lo \
-l2_ch_prefix.lo \
-l2_ch_buffer.lo
+TARGET       = $(TARGET_LIBS) $(TARGET_MANS) $(TARGET_TESTS)
+TARGET_LIBS  = libl2.la @LIBL2XX_LA@
+TARGET_MANS  = l2-config.1 l2.3 @L2XX_3@
+TARGET_TESTS = l2_test @L2_TESTXX@
+
+#   list of library object files
+OBJS = \
+    l2_stream.lo \
+    l2_channel.lo \
+    l2_ch_fd.lo \
+    l2_ch_file.lo \
+    l2_ch_pipe.lo \
+    l2_ch_syslog.lo \
+    l2_ch_socket.lo \
+    l2_ch_null.lo \
+    l2_ch_filter.lo \
+    l2_ch_prefix.lo \
+    l2_ch_buffer.lo
 
+#   file containing the official version information
 _VERSION_FILE = \
-        $(S)l2_version.c
+    l2_version.c
 
+#   helper macro for updating version information
 _VERSION = \
-        $(SHTOOL) version -lc -nL2 -pl2_ $$OPT $(_VERSION_FILE);\
-        V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`;\
-        sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README
+    $(SHTOOL) version -lc -nL2 -pl2_ $$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;L2_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}
+    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;L2_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}
 
+#   implicit building rules
 .SUFFIXES:
-.SUFFIXES: .c .o .lo
+.SUFFIXES: .c .cc .o .lo
 .c.o:
-        $(CC) -c $(CFLAGS) $<
+        $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+.cc.o:
+        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
 .c.lo:
-        $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CFLAGS) $<
+        $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+.cc.lo:
+        $(LIBTOOL) --mode=compile --quiet $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
 
-all: libl2.la l2_test l2.3 l2-config.1
+#   default target
+all: $(TARGET) 
 
+#   build libraries
 libl2.la: $(OBJS) 
         $(LIBTOOL) --mode=link --quiet $(CC) -o libl2.la $(OBJS) -rpath $(libdir) \
-        -version-info `$(SHTOOL) version -l c -d libtool l2_version.c`
+            -version-info `$(SHTOOL) version -l c -d libtool l2_version.c`
+libl2++.la: $(OBJS) l2++.lo 
+        $(LIBTOOL) --mode=link --quiet $(CC) -o libl2++.la $(OBJS) l2++.lo -rpath $(libdir) \
+            -version-info `$(SHTOOL) version -l c -d libtool l2_version.c`
 
+#   build test suite programs
 l2_test: l2_test.o libl2.la
         $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test l2_test.o libl2.la $(LIBS)
+l2_test++: l2_test++.o libl2++.la
+        $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test++ l2_test++.o libl2++.la $(LIBS)
 
+#   build Unix manual pages
 l2-config.1: l2-config.pod $(_VERSION_FILE)
         BASENAME="l2-config"; SEC=1; \
         NAME="L2"; ONELINE="Logging Library"; \
@@ -117,29 +132,73 @@
         BASENAME="l2"; SEC=3; \
         NAME="L2"; ONELINE="Logging Library"; \
         $(_MANPAGE)
+l2++.3: l2++.pod $(_VERSION_FILE)
+        BASENAME="l2++"; SEC=3; \
+        NAME="L2"; ONELINE="Logging Library (C++)"; \
+        $(_MANPAGE)
 
+#   (minimalistic) test suite
 check: test
-test: l2_test
+test: test-c @TEST_CXX@
+test-c:
         $(LIBTOOL) --mode=execute ./l2_test
+test-cxx:
+        $(LIBTOOL) --mode=execute ./l2_test++
 
+#   perform standard installation procedure
 install: all
-        $(SHTOOL) mkdir -p -f -m 755 $(bindir)
-        $(SHTOOL) mkdir -p -f -m 755 $(includedir)
-        $(SHTOOL) mkdir -p -f -m 755 $(libdir)
-        $(SHTOOL) mkdir -p -f -m 755 $(mandir)/man1
-        $(SHTOOL) mkdir -p -f -m 755 $(mandir)/man3
-        $(SHTOOL) install -c -m 755 l2-config $(bindir)/l2-config
-        $(SHTOOL) install -c -m 644 l2-config.1 $(mandir)/man1/l2-config.1
-        $(SHTOOL) install -c -m 644 l2.3 $(mandir)/man3/l2.3
-        $(SHTOOL) install -c -m 644 l2.h $(includedir)/l2.h
-        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libl2.la $(libdir)/libl2.la
+        $(MAKE) $(MFLAGS) install-std install-c @INSTALL_CXX@
+install-std:
+        $(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 l2-config $(DESTDIR)$(bindir)/l2-config
+        $(SHTOOL) install -c -m 644 l2-config.1 $(DESTDIR)$(mandir)/man1/l2-config.1
+install-c:
+        $(SHTOOL) install -c -m 644 l2.3 $(DESTDIR)$(mandir)/man3/l2.3
+        $(SHTOOL) install -c -m 644 l2.h $(DESTDIR)$(includedir)/l2.h
+        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 \
+            libl2.la $(DESTDIR)$(libdir)/libl2.la
+install-cxx:
+        $(SHTOOL) install -c -m 644 l2++.3 $(DESTDIR)$(mandir)/man3/l2++.3
+        $(SHTOOL) install -c -m 644 l2++.h $(DESTDIR)$(includedir)/l2++.h
+        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 \
+            libl2++.la $(DESTDIR)$(libdir)/libl2++.la
+
+#   perform standard uninstallation procedure
+uninstall: 
+        $(MAKE) $(MFLAGS) @UNINSTALL_CXX@ uninstall-c uninstall-std
+uninstall-cxx:
+        @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libl2++.la
+        $(RM) $(DESTDIR)$(includedir)/l2++.h
+        $(RM) $(DESTDIR)$(mandir)/man3/l2++.3
+uninstall-c:
+        @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libl2.la
+        $(RM) $(DESTDIR)$(includedir)/l2.h
+        $(RM) $(DESTDIR)$(mandir)/man3/l2.3
+uninstall-std:
+        $(RM) $(DESTDIR)$(mandir)/man1/l2-config.1
+        $(RM) $(DESTDIR)$(bindir)/l2-config
+        $(RMDIR) $(DESTDIR)$(mandir)/man3
+        $(RMDIR) $(DESTDIR)$(mandir)/man1
+        $(RMDIR) $(DESTDIR)$(mandir)
+        $(RMDIR) $(DESTDIR)$(libdir)
+        $(RMDIR) $(DESTDIR)$(includedir)
+        $(RMDIR) $(DESTDIR)$(bindir)
 
+#   remove everything which can be regenerated 
+#   by "make all"
 clean:
         $(RM) *.lo *.o
-        $(RM) l2_test.o l2_test
-        $(RM) libl2.la
-        $(RM) -r .libs
+        $(RM) .libs/*
+        -$(RMDIR) .libs >/dev/null 2>&1 || $(TRUE)
+        $(RM) $(TARGET_LIBS)
+        $(RM) $(TARGET_TESTS)
         
+#   remove everything which can be regenerated 
+#   by "./configure && make all"
 distclean: clean
         $(RM) l2-config
         $(RM) l2_config.h
@@ -147,6 +206,14 @@
         $(RM) libtool
         $(RM) Makefile
 
+#   remove everything which can be regenerated 
+#   by "autoconf && autoheader && ./configure && make all"
+realclean: distclean
+        $(RM) configure
+        $(RM) l2-config.1
+        $(RM) l2.3
+
+#   roll a distribution tarball
 dist: distclean
         @$(SHTOOL) fixperm -v .; \
         V=`$(SHTOOL) version -l c -d short l2_version.c`; \
@@ -165,7 +232,8 @@
 update-version:
         @OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION)
 
-update:
+#   update build environment tools
+update-tools:
         @$(RM) ltmain.sh ltconfig shtool
         @$(MAKE) $(MFLAGS) ltmain.sh ltconfig configure shtool
 configure: configure.in aclocal.m4
@@ -197,7 +265,7 @@
 ##  (AUTOMATICALLY UPDATED - DO NOT EDIT)
 ##
 
-$(LOBJS): Makefile
+$(OBJS): Makefile
 
 l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h
 l2_ch_fd.o: l2_ch_fd.c l2.h l2_p.h

CVSTrac 2.0.1