Commit 5746b292 authored by Henning Geinitz's avatar Henning Geinitz

Added target "make uninstall".

Henning Meier-Geinitz <henning@meier-geinitz.de>
parent 5a6208f6
......@@ -35,3 +35,9 @@ make install
sane-1.0.2 and later.
See also the PROBLEMS file.
Uninstall
=========
To uninstall the binaries and manual pages, type `make uninstall´.
\ No newline at end of file
......@@ -46,9 +46,9 @@ distclean: clean distclean-recursive
depend: depend-recursive
all-recursive install-recursive uninstall-recursive clean-recursive distclean-recursive \
depend-recursive:
for subdir in $(SUBDIRS); do \
all-recursive install-recursive uninstall-recursive clean-recursive \
distclean-recursive depend-recursive:
@for subdir in $(SUBDIRS); do \
target=`echo $@ | sed s/-recursive//`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) \
......@@ -56,4 +56,5 @@ depend-recursive:
done && test -z "$$fail"
.PHONY: all clean depend \
all-recursive install-recursive clean-recursive depend-recursive
all-recursive install-recursive clean-recursive depend-recursive \
uninstall-recursive
......@@ -33,7 +33,6 @@ LN_S = @LN_S@
SECT1 = xscanimage.1 xcam.1
MANPAGES = $(SECT1)
DOCS = sane.ps sane.dvi
LATEX = TEXINPUTS=$(srcdir):$$TEXINPUTS latex
DLH = TEXINPUTS=$(srcdir):$$TEXINPUTS dlh
MAN2HTML= nroff -man |\
......@@ -42,12 +41,13 @@ MAN2HTML= nroff -man |\
all: $(MANPAGES)
%.1 %.5: %.man
sed -e 's|@DATADIR@|$(datadir)|g' \
%.1: %.man
@sed -e 's|@DATADIR@|$(datadir)|g' \
-e 's|@CONFIGDIR@|$(configdir)|g' \
-e 's|@LIBDIR@|$(libdir)|g' \
-e 's|@BINDIR@|$(bindir)|g' \
-e 's|@SBINDIR@|$(sbindir)|g' $^ >$@
@echo Generating manpage $@...
install: $(MANPAGES)
$(MKDIR) $(mandir)/man1
......@@ -56,51 +56,30 @@ install: $(MANPAGES)
$(INSTALL_DATA) $${page} $(mandir)/man1/$${page} || exit 1; \
done
install-docs: ps
$(MKDIR) $(docdir)
@for doc in $(DOCS); do \
echo installing $${doc} in $(docdir)/$${doc}...; \
$(INSTALL_DATA) $${doc} $(docdir)/$${doc} || exit 1; \
uninstall:
@for page in $(SECT1); do \
echo Removing $${page} in $(mandir)/man1/$${page}...; \
rm -f $(mandir)/man1/$${page} ; \
done
docs: ps html
sane.ind:
touch sane.ind
$(LATEX) $(srcdir)/sane
makeindex sane.idx
ps: sane.ind
-rm -f figs; $(LN_S) $(srcdir)/figs .
$(LATEX) $(srcdir)/sane
$(LATEX) $(srcdir)/sane
dvips sane.dvi -o sane.ps
html: sane.ind sane-backends-html html-man
$(DLH) $(srcdir)/sane.tex
sane-backends-html:
cd $(top_srcdir)/backend \
&& emacs -batch --load $(top_srcdir)/tools/sane-desc.el \
-f sane-desc-doit
html-man: $(MANPAGES)
@for page in $(MANPAGES); do \
echo "translating $${page} to $${page}.html..."; \
cat $${page} | $(MAN2HTML) > $${page}.html; \
done
sane.tex: sane.ind
clean:
rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky *.blg *.idx *.cb
rm -f *.ilg
distclean: clean
rm -f $(MANPAGES)
for manpage in $(MANPAGES) ; do \
rm -f $${manpage}.html ; \
done
rm -f Makefile *~
rm -f *.lot *.lof *.ind
depend:
.PHONY: all install depend clean ps html htmlman sane-backends-html
.PHONY: all install depend clean ps html htmlman sane-backends-html uninstall
......@@ -74,4 +74,4 @@ clean:
distclean: clean
rm -f Makefile
.PHONY: all install check depend clean distclean
.PHONY: all install check depend clean distclean uninstall
......@@ -63,6 +63,8 @@ libsanei.a: $(LIBSANEI_OBJS)
install:
uninstall:
depend:
makedepend -I. -I../include *.c
......@@ -73,4 +75,4 @@ clean:
distclean: clean
rm -f Makefile
.PHONY: all install check depend clean distclean
.PHONY: all install check depend clean distclean uninstall
......@@ -72,6 +72,13 @@ install: $(PROGRAMS)
done
$(INSTALL_DATA) $(srcdir)/sane-style.rc $(datadir)/sane-style.rc
uninstall:
@for program in $(BINPROGS); do \
echo removing $(bindir)/$${program}...; \
rm -f $(bindir)/$${program}; \
done
rm -f $(datadir)/sane-style.rc
xscanimage: $(XSCAN_OBJS) $(LIBSANEI) $(LIBLIB)
$(LINK) $(XSCAN_OBJS) $(LIBSANEI) \
$(LIBLIB) $(GIMP_LIBS) $(GTK_LIBS) $(LIBS)
......@@ -90,4 +97,4 @@ distclean: clean
depend:
makedepend $(INCLUDES) *.c
.PHONY: all install depend clean distclean
.PHONY: all install depend clean distclean uninstall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment