include ../Makefile.global

top	      = ..

##  Removed by "make clean", and needing the run of fixscript.
ALL           = INN/Utils/Shlock.pm

##  Not removed by "make clean" (INN::Config is generated by configure).
EXTRA         = INN/Config.pm

##  Directly usable (no need to run fixscript), and not removed.
SOURCES       = INN/ovsqlite_client.pm

##  The double underscore '__' will be converted into two colons '::'
##  during the install process (otherwise, make would complain in this
##  file, and we cannot generate the right file with '::' in the
##  doc/man directory because it would always be regenerated:
##  the file containing '__' would indeed not be found).
MAN           = ../doc/man/INN__Config.3pm \
		../doc/man/INN__Utils__Shlock.3pm \
		../doc/man/INN__ovsqlite_client.3pm

all: $(ALL) $(EXTRA) $(MAN)

install: all
	for F in $(ALL) $(EXTRA) $(SOURCES) ; do \
	    $(CP_RPUB) $$F $D$(PATHLIBPERL)/$$F ; \
	done

bootstrap: $(MAN)

clean:
	rm -f $(ALL)

clobber distclean: clean
	rm -f $(EXTRA)

maintclean: distclean
	rm -f $(MAN)

depend:

profiled: all

$(EXTRA) $(FIXSCRIPT):
	@echo Run configure before running make.  See INSTALL for details.
	@exit 1

##  Compilation rules.

FIX		= $(SHELL) $(FIXSCRIPT)

INN/Utils/Shlock.pm: INN/Utils/Shlock.pm.in $(FIXSCRIPT)
	$(FIX) INN/Utils/Shlock.pm.in

../doc/man/INN__Config.3pm: INN/Config.pm.in
	$(POD2MAN) -s '$(MAN3PM_EXT)' -n "INN::Config" $? > $@

../doc/man/INN__Utils__Shlock.3pm: INN/Utils/Shlock.pm.in
	$(POD2MAN) -s '$(MAN3PM_EXT)' -n "INN::Utils::Shlock" $? > $@

../doc/man/INN__ovsqlite_client.3pm: INN/ovsqlite_client.pm
	$(POD2MAN) -s '$(MAN3PM_EXT)' -n "INN::ovsqlite_client" $? > $@
