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