"Fossies" - the Fresh Open Source Software Archive

Member "tkscanfax1/Makefile" (27 Feb 2007, 4184 Bytes) of package /linux/misc/old/tkscanfax-1.1.8.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Makefile for tkscanfax
    2 
    3 # Change the following to the destination directories for
    4 # binaries and libralies. Probably /usr/bin and /usr/lib on Linux,
    5 # /usr/local/{bin,lib} on other systems.
    6 
    7 SHELL = /bin/sh
    8 INSTALL = /usr/bin/install
    9 
   10 srcdir = .
   11 prefix = /usr/local
   12 exec_prefix = $(prefix)
   13 bindir = $(exec_prefix)/bin
   14 datadir = $(prefix)/share
   15 libdir = $(exec_prefix)/lib
   16 docdir = $(datadir)/doc
   17 DESTDIR =
   18 #OUTDIR = $(HOME)/rpm/SOURCES
   19 OUTDIR = .
   20 [ "$(OUTDIR)" = "" ] && OUTDIR=.
   21 [ -d $(OUTDIR) ] || OUTDIR = $(HOME)
   22 icondir = $(datadir)/pixmaps
   23 applnkdir = /etc/X11/applnk
   24 kdelnkdir =$(datadir)/applnk
   25 APPDIR = $(applnkdir)/Applications
   26 
   27 name = tkscanfax
   28 subname = 1
   29 pkgdir = $(libdir)/$(name)$(subname)
   30 #distversion = 1.1.6a_$$(date -I | tr -d '-')
   31 distversion = 1.1.8
   32 distdate = $$(LANG=C LC_ALL=C date '+%d %b %Y')
   33 
   34 all:	
   35 	cat tkfax | sed -e 's,^set fax(libdir).*$$,set fax(libdir) $(pkgdir),' > tkfax~
   36 	[ -s tkfax~ ] && mv -f tkfax~ tkfax
   37 	cat tkscan | sed -e 's,^set c(libdir).*$$,set c(libdir) $(pkgdir),' > tkscan~
   38 	[ -s tkscan~ ] && mv -f tkscan~ tkscan
   39 	chmod +x tkfax tkscan
   40 
   41 	cat doc/ja/Users_Guide.html | sed -e 's,^TkFax .* - A Tcl/Tk GUI,TkFax $(distversion) - A Tcl/Tk GUI,' \
   42 			    -e 's,/[^ ]*/$(name)$(subname)/,$(pkgdir)/,g' \
   43 			    > doc/ja/tmp~
   44 	 [ -s doc/ja/tmp~ ] && mv -f doc/ja/tmp~ doc/ja/Users_Guide.html
   45 	cat doc/C/Users_Guide.html | sed -e 's,^TkFax .* - A Tcl/Tk GUI,TkFax $(distversion) - A Tcl/Tk GUI,' \
   46 			    -e 's,/[^ ]*/$(name)$(subname)/,$(pkgdir)/,g' \
   47 			    > doc/C/tmp~
   48 	 [ -s doc/C/tmp~ ] && mv -f doc/C/tmp~ doc/C/Users_Guide.html
   49 
   50 clean:
   51 	cat tkfax | sed -e 's,^set fax(libdir).*$$,set fax(libdir) /usr/local/lib/$(name)$(subname),' > tkfax~
   52 	[ -s tkfax~ ] && mv -f tkfax~ tkfax
   53 	cat tkscan | sed -e 's,^set c(libdir).*$$,set c(libdir) /usr/local/lib/$(name)$(subname),' > tkscan~
   54 	[ -s tkscan~ ] && mv -f tkscan~ tkscan
   55 	chmod +x tkfax tkscan	
   56 	$(RM) $(srcdir)/*~ $(srcdir)/*.sw?
   57 	$(RM) $(srcdir)/*/*~ $(srcdir)/*/*.sw?
   58 	$(RM) $(srcdir)/*/*/*~ $(srcdir)/*/*/*.sw?
   59 
   60 install: install-prog install-icon install-doc
   61 
   62 uninstall: uninstall-prog uninstall-icon uninstall-doc
   63 
   64 install-prog:
   65 	$(INSTALL) -d  $(DESTDIR)$(pkgdir)
   66 	$(INSTALL) -d  $(DESTDIR)$(pkgdir)/doc
   67 	$(INSTALL) -d  $(DESTDIR)$(bindir)
   68 	$(INSTALL) -m 755 $(srcdir)/tkfax $(srcdir)/tkscan $(DESTDIR)$(pkgdir)
   69 	$(INSTALL) $(srcdir)/*.tcl $(DESTDIR)$(pkgdir)
   70 	cp -rf $(srcdir)/scan-drivers $(srcdir)/tex $(srcdir)/images $(DESTDIR)$(pkgdir)
   71 	cp -rf $(srcdir)/doc/{images,C,??,??_*} $(DESTDIR)$(pkgdir)/doc
   72 	ln -sf $(pkgdir)/tkfax $(DESTDIR)$(bindir)/tkfax$(subname)
   73 	ln -sf $(pkgdir)/tkscan $(DESTDIR)$(bindir)/tkscan$(subname)
   74 uninstall-prog:
   75 	$(RM) $(DESTDIR)$(bindir)/tkfax$(subname)
   76 	$(RM) $(DESTDIR)$(bindir)/tkscan$(subname)
   77 	$(RM) -R $(DESTDIR)$(pkgdir)
   78 
   79 install-icon:
   80 	$(INSTALL) -d  $(DESTDIR)$(icondir)
   81 	$(INSTALL) -d  $(DESTDIR)$(APPDIR)
   82 	$(INSTALL) $(srcdir)/doc/images/tkfax-s.xpm  $(DESTDIR)$(icondir)
   83 	$(INSTALL) tkfax.desktop  $(DESTDIR)$(APPDIR)/tkfax$(subname).desktop
   84 	$(INSTALL) tkscan.desktop  $(DESTDIR)$(APPDIR)/tkscan$(subname).desktop
   85 	if [ -d $(kdelnkdir) ] ; then \
   86 	  $(INSTALL) -D tkfax.desktop  $(DESTDIR)$(kdelnkdir)/Utilities/tkfax$(subname).desktop ; \
   87 	  $(INSTALL) -D tkscan.desktop  $(DESTDIR)$(kdelnkdir)/Graphics/tkscan$(subname).desktop ;\
   88 	fi
   89 
   90 uninstall-icon:
   91 	$(RM) $(DESTDIR)$(APPDIR)/tkfax$(subname).destop
   92 	$(RM) $(DESTDIR)$(APPDIR)/tkscan$(subname).destop
   93 
   94 install-doc:
   95 	$(INSTALL) -d $(DESTDIR)$(docdir)/$(name)$(subname)
   96 	$(INSTALL)  $(srcdir)/doc/* $(DESTDIR)$(docdir)/$(name)$(subname); true
   97 uninstall-doc:
   98 	$(RM) -R $(DESTDIR)$(docdir)/$(name)$(subname)
   99 
  100 dist: about spec clean zip
  101 about:
  102 	cat fax-about.tcl | sed -e "s/^set fax(ex_version).*$$/set fax(ex_version) $(distversion)/" -e "s/^set fax(ex_date).*$$/set fax(ex_date) { $(distdate) }/" > fax-about.tcl~
  103 	[ -s fax-about.tcl~ ] && mv -f fax-about.tcl~ fax-about.tcl
  104 spec:
  105 	cat $(name).spec | sed -e "s/^[V:v]ersion: .*$$/Version: $(distversion)/" > $(name).spec~
  106 	[ -s $(name).spec~ ] && mv -f $(name).spec~ $(name).spec
  107 
  108 zip:
  109 	cd ..;tar czf $(OUTDIR)/$(name)-$(distversion).tar.gz $(name)$(subname)
  110 rpm: dist
  111 	cd ..;rpmbuild -tb $(OUTDIR)/$(name)-$(distversion).tar.gz