Unify depot output rules

This commit is contained in:
Ehmry - 2019-02-27 22:33:14 +01:00
parent c89dbd9eb1
commit 1d8fc47d6c
5 changed files with 19 additions and 14 deletions

View File

@ -16,15 +16,21 @@ PUBLIC_DIR = $(TUP_CWD)/public/@(DEPOT_USER)
DEPOT_BIN_DIR = $(DEPOT_DIR)/bin/x86_64
PUBLIC_BIN_DIR = $(PUBLIC_DIR)/bin/x86_64
DEPOT_PKG_DIR = $(DEPOT_DIR)/pkg
PUBLIC_PKG_DIR = $(PUBLIC_DIR)/pkg
!strip_to_depot = |> ^ strip bin/%d^ strip -o %o %f |> $(DEPOT_BIN_DIR)/%d/@(DEPOT_VERSION)/%b $(DEPOT_DIR)/<binaries>
ERRATA_DIR = $(TUP_CWD)/errata
!validate_runtime = |> ^ Validate runtime^ xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o |>
!archives_to_depot = |> ^ varse %d archives^ tup varsed %f %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/archives
!runtime_to_depot = |> ^ validate %d runtime^ xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/<runtimes>
ifdef DEPOT_KEY
!depot_bin_tarball = |> ^ archive %d binary^ tar cfJ %o -C $(DEPOT_BIN_DIR)/%d . |> $(PUBLIC_BIN_DIR)/%d/@(DEPOT_VERSION).tar.xz
!depot_bin_tarball = |> ^o archive %d binary^ tar cfJ %o -C $(DEPOT_BIN_DIR)/%d . |> $(PUBLIC_BIN_DIR)/%d/@(DEPOT_VERSION).tar.xz
!depot_pkg_tarball = |> ^ archive %d package^ tar cfJ %o -C $(DEPOT_DIR)/pkg/%d . |> $(PUBLIC_DIR)/pkg/%d/@(DEPOT_VERSION).tar.xz
!depot_pkg_tarball = |> ^o archive %d package^ tar cfJ %o -C $(DEPOT_DIR)/pkg/%d . |> $(PUBLIC_DIR)/pkg/%d/@(DEPOT_VERSION).tar.xz
!public_signature = |> ^ sign %b^ gpg --detach-sign --digest-algo SHA256 --no-tty --local-user @(DEPOT_KEY) - < %f > %o |> %f.sig

View File

@ -11,15 +11,16 @@ CFLAGS += -D__LIBRETRO__
!libretro_cc = |> ^ CC %f^ $(CC) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) -c %f -o %o |> %f.o
!libretro_cxx = |> ^ CXX %f^ $(CXX) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) $(CXXFLAGS) $(INCFLAGS) -c %f -o %o |> %f.o
!libretro_core_link = |> ^ Link %d^ $(LD) -shared --version-script=$(TUP_CWD)/link.T %f -o %o `pkg-config --libs $(CORE_PKGS)` $(LDFLAGS) |> $(DEPOT_BIN_DIR)/%d/@(DEPOT_VERSION)/libretro.so
!libretro_core_link = |> ^o LD %d^ $(LD) -shared --version-script=$(TUP_CWD)/link.T %f -o %o `pkg-config --libs $(CORE_PKGS)` $(LDFLAGS) |> libretro.so
: foreach $(SOURCES_C) |> !libretro_cc |> {libretro_objs}
: foreach $(SOURCES_CXX) |> !libretro_cxx |> {libretro_objs}
: {libretro_objs} |> !libretro_core_link |> {binary}
: {binary} |> !strip_to_depot |> {depot_bin}
: archives | {binary} |> ^ varse %d %b^ tup varsed %f %o |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/%b {package}
: runtime |> !validate_runtime |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/%b {package}
: archives | {depot_bin} |> !archives_to_depot |> {package}
: runtime |> !runtime_to_depot |> {package}
ifdef DEPOT_KEY
: {binary} |> !depot_bin_tarball |> {tarballs}

View File

@ -1,12 +1,10 @@
# Drop the relase flag with the line "NIM_RELEASE_FLAG="
NIM_RELEASE_FLAG = -d:release
!nim_build = |> nimble cpp $(NIM_RELEASE_FLAG) --os:genode -d:posix -o:%B %f |> %B %B.json
!nim_to_depot = |> cp %f %o |> $(DEPOT_BIN_DIR)/%d/@(DEPOT_VERSION)/%b
!nim_build = |> ^o Nimble %B^ nimble cpp $(NIM_RELEASE_FLAG) --os:genode -d:posix -o:%B %f |> %B | %B.json
: foreach src/*.nim |> !nim_build |> {output}
: foreach {output} |> !nim_to_depot |> {binary}
: foreach {output} |> !strip_to_depot |> {binary}
ifdef DEPOT_KEY
: {binary} |> !depot_bin_tarball |> {tarballs}

View File

@ -1,7 +1,7 @@
include_rules
: archives |> tup varsed %f %o |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/%b {package}
: runtime |> !validate_runtime |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/%b {package}
: archives |> !archives_to_depot |> {package}
: runtime |> !runtime_to_depot |> {package}
ifdef DEPOT_KEY
: {package} |> !depot_pkg_tarball |> {tarball}

View File

@ -1,9 +1,9 @@
include_rules
: ../runtime.in |> sed 's|@STREAM_URL@|$(STREAM_URL)|' %f > %o |> runtime
: runtime |> !validate_runtime |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/runtime {package}
: runtime |> !runtime_to_depot |> {package}
: $(TUP_CWD)/archives |> tup varsed %f %o |> $(DEPOT_DIR)/pkg/%d/@(DEPOT_VERSION)/archives {package}
: $(TUP_CWD)/archives |> !archives_to_depot |> {package}
ifdef DEPOT_KEY
: {package} |> !depot_pkg_tarball |> {tarball}