Annotation of db/prgsrc/Makefile, revision 1.24
1.6 boris 1: ifndef ROOT
2: ROOT = /home/znatoki
3: endif
1.1 boris 4: PERL = perl
5: TMPSAV = /tmp
6: PMODE = 775
7: LMODE = 664
1.7 boris 8: KULICHKI=znatoki.kulichki.net
1.4 boris 9: RSYNC = rsync -ruvpte ssh --delete --progress --rsync-path='~/bin/rsync'
1.16 boris 10: SCP=scp
1.5 boris 11: DESTSRCDIR=~piataev/public_html/dimrub/src/
1.23 roma7 12: SRCDIR=../baza
1.5 boris 13: DESTPRGSRC=~piataev/db/prgsrc
1.1 boris 14: DUMPDIR=../dump
1.17 boris 15: DESTDUMPDIR=/var/tmp/
1.16 boris 16: TABLES= Questions Tournaments word2question nf nests
1.1 boris 17:
18: DBSCRIPTS = mkdb.pl \
19: updatem.pl \
20: updatedb.pl \
21: changecities.pl\
22: createindex.pl\
23: updateindex.pl \
1.8 boris 24: addlinks.pl \
1.9 boris 25: deletefiles.pl\
1.10 boris 26: renamefile.pl \
1.11 boris 27: makecheck.pl\
28: mkRS.pl\
1.14 boris 29: delRS.pl\
1.11 boris 30: updateRS.pl\
31: updateRS1.pl\
1.15 boris 32: updateRS2.pl\
33: updateRS3.pl\
1.11 boris 34: dumpRS.pl\
35: dumpin2out.pl\
36: dump2dump.pl\
37: checkPBS.pl\
38: loaddump.pl
39:
40: LIBS = chgkfiles.pm \
1.10 boris 41: common.pl\
42: chgk.cnf\
1.11 boris 43: dbchgk.pm\
44: check.pl
1.10 boris 45:
1.1 boris 46:
47: CGISCRIPTS = db.cgi
48:
1.12 boris 49:
50: HTMLS = contribute.html \
51: copyright.html \
52: copyright_mozg.html \
53: credits.html \
54: dbmain.html \
55: footer.html \
56: guestbook.html \
57: index.html \
58: random.html \
59: reklama.html \
60: search.html
61:
62:
1.19 roma7 63: TEXTS = $(SRCDIR)/*.txt
1.12 boris 64:
1.13 boris 65:
1.1 boris 66: DBBIN = ../bin
67: MANDIR = ../man
1.10 boris 68: LIBDIR = ../lib
1.6 boris 69: CGIBIN = $(ROOT)/public_html/cgi-bin
1.13 boris 70: HTMLDIR = $(ROOT)/public_html/dimrub/db
1.1 boris 71:
1.10 boris 72: BININSTALL = ${DBSCRIPTS:%=$(DBBIN)/%}
1.1 boris 73: CGIINSTALL = ${CGISCRIPTS:%.cgi=$(CGIBIN)/%.cgi}
1.10 boris 74: LIBINSTALL = ${LIBS:%=$(LIBDIR)/%}
1.13 boris 75: HTMLINSTALL = ${HTMLS:%.html=$(HTMLDIR)/%.html}
1.10 boris 76:
1.13 boris 77: all: $(LIBINSTALL) $(BININSTALL) $(CGIINSTALL) $(HTMLINSTALL)
1.1 boris 78:
79:
1.11 boris 80: $(DBBIN)/%.pl: %.pl
1.1 boris 81: ${PERL} -c $<
82: - pod2man --center "Internet Club DB" $< > $*.1
83: - install -m $(LMODE) $*.1 $(MANDIR)/man1
1.10 boris 84: - rm $*.1
1.1 boris 85: if [ -f $@ ]; then mv $@ $(TMPSAV); fi
86: cp $< $@
87: chmod $(PMODE) $@
88: if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
1.21 roma7 89:
1.1 boris 90: $(CGIBIN)/%.cgi: %.cgi
91: ${PERL} -c $<
92: - pod2man --center "Internet Club DB" $< > $*.1
93: - install -m $(LMODE) $*.1 $(MANDIR)/man1
1.10 boris 94: - rm $*.1
1.1 boris 95: if [ -f $@ ]; then mv $@ $(TMPSAV); fi
96: cp $< $@
97: chmod $(PMODE) $@
98: if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
99:
100:
1.10 boris 101:
102: $(LIBDIR)/%.pm: %.pm
103: ${PERL} -c $<
104: - pod2man --center "Internet Club DB" $< > $*.3
105: - install -m $(LMODE) $*.3 $(MANDIR)/man3
106: - rm $*.3
1.11 boris 107: if [ -f $@ ]; then mv $@ $(TMPSAV); fi
108: cp $< $@
109: chmod $(LMODE) $@
110: if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
111:
112:
113: $(LIBDIR)/%.pl: %.pl
114: ${PERL} -c $<
115: - pod2man --center "Internet Club DB" $< > $*.3
116: - install -m $(LMODE) $*.3 $(MANDIR)/man3
117: - rm $*.3
118: if [ -f $@ ]; then mv $@ $(TMPSAV); fi
119: cp $< $@
120: chmod $(LMODE) $@
121: if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
122:
123:
124: $(LIBDIR)/%.cnf: %.cnf
125: ${PERL} -c $<
126: - pod2man --center "Internet Club DB" $< > $*.5
127: - install -m $(LMODE) $*.5 $(MANDIR)/man5
128: - rm $*.5
1.10 boris 129: if [ -f $@ ]; then mv $@ $(TMPSAV); fi
130: cp $< $@
131: chmod $(LMODE) $@
132: if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
133:
134:
1.12 boris 135: $(HTMLDIR)/%.html: %.html
136: cp $< $@
137:
1.10 boris 138:
1.19 roma7 139: $(UNSORTED): TEXTS
1.10 boris 140:
1.19 roma7 141: $(SRCDIR)/%.txt:
142: updatedb $<
1.1 boris 143:
144: srcdeliver:
145: $(RSYNC) $(SRCDIR) $(KULICHKI):$(DESTSRCDIR)
146:
147:
148: prgdeliver:
149: $(RSYNC) ./ $(KULICHKI):$(DESTPRGSRC)
150:
151: dbdeliver:
1.16 boris 152: mysqldump --add-drop-table -u piataev chgk $(TABLES) > $(DUMPDIR)/chgkdump.0
153: sed 's/TYPE=ISAM PACK_KEYS=1//g' $(DUMPDIR)/chgkdump.0 > $(DUMPDIR)/chgkdump
154: gzip $(DUMPDIR)/chgkdump
1.18 boris 155: rm $(DUMPDIR)/chgkdump.0
1.16 boris 156: $(SCP) $(DUMPDIR)/chgkdump.gz $(KULICHKI):$(DESTDUMPDIR)
1.12 boris 157:
1.19 roma7 158: updatecvs:
1.24 ! roma7 159:
! 160:
! 161: update:
1.21 roma7 162: cvs update $(SRCDIR)
1.24 ! roma7 163: mysql -upiatev <delq
! 164: ${PERL} createdb.pl
! 165: ${PERL} updateindex.pl -i$(SRCDIR)index
! 166: ${PERL} updatedb.pl $(SRCDIR)*.txt
! 167:
1.19 roma7 168:
169:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>