OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/Makefile.in versions 1.5 and 1.6
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/Makefile.in 1.5 -> 1.6

--- Makefile.in  2002/02/04 22:35:20     1.5
+++ Makefile.in  2002/02/05 14:11:52     1.6
@@ -48,7 +48,6 @@
 RM              = rm -f
 RMDIR           = rmdir
 SHTOOL          = ./shtool
-LIBTOOL         = ./libtool
 POD2MAN         = pod2man
 TRUE            = true
 
@@ -56,49 +55,82 @@
 TARGET_PROGS    = rc
 TARGET_MANS     = rc.1 rc-sample.5
 
-PROG_OBJS       = rc.o rc_version.o
+SRCS            = rc.c rc_version.c rc_pcre.c
+OBJS            = rc.o rc_version.o rc_pcre.lo
 
 SUBDIRS         = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_STR@ @SUBDIR_POPT@
 
-all:            $(SUBDIRS) $(TARGET)
-
+.SUFFIXES:
+.SUFFIXES: .c .cc .cpp .o
 .c.o:
-        $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+        $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+
+all:            _SUBDIRS_all $(TARGET)
 
-$(PROG): Makefile $(OBJS) $(HDRS)
-        $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
+# Convinience rule calls _SUBDIRS with various make targets
+_SUBDIRS_all _SUBDIRS_check _SUBDIRS_install _SUBDIRS_uninstall _SUBDIRS_clean \
+_SUBDIRS_distclean _SUBDIRS_realclean _SUBDIRS_depend:
+        @$(MAKE) $(MFLAGS) \
+                 _SUBDIRS_TARGET=`echo $@ | sed -e 's/^_SUBDIRS_//'` \
+                 _SUBDIRS_STEPDOWN 
+
+# Nonrecursive rule makes the subdirs
+_SUBDIRS_STEPDOWN:
+        @for subdir in $(SUBDIRS); do \
+            test ! -f "$$subdir/Makefile" && continue; \
+            echo "===> $(_SUBDIRS_DP)$$subdir ($(_SUBDIRS_TARGET))"; \
+            (cd $$subdir; \
+             $(MAKE) $(MFLAGS) \
+                     _SUBDIRS_DP="$(_SUBDIRS_DP)$$subdir/" \
+                     $(_SUBDIRS_TARGET) || exit 1) || exit 1; \
+            echo "<=== $(_SUBDIRS_DP)$$subdir"; \
+        done
+
+$(TARGET_PROGS): Makefile $(OBJS)
+        $(CC) $(LDFLAGS) -o $(TARGET_PROGS) $(OBJS) $(LIBS)
+
+$(OBJS): Makefile
+
+# Build pcre regex library
+rc_pcre.lo: rc_pcre.tab rc_pcre.c
+rc_pcre.tab: rc_pcre.c
+        $(CC) $(CFLAGS) -DRC_PCRE_TAB $(LDFLAGS) -o rc_pcre.gen rc_pcre.c $(LIBS)
+        ./rc_pcre.gen >rc_pcre.tab
+        $(RM) rc_pcre.gen
 
 rc.1: rc.pod
         VS=`$(SHTOOL) version -lc -dshort rc_version.c`; \
         VL=`$(SHTOOL) version -lc -dlong rc_version.c`; \
-        $(POD2MAN) --section=5 --center="OSSP Run-command processor" \
+        $(POD2MAN) --section=5 --center="Run-command processor" \
                --release="$$VS" --date="$$VL" \
                rc.pod >rc.1
 
 rc-sample.5: rc-sample.pod
         VS=`$(SHTOOL) version -lc -dshort rc_version.c`; \
         VL=`$(SHTOOL) version -lc -dlong rc_version.c`; \
-        $(POD2MAN) --section=5 --center="OSSP Run-command processor samples" \
+        $(POD2MAN) --section=5 --center="Run-command processor samples" \
                --release="$$VS" --date="$$VL" \
                rc-sample.pod >rc-sample.5
 
 install: all
         $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
         $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man5
+        $(SHTOOL) install -c -m 644 rc.1 $(mandir)/man1/rc.1
+        $(SHTOOL) install -c -m 644 rc-sample.5 $(mandir)/man5/rc-sample.5
 
 clean:
-        -$(RM) $(TARGET_PROG) $(PROG_OBJS)
-        -$(RM) $(TARGET_TST) $(TST_OBJS)
+        $(RM) $(TARGET) $(OBJS)
 
 distclean: clean
-        -$(RM) config.log config.status config.cache
-        -$(RM) Makefile rc_config.h
-        -$(RM) libtool
+        $(RM) config.log config.status config.cache
+        $(RM) Makefile rc_config.h rc_pcre.tab
 
 realclean: distclean
-        -$(RM) configure rc_config.h.in
-        -$(RM) shtool
-        -$(RM) ltmain.sh libtool.m4 config.guess config.sub
+        $(RM) configure rc_config.h.in
+        $(RM) shtool
 
-check: rc
+check: test
+test: rc
         @./test.sh

CVSTrac 2.0.1