Changeset 3e828ea in mainline for tools/export.sh


Ignore:
Timestamp:
2019-09-23T12:49:29Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9be2358
Parents:
9259d20 (diff), 1a4ec93f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiri Svoboda <jiri@…> (2019-09-22 12:49:07)
git-committer:
Jiri Svoboda <jiri@…> (2019-09-23 12:49:29)
Message:

Merge changes from master, especially Meson build

File:
1 moved

Legend:

Unmodified
Added
Removed
  • tools/export.sh

    • Property mode changed from 100644 to 100755
    r9259d20 r3e828ea  
     1#!/bin/sh
     2
    13#
    2 # Copyright (c) 2012 Petr Koupy
     4# Copyright (c) 2019 Jiří Zárevúcky
    35# All rights reserved.
    46#
     
    2729#
    2830
    29 USPACE_PREFIX = ../..
     31if [ "$#" -ne 1 ]; then
     32        echo "Must define export directory."
     33        exit 1
     34fi
    3035
    31 # TODO: Should be just "gui", rest is transitive dependencies.
    32 LIBS = gui draw softrend compress math
     36EXPORT_DIR="$1"
    3337
    34 BINARY = vlaunch
     38# Only (re)build files we actually want to export.
    3539
    36 IMG = image
    37 IMGS = $(IMG)s
     40EXPORT_LIBS=" \
     41        uspace/lib/libmath.a \
     42        uspace/lib/libclui.a \
     43        uspace/lib/libgui.a \
     44        uspace/lib/libdraw.a \
     45        uspace/lib/libsoftrend.a \
     46        uspace/lib/libhound.a \
     47        uspace/lib/libpcm.a \
     48        uspace/lib/libcpp.a \
     49        uspace/lib/libc.a \
     50        uspace/lib/c/libstartfiles.a \
     51        uspace/lib/libposix.a \
     52"
    3853
    39 SOURCES = \
    40         vlaunch.c \
    41         $(IMGS).s \
    42         $(IMGS)_desc.c
     54EXPORT_CONFIGS=" \
     55        meson/part/exports/config.mk \
     56        meson/part/exports/config.sh \
     57"
    4358
    44 IMAGES = \
    45         gfx/helenos.tga
     59ninja $EXPORT_LIBS $EXPORT_CONFIGS
     60ninja devel-headers
    4661
    47 PRE_DEPEND = $(IMGS).s $(IMGS).h $(IMGS)_desc.c
    48 EXTRA_CLEAN = $(IMGS).s $(IMGS).h $(IMGS)_desc.c $(IMGS).zip
    49 
    50 include $(USPACE_PREFIX)/Makefile.common
    51 
    52 $(IMGS).s: $(IMGS).zip
    53         unzip -p $< $@ > $@
    54 
    55 $(IMGS).h: $(IMGS).zip
    56         unzip -p $< $@ > $@
    57 
    58 $(IMGS)_desc.c: $(IMGS).zip
    59         unzip -p $< $@ > $@
    60 
    61 $(IMGS).zip: $(IMAGES)
    62         $(ROOT_PATH)/tools/mkarray.py $(IMGS) $(IMG) "$(AS_PROLOG)" .data $^
     62mkdir -p "$EXPORT_DIR/lib"
     63cp -t "$EXPORT_DIR/lib" $EXPORT_LIBS
     64rm -rf "$EXPORT_DIR/include"
     65cp -R dist/include "$EXPORT_DIR/include"
     66cp -t "$EXPORT_DIR" $EXPORT_CONFIGS
Note: See TracChangeset for help on using the changeset viewer.