File: Makefile.in

package info (click to toggle)
libcwd 1.0.4-1.1
  • links: PTS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 8,136 kB
  • ctags: 10,313
  • sloc: cpp: 23,354; sh: 9,798; ansic: 1,172; makefile: 852; exp: 234; awk: 11
file content (102 lines) | stat: -rw-r--r-- 4,220 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
CXX=@CXX@
SHELL=@SHELL@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
top_builddir=../..

.SUFFIXES:
.PHONY: examples html

SOURCES5:=$(shell grep 'START CODE' $(srcdir)/tut5.in | cut -d \  -f4)
SOURCES7:=$(shell grep 'START CODE' $(srcdir)/tut7.in | cut -d \  -f4)
AOUT5:=$(shell grep 'START OUTPUT' $(srcdir)/tut5.in | cut -d \  -f4)
AOUT7:=$(shell grep 'START OUTPUT' $(srcdir)/tut7.in | cut -d \  -f4)

all: examples html

Makefile: $(top_builddir)/config.status $(top_srcdir)/documentation/tutorial/Makefile.in
	@rm -f Makefile.in
	cd $(top_builddir) && CONFIG_FILES=documentation/tutorial/Makefile CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status

examples: $(SOURCES5) $(SOURCES7)
html: index.html faq.html intro.html tut1.html tut2.html tut3.html tut4.html tut5.html tut6.html tut7.html tut8.html

index.html: $(srcdir)/index.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

faq.html: $(srcdir)/faq.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

intro.html: $(srcdir)/intro.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut1.html: $(srcdir)/tut1.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut2.html: $(srcdir)/tut2.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut3.html: $(srcdir)/tut3.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut4.html: $(srcdir)/tut4.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut5.html: tut5.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut6.html: $(srcdir)/tut6.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut7.html: tut7.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut8.html: $(srcdir)/tut8.m4 $(srcdir)/../definitions.m4
	pwd="`pwd`"; (cd $(srcdir); m4 -D__TUTORIAL=1 -I.. $$pwd/$<) > $@

tut5.m4: $(srcdir)/tut5.in $(AOUT5)
	awk -f $(srcdir)/moo.awk $< > $@
	@rm -f core.*

tut7.m4: $(srcdir)/tut7.in $(AOUT7)
	awk -f $(srcdir)/moo.awk $< > $@
	@rm -f core.*

$(SOURCES5): $(srcdir)/tut5.in
	$(MAKE) -s $@-cc

$(SOURCES7): $(srcdir)/tut7.in
	$(MAKE) -s $@-cc

%-cc:
	@mkdir -p examples5 examples7
	@IN=`echo $(srcdir)/$* | sed -e 's%examples\([57]\).*%tut\1.in%'`; \
	if grep "END CODE $*" $$IN >/dev/null; then \
	  grep -A1000 "START CODE $*" $$IN |\
	  grep -B1000 "END CODE $*" |\
	  egrep -v "(START|END) CODE $*" |\
	  sed -e 's/&lt;/</g' -e 's/&gt;/>/g' -e 's/&amp;/\&/g' -e 's/&quot;/"/g' -e 's/&sect;//g' \
	      -e 's/<SPAN.[^>]*>//g' -e 's/<\/SPAN>//g' > $*.tmp; \
	  if (test ! -f $* || ! cmp -s $* $*.tmp); then \
	    echo "Extracting $* from $$IN."; \
	    mv $*.tmp $*; \
	  else \
	    echo "$* wasn't changed."; \
	    rm $*.tmp; \
	  fi; \
	else \
	  echo "No line with \"END CODE $*\" in $$IN!"; \
	  exit 1; \
	fi

$(AOUT5): examples5/%-bin: examples5/%.cc examples5/debug.o examples5/debug.h $(srcdir)/examples5/sys.h $(srcdir)/examples5/sysinclude/libbooster/debug.h $(srcdir)/examples5/sysinclude/libturbo/debug.h ../../.libs/libcwd.so
	$(CXX) -g -pipe -DCWDEBUG -I$(srcdir)/examples5 -Iexamples5 -I$(srcdir)/examples5/sysinclude -I$(srcdir)/../../include -I../../include \
		$< examples5/debug.o -L../../.libs -Wl,-rpath,$(shell (cd ../../.libs; pwd)) -lcwd -o $@

examples5/debug.o: examples5/debug.cc examples5/debug.h $(srcdir)/examples5/sys.h $(srcdir)/examples5/sysinclude/libbooster/debug.h $(srcdir)/examples5/sysinclude/libturbo/debug.h ../../include/libcwd/sys.h
	$(CXX) -g -pipe -DCWDEBUG -I$(srcdir)/examples5 -Iexamples5 -I$(srcdir)/examples5/sysinclude -I$(srcdir)/../../include -I../../include -c $< -o $@

$(AOUT7): examples7/%-bin: examples7/%.cc $(srcdir)/examples7/sys.h $(srcdir)/examples7/debug.h ../../.libs/libcwd.so
	$(CXX) -g -pipe -DCWDEBUG -I$(srcdir)/examples7 -Iexamples7 -I$(srcdir)/../../include -I../../include \
		$< -L../../.libs -Wl,-rpath,$(shell (cd ../../.libs; pwd)) -lcwd -o $@