ossp-pkg/cfg/Makefile.in 1.6 -> 1.7
--- Makefile.in 2004/07/17 07:37:55 1.6
+++ Makefile.in 2004/11/27 19:56:24 1.7
@@ -53,6 +53,7 @@
POD2MAN = pod2man
FLEX = @FLEX@
BISON = @BISON@
+PERL = @PERL@
# build objects
LIB_NAME = libcfg.la
@@ -61,12 +62,17 @@
TST_NAME = cfg_test
TST_OBJS = cfg_test.o
+PERL_NAME = perl/blib/lib/OSSP/cfg.pm
+PERL_OBJS = perl/cfg.pm
+
+WITH_PERL = @WITH_PERL@
+
# recognized suffixes for implicit rules
.SUFFIXES:
.SUFFIXES: .c .o .lo
# default target
-all: $(LIB_NAME) $(TST_NAME)
+all: $(LIB_NAME) $(TST_NAME) @PERL_NAME@
# implicit rules for compilation
.c.o:
@@ -83,6 +89,10 @@
$(TST_NAME): $(TST_OBJS) $(LIB_NAME)
$(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS)
+# explicit rule for Perl API
+$(PERL_NAME): $(PERL_OBJS) $(LIB_NAME)
+ @cd perl && $(PERL) Makefile.PL PREFIX=$(prefix) && $(MAKE) $(MFLAGS) all
+
# explicit rules for compiler construction tools
cfg_syn.c: cfg_syn.h cfg_syn_parse.h
cfg_syn_scan.o: cfg_syn_scan.c cfg_syn_parse.h
@@ -112,6 +122,9 @@
$(SHTOOL) echo -e "%BATTENTION: Parsing Difference (cfg_test.cfg vs. cfg_test.out):%b"; \
diff -u3 cfg_test.out cfg_test.try; \
fi
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd perl && $(MAKE) $(MFLAGS) test); \
+ fi
check-setup:
@./$(TST_NAME) cfg_test.cfg >cfg_test.out
@@ -126,6 +139,9 @@
$(SHTOOL) install -c -m 644 cfg.h $(DESTDIR)$(includedir)/
$(SHTOOL) install -c -m 644 cfg.3 $(DESTDIR)$(mandir)/man3/
$(LIBTOOL) --quiet --mode=install $(SHTOOL) install -c -m 644 libcfg.la $(DESTDIR)$(libdir)/
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd perl && $(MAKE) $(MFLAGS) install); \
+ fi
# perform uninstallation procedure
uninstall:
@@ -147,12 +163,18 @@
-$(RM) cfg_test.try
-$(RM) -r .libs >/dev/null 2>&1 || $(TRUE)
-$(RM) *.o *.lo
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd perl && $(MAKE) $(MFLAGS) clean); \
+ fi
# perform distribution clean up procedure
distclean: clean
-$(RM) config.log config.status config.cache
-$(RM) Makefile config.h cfg-config
-$(RM) libtool
+ -@if [ ".$(WITH_PERL)" = .yes ]; then \
+ (cd perl && $(MAKE) $(MFLAGS) distclean || true; rm -f Makefile.old); \
+ fi
# perform developer clean up procedure
realclean: distclean
|
|