"Fossies" - the Fresh Open Source Software Archive

Member "rfcdiff-1.48/Makefile.common" (17 Apr 2019, 5496 Bytes) of package /linux/privat/rfcdiff-1.48.tgz:


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. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile.common": 1.46_vs_1.47.

    1 # ----------------------------------------------------------------------
    2 #	Generic
    3 # ----------------------------------------------------------------------
    4 
    5 # tool should be set in the tool-specific Makefile, which should include this
    6 tool    ?= $(shell basename $(PWD))
    7 version := $(shell ./$(tool) --version | awk '{print $$2}' )
    8 thisver := $(version)
    9 prevver := $(shell if [ -d ./archive ]; then ls -d ./archive/$(tool)-v* | grep -v ".tgz" | egrep '[0-9]+\.[0-9]+' | grep -v "$(version)" | sed 's/^.*$(tool)-v//' | sort -n -k 1.3 | tail -n 1; else echo "0.00"; fi)
   10 
   11 language:= $(shell head -1 $(tool) | awk '{ sub("^.+/", "", $$1); print $$1; }')
   12 logentry := $(shell sed -n -r "/^$(tool) \($(version).*\)/,/^ -- /p" changelog | head -n -1 | sed -r 's/"/\\"/g' )
   13 
   14 # Sources
   15 sources	+= $(tool) copyright control.in changelog todo template.shtml.pyht Makefile ../Makefile.common
   16 
   17 # Webpages
   18 webpages += index.shtml code.shtml copyright.shtml changelog.shtml
   19 
   20 # Additional scripts
   21 scripts +=
   22 
   23 binaries += 
   24 
   25 # Install directory
   26 prefix	:= /usr/local
   27 
   28 # ----------------------------------------------------------------------
   29 # Set up for make in separate build directory
   30 
   31 VPATH	= archive build
   32 
   33 # ----------------------------------------------------------------------
   34 # This is what we want to make:
   35 all:	setup manpage changelog package binaries
   36 
   37 # ----------------------------------------------------------------------
   38 setup:	build archive $(tool)-v0.00
   39 
   40 build:
   41 	[ -d build ] || mkdir build
   42 
   43 archive:
   44 	[ -d archive ] || mkdir archive; 
   45 
   46 $(tool)-v0.00:
   47 	touch archive/$@
   48 
   49 # ----------------------------------------------------------------------
   50 manpage: $(tool).1.gz
   51 
   52 %.1:	%.1.txt
   53 	txt2man $< > $@
   54 
   55 %.1:	%
   56 	./$(tool) --help | txt2man -t "$(tool) 1" > $@
   57 
   58 %.gz:	%
   59 	gzip -f $< -c > $@
   60 
   61 
   62 # ----------------------------------------------------------------------
   63 diff:	build/$(tool)-$(version).diff.html
   64 
   65 build/$(tool)-$(thisver).diff.html: $(tool)-v$(prevver) $(tool)
   66 	rfcdiff --width 82 $^ $@
   67 
   68 # ----------------------------------------------------------------------
   69 binaries: $(binaries)
   70 
   71 # ----------------------------------------------------------------------
   72 test::
   73 	# Test suite
   74 
   75 # ----------------------------------------------------------------------
   76 package: test archive archive/$(tool)-$(version).tgz archive/$(tool)-v$(version)
   77 
   78 archive/$(tool)-$(version).tgz: $(sources) control
   79 	mkdir -p $(tool)-$(version)
   80 	cp -p $^ $(tool)-$(version)/
   81 	tar czf $@ $(tool)-$(version)
   82 	rm -rf $(tool)-$(version)
   83 
   84 archive/$(tool)-v$(version): $(tool)
   85 	cp $< $@
   86 
   87 control: control.in $(tool) changelog
   88 	 sed -r -e 's/^Version:.*/Version: $(version)/' -e "s/^Date:.*/Date: $$(date +'%Y-%m-%d %H:%M:%S')/" $< > $@
   89 
   90 packagetest: archive/$(tool)-$(version).tgz
   91 	cd archive && tar xzf archive/$(tool)-$(version).tgz
   92 	cd archive/$(tool)-$(version)/ && make
   93 
   94 # ----------------------------------------------------------------------
   95 webpages:	$(webpages:%=build/%)
   96 
   97 build/%.shtml:	./%.shtml.frag control template.shtml.pyht
   98 	pyht template.shtml.pyht view=$< > $@
   99 
  100 build/%.shtml:	%.shtml.frag control template.shtml.pyht
  101 	pyht template.shtml.pyht view=$< > $@
  102 
  103 build/%.shtml:	build/%.html control template.shtml.pyht
  104 	pyht template.shtml.pyht view=$< > $@
  105 
  106 build/%.shtml:	../%.shtml
  107 	cp -p $< $@
  108 
  109 build/%.html: %
  110 	rst2html $< > $@
  111 
  112 build/code.html: $(tool)
  113 	highlight --style-infile ../highlight.css --syntax $(language) --include-style --quiet $< > $@
  114 
  115 build/about.html: $(tool).1.gz
  116 	man -l $< | head -n -1 | tail -n +2 | rst2html > $@
  117 
  118 build/index.html: $(tool).1.gz
  119 	man2html -r $< | sed -n -r -e '/<H1>/,/^<HR>/p' > $@
  120 
  121 build/changelog.html: changelog
  122 	cat $< | sed -r -e 's!$(tool) *\(([0-9.-]+)\)!`\1 </tools/$(tool)/$(tool)-v\1>`_ (`diff-\1 </tools/$(tool)/$(tool)-\1.diff.html>`_)!' -e 's/^ --(.*)$$/    (\1)/' > $@.tmp
  123 	rst2html $@.tmp > $@
  124 
  125 # ----------------------------------------------------------------------
  126 build/%.pyht:	%.py.frag control template.shtml.pyht
  127 	pyht template.shtml.pyht view=$< | sed -r -e 's/<!-- *#include +virtual=/<?python\n\t  virtualinc(/' -e 's/" +-->/")\n\t?>/' > $@
  128 
  129 
  130 
  131 # ----------------------------------------------------------------------
  132 commit: diff 
  133 	@if [ ! "$(logentry)" ]; then echo "Missing changelog entry!"; exit 1; fi
  134 	sed -r -i -e "1,/^ -- /s/([A-Za-z-]+ <[a-z0-9.-]+@[a-z0-9.-]+>  ).*$$/\1$$(date +'%d %b %Y %H:%M:%S %z')/" changelog
  135 	sv commit -m"$(logentry)"
  136 	[ -d .svn ] && svn commit -m"$(logentry)" || true
  137 
  138 # ----------------------------------------------------------------------
  139 distinfo: $(tool)-$(version).tgz diff 
  140 	[ -f $@ ] || touch $@
  141 	if grep "$<" $@; then echo "Version $(version) has already been uploaded"; exit 1; fi
  142 	md5sum		$< | awk '{ printf "MD5 (%s) = %s\n", $$2, $$1; }'	>> $@
  143 	sha256sum	$< | awk '{ printf "SHA256 (%s) = %s\n", $$2, $$1; }'	>> $@
  144 	wc -c		$< | awk '{ printf "SIZE (%s) = %s\n", $$2, $$1; }'	>> $@
  145 
  146 release:: $(tool) $(tool)-v$(version) $(tool)-$(version).tgz $(tool)-$(version).diff.html $(scripts) control distinfo
  147 	echo "Made release $(version)"
  148 
  149 upload:: $(tool) $(tool)-v$(version) $(webpages) $(tool)-$(version).tgz $(tool)-$(version).diff.html $(scripts) control distinfo
  150 	rsync -avuz --exclude /tmp/ $^ /www/tools.ietf.org/tools/$(tool)/
  151 	toolpush /www/tools.ietf.org/tools/$(tool)/
  152 	toolsfeed control changelog /www/tools.ietf.org/tools/atomfeed.xml
  153 	toolpush /www/tools.ietf.org/tools/atomfeed.xml
  154 
  155 install:: $(tool) $(tool).1.gz
  156 	install $(tool) $(prefix)/bin
  157 	install -m 644 $(tool).1.gz /usr/share/man/man1/
  158