From 0419c62f964b259df1c1816f5870ef62eb97ed7c Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sat, 6 Jul 2019 17:42:07 +0000 Subject: [PATCH] move programs to bin for build There are a largish number of zpm command programs, putting them in bin makes the build directory cleaner. --- Makefile | 63 ++++++++++++++-------------- zpm => bin/zpm | 0 zpm-bug => bin/zpm-bug | 0 zpm-confgit => bin/zpm-confgit | 0 zpm-contents => bin/zpm-contents | 0 zpm-fileinfo => bin/zpm-fileinfo | 0 zpm-gc => bin/zpm-gc | 0 zpm-install => bin/zpm-install | 0 zpm-installed => bin/zpm-installed | 0 zpm-ipkgfile => bin/zpm-ipkgfile | 0 zpm-list => bin/zpm-list | 0 zpm-log => bin/zpm-log | 0 zpm-merge => bin/zpm-merge | 0 zpm-newpackage => bin/zpm-newpackage | 0 zpm-pathmod => bin/zpm-pathmod | 0 zpm-pkg => bin/zpm-pkg | 0 zpm-pkgdeps => bin/zpm-pkgdeps | 0 zpm-pkgfile => bin/zpm-pkgfile | 0 zpm-pkginfo => bin/zpm-pkginfo | 0 zpm-repo => bin/zpm-repo | 0 zpm-rmpackage => bin/zpm-rmpackage | 0 zpm-showpkg => bin/zpm-showpkg | 0 zpm-test => bin/zpm-test | 0 zpm-uninstall => bin/zpm-uninstall | 0 zpm-update => bin/zpm-update | 0 25 files changed, 32 insertions(+), 31 deletions(-) rename zpm => bin/zpm (100%) rename zpm-bug => bin/zpm-bug (100%) rename zpm-confgit => bin/zpm-confgit (100%) rename zpm-contents => bin/zpm-contents (100%) rename zpm-fileinfo => bin/zpm-fileinfo (100%) rename zpm-gc => bin/zpm-gc (100%) rename zpm-install => bin/zpm-install (100%) rename zpm-installed => bin/zpm-installed (100%) rename zpm-ipkgfile => bin/zpm-ipkgfile (100%) rename zpm-list => bin/zpm-list (100%) rename zpm-log => bin/zpm-log (100%) rename zpm-merge => bin/zpm-merge (100%) rename zpm-newpackage => bin/zpm-newpackage (100%) rename zpm-pathmod => bin/zpm-pathmod (100%) rename zpm-pkg => bin/zpm-pkg (100%) rename zpm-pkgdeps => bin/zpm-pkgdeps (100%) rename zpm-pkgfile => bin/zpm-pkgfile (100%) rename zpm-pkginfo => bin/zpm-pkginfo (100%) rename zpm-repo => bin/zpm-repo (100%) rename zpm-rmpackage => bin/zpm-rmpackage (100%) rename zpm-showpkg => bin/zpm-showpkg (100%) rename zpm-test => bin/zpm-test (100%) rename zpm-uninstall => bin/zpm-uninstall (100%) rename zpm-update => bin/zpm-update (100%) diff --git a/Makefile b/Makefile index cd2ce62..b06d168 100644 --- a/Makefile +++ b/Makefile @@ -31,12 +31,14 @@ LIBZPMOBJ=$(addprefix lib/, $(LIBZPMSRC:%.c=%.o)) curdir=$(shell pwd) -ZPKGBIN=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \ +COMPILED=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \ zpm-findpkg zpm-shell zpm-soneed zpm-foreach-path zpm-parse \ zpm-script zpm-soname zpm-syncfs zpm-packagehash zpm-verify \ zpm-elftype zpm-quote zpm-note zpm-search zpm-add zpm-fetchurl \ zpm-sign +BINARIES=$(addprefix bin/, $(COMPILED)) + SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-test zpm-log \ zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \ zpm-pkg zpm-pkgfile zpm-gc zpm-repo zpm-update zpm-confgit \ @@ -44,11 +46,10 @@ SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-test zpm-log \ MANPAGES=$(shell ls doc/*.8) #MANPAGES=doc/zpm.8 $(addprefix doc/zpm-, list.8 contents.8 hash.8 quote.8 pathmod.8 note.8 vercmp.8 repo.8 gc.8) -COMPILED=$(ZPKGBIN) -PROGRAMS=$(SCRIPTS) $(COMPILED) +PROGRAMS=$(addprefix bin/, $(SCRIPTS)) $(BINARIES) def: programs - strip $(ZPKGBIN) + strip $(BINARIES) d: printf '%s\n' $(LZMAOBJ) @@ -102,84 +103,84 @@ lzma.o: lzma.c gcc -std=c99 -Wall -c -o $@ $< stest: $(ZPKGBIN) - PATH=$(curdir)/t:$(curdir):$(PATH) t/$(T).t + PATH=$(curdir)/t:$(curdir)/bin:$(PATH) t/$(T).t t/ctap/prove: t/ctap/prove.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ test: $(ZPKGBIN) t/ctap/prove - @PATH=$(curdir)/t:$(curdir):$(PATH) t/ctap/prove t/*.t + @PATH=$(curdir)/t:$(curdir)/bin:$(PATH) t/ctap/prove t/*.t -programs: $(ZPKGBIN) +programs: $(PROGRAMS) uncompress: uncompress.o $(CC) $(CFLAGS) -o $@ $+ -llzma -zpm-elftype: elf/elftype.o +bin/zpm-elftype: elf/elftype.o $(CC) $(CFLAGS) -Ielf $(LDFLAGS) -o $@ $+ -zpm-soname: elf/soname.o +bin/zpm-soname: elf/soname.o $(CC) $(CFLAGS) -Ielf $(LDFLAGS) -o $@ $+ -zpm-soneed: elf/needed.o +bin/zpm-soneed: elf/needed.o $(CC) $(CFLAGS) -Ielf $(LDFLAGS) -o $@ $+ -zpm-addfile: src/addfile.o libzpm.a libelf.a +bin/zpm-addfile: src/addfile.o libzpm.a libelf.a $(CC) -Ielf $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf lib/sha256.o: CFLAGS+=-O3 lib/blake2/ref/blake2b-ref.o: CFLAGS+=-O3 zpm-hash: libzpm.a -zpm-hash: src/hash.o lib/sha256.o +bin/zpm-hash: src/hash.o lib/sha256.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -zpm-blake2: src/blake2.o lib/sha256.o lib/blake2/ref/blake2b-ref.o +bin/zpm-blake2: src/blake2.o lib/sha256.o lib/blake2/ref/blake2b-ref.o $(CC) -O3 $(CFLAGS) $(LDFLAGS) -o $@ $+ -zpm-verify: src/verify.o t/ctap/ctap.o libzpm.a +bin/zpm-verify: src/verify.o t/ctap/ctap.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< t/ctap/ctap.o -lzpm -lelf -zpm-init: src/init.o libzpm.a +bin/zpm-init: src/init.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-stat: src/stat.o +bin/zpm-stat: src/stat.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -zpm-extract: src/extract.o libzpm.a +bin/zpm-extract: src/extract.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-script: src/script.o libzpm.a +bin/zpm-script: src/script.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-packagehash: src/packagehash.o libzpm.a +bin/zpm-packagehash: src/packagehash.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf src/foreach-path.o: CFLAGS+=-Wno-unused-parameter src/script.o: CFLAGS+=-Wno-unused-parameter -zpm-foreach-path: src/foreach-path.o libzpm.a sqlite/sqlite3.h +bin/zpm-foreach-path: src/foreach-path.o libzpm.a sqlite/sqlite3.h $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-findpkg: src/findpkg.o libzpm.a +bin/zpm-findpkg: src/findpkg.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-search: src/search.o libzpm.a +bin/zpm-search: src/search.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-note: src/note.o libzpm.a +bin/zpm-note: src/note.o libzpm.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-syncfs: src/syncfs.o libzpm.a libelf.a +bin/zpm-syncfs: src/syncfs.o libzpm.a libelf.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -lm -zpm-parse: src/parse.o lib/parse.o +bin/zpm-parse: src/parse.o lib/parse.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -zpm-add: src/add.o libzpm.a libelf.a +bin/zpm-add: src/add.o libzpm.a libelf.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lzpm -lelf -zpm-quote: src/quote.o +bin/zpm-quote: src/quote.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< db.sql: schema/main.sql schema/syncconflicts.sql schema/syncinfo.sql schema/preserve_packages.sql schema/age.sql schema/sign.sql @@ -206,10 +207,10 @@ sqlite/shell.o: sqlite/shell.c sqlite/config.h Makefile lib/zpm.o: newdb.c -zpm-vercmp: src/vercmp.o lib/vercmp.o lib/parse.o +bin/zpm-vercmp: src/vercmp.o lib/vercmp.o lib/parse.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o lib/parse.o +bin/zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o lib/parse.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ libelf.a: elf/libelf.o @@ -782,7 +783,7 @@ rfc3986: rfc3986.c src/fetchurl.o: CFLAGS+=-DTFM_DESC -Isrc/headers -Itomsfastmath/src/headers -DARGTYPE=4 -DLTC_NO_ASM -DTFM_NO_ASM -Ilibtomcrypt/src/headers -DLTC_SOURCE -Icrypto -Wno-pointer-sign -zpm-fetchurl: ltc.o tls.o tfm.o src/fetchurl.o crypto/https.o crypto/rfc3986.o +bin/zpm-fetchurl: ltc.o tls.o tfm.o src/fetchurl.o crypto/https.o crypto/rfc3986.o $(CC) $(CFLAGS) -static -o $@ $+ testddg: zpm-fetchurl @@ -810,7 +811,7 @@ $(SIGNOBJ): CFLAGS=-Wall -Wextra -W -Werror -Wno-pointer-sign \ -Icrypto/libeddsa/lib -Wno-unused-command-line-argument \ -I. -zpm-sign: $(SIGNOBJ) +bin/zpm-sign: $(SIGNOBJ) $(CC) -Wall -Wextra -W -Werror -Wno-unused-command-line-argument -static -o $@ $+ clean: diff --git a/zpm b/bin/zpm similarity index 100% rename from zpm rename to bin/zpm diff --git a/zpm-bug b/bin/zpm-bug similarity index 100% rename from zpm-bug rename to bin/zpm-bug diff --git a/zpm-confgit b/bin/zpm-confgit similarity index 100% rename from zpm-confgit rename to bin/zpm-confgit diff --git a/zpm-contents b/bin/zpm-contents similarity index 100% rename from zpm-contents rename to bin/zpm-contents diff --git a/zpm-fileinfo b/bin/zpm-fileinfo similarity index 100% rename from zpm-fileinfo rename to bin/zpm-fileinfo diff --git a/zpm-gc b/bin/zpm-gc similarity index 100% rename from zpm-gc rename to bin/zpm-gc diff --git a/zpm-install b/bin/zpm-install similarity index 100% rename from zpm-install rename to bin/zpm-install diff --git a/zpm-installed b/bin/zpm-installed similarity index 100% rename from zpm-installed rename to bin/zpm-installed diff --git a/zpm-ipkgfile b/bin/zpm-ipkgfile similarity index 100% rename from zpm-ipkgfile rename to bin/zpm-ipkgfile diff --git a/zpm-list b/bin/zpm-list similarity index 100% rename from zpm-list rename to bin/zpm-list diff --git a/zpm-log b/bin/zpm-log similarity index 100% rename from zpm-log rename to bin/zpm-log diff --git a/zpm-merge b/bin/zpm-merge similarity index 100% rename from zpm-merge rename to bin/zpm-merge diff --git a/zpm-newpackage b/bin/zpm-newpackage similarity index 100% rename from zpm-newpackage rename to bin/zpm-newpackage diff --git a/zpm-pathmod b/bin/zpm-pathmod similarity index 100% rename from zpm-pathmod rename to bin/zpm-pathmod diff --git a/zpm-pkg b/bin/zpm-pkg similarity index 100% rename from zpm-pkg rename to bin/zpm-pkg diff --git a/zpm-pkgdeps b/bin/zpm-pkgdeps similarity index 100% rename from zpm-pkgdeps rename to bin/zpm-pkgdeps diff --git a/zpm-pkgfile b/bin/zpm-pkgfile similarity index 100% rename from zpm-pkgfile rename to bin/zpm-pkgfile diff --git a/zpm-pkginfo b/bin/zpm-pkginfo similarity index 100% rename from zpm-pkginfo rename to bin/zpm-pkginfo diff --git a/zpm-repo b/bin/zpm-repo similarity index 100% rename from zpm-repo rename to bin/zpm-repo diff --git a/zpm-rmpackage b/bin/zpm-rmpackage similarity index 100% rename from zpm-rmpackage rename to bin/zpm-rmpackage diff --git a/zpm-showpkg b/bin/zpm-showpkg similarity index 100% rename from zpm-showpkg rename to bin/zpm-showpkg diff --git a/zpm-test b/bin/zpm-test similarity index 100% rename from zpm-test rename to bin/zpm-test diff --git a/zpm-uninstall b/bin/zpm-uninstall similarity index 100% rename from zpm-uninstall rename to bin/zpm-uninstall diff --git a/zpm-update b/bin/zpm-update similarity index 100% rename from zpm-update rename to bin/zpm-update -- 2.40.0