X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=Makefile;h=74579e1cd58d5f4102a0c912274147f3fac10d76;hb=be0c3329afef13f1b9e888e48790bc65bee7439e;hp=ebe88bb3f2eac7c7d8a4ac128ccbd931fd50358d;hpb=881763b16a50b342676f3d59c2d883e2c39548ff;p=zpackage diff --git a/Makefile b/Makefile index ebe88bb..74579e1 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,8 @@ ZPKGBIN=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \ SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-preserve zpm-test zpm-log \ zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \ - zpm-pkg zpm-add zpm-pkgfile zpm-gc zpm-repo zpm-update + zpm-pkg zpm-add zpm-pkgfile zpm-gc zpm-repo zpm-update zpm-confgit +MANPAGES=$(addprefix doc/, zpm.8 zpm-list.8 zpm-contents.8 zpm-hash.8 zpm-quote.8) COMPILED=$(ZPKGBIN) PROGRAMS=$(SCRIPTS) $(COMPILED) @@ -72,11 +73,11 @@ lib/libjsw.a: $(JSWOBJ) ZPM:= ./zpm -P. -zpm-$(ZPMVER)-1.zpm: programs doc/zpm.8 +zpm-$(ZPMVER)-1.zpm: programs $(MANPAGES) rm -f $@ $(ZPM) newpackage -C zpm-$(ZPMVER)-1 $(ZPM) add -v -u root -g root -f $@ -P /sbin zpm-$(ZPMVER)-1 $(sort $(PROGRAMS)) - $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc doc/zpm.8 + $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc $(MANPAGES) tarball: zpm-$(ZPMVER)-1.tar.xz @@ -159,6 +160,11 @@ zpm-parse: zpm-parse.o lib/parse.o zpm-quote: zpm-quote.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< +db.sql: schema/main.sql schema/syncconflicts.sql schema/syncinfo.sql + echo 'begin;' > $@ + cat $+ >> $@ + echo 'commit;' >> $@ + newdb.c: db.sql echo "char createdb[] = {" > $@ xxd -i < $< >> $@ @@ -187,11 +193,11 @@ zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o libelf.a: elf/libelf.o ar rcuv $@ $? -install: $(COMPILED) doc/zpm.8 +install: $(COMPILED) $(MANPAGES) test -d $(DESTDIR)/sbin || install -d $(DESTDIR)/sbin install $(PROGRAMS) $(DESTDIR)/sbin mkdir -p $(DESTDIR)/usr/share/man/man8 - install -m644 doc/zpm.8 $(DESTDIR)/usr/share/man/man8 + install -m644 $(MANPAGES) $(DESTDIR)/usr/share/man/man8 scan-prep: clean sqlite/sqlite3.o sqlite/shell.o lib/liblzma.a @echo scan-build -v -o report make -j10 @@ -200,4 +206,5 @@ clean: rm -f *.o sqlite/*.o lib/*.o $(LZMAOBJ) liblzma.a \ libelf.a libzpm.a zpm-addfile soname \ *.xz \ - local.db t/ctap/prove.o $(ZPKGBIN) + local.db t/ctap/prove.o $(ZPKGBIN) \ + db.sql