Changeset 25e1490 in mainline for uspace/lib/meson.build


Ignore:
Timestamp:
2024-01-10T11:32:40Z (17 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
5907aa4
Parents:
de96d3b (diff), 6deab5a (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:
Vojtech Horky <vojtech.horky@…> (2024-01-10 11:32:40)
git-committer:
GitHub <noreply@…> (2024-01-10 11:32:40)
Message:

Add export-dev for exporting all libraries (see #230)

The new target export-dev builds all libraries and copies the
created .a archives and library headers to export-dev/
subdirectory.

Unlike the existing approach from tools/export.sh we do not
list the libraries manually but copy all of them automatically.

The approach relies as much on Meson to do the heavy-lifting
as possible and the invoked shell script merely copies the files.
The script honors exported DESTDIR variable if set and
ensures thin archives are converted before export.

Also helenos-pkg-config was rewritten to Python for better
maintainability.

Usage:

ninja export-dev
env DESTDIR=harbour-export ninja export-dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/meson.build

    rde96d3b r25e1490  
    180180                if run_command('[', '-d', incdir, ']').returncode() == 0
    181181                        includes += include_directories(incdir)
     182                        _sdir = meson.current_source_dir() / l / 'include'
    182183
    183184                        if installed_libs.contains(l)
    184                                 _sdir = meson.current_source_dir() / l / 'include'
    185185                                uspace_lib_devel_install_script_text += 'cp -R -L -T "@0@" "${DESTDIR}include/lib@1@"'.format(_sdir, l)
    186186                        endif
     187
     188                        exported_devel_files += ['include', _sdir, 'lib' + l]
    187189                else
    188190                        includes += include_directories(l)
     
    293295                        install_deps += [ _static_lib ]
    294296                endif
     297
     298                exported_devel_files += ['staticlib', _static_lib, 'lib' + l + '.a']
    295299
    296300                _static_dep = declare_dependency(
Note: See TracChangeset for help on using the changeset viewer.