Fix build order issues by moving wings-rs/ into WINGs/.
Having wings-rs depend on WINGs/WINGs/WINGsP.h was not working very well if all of WINGs/ had to be built before wings-rs/. Moving wings-rs/ into WINGs/ addresses this.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -143,4 +143,4 @@ WPrefs.app/WPrefs.desktop
|
||||
|
||||
# Rust stuff.
|
||||
/**/target/**
|
||||
wings-rs/src/WINGsP.rs
|
||||
WINGs/wings-rs/src/WINGsP.rs
|
||||
|
||||
@@ -39,7 +39,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules LINGUAS='*'
|
||||
|
||||
|
||||
SUBDIRS = wrlib wutil-rs WINGs wings-rs wmaker-rs src util po WindowMaker wmlib WPrefs.app doc
|
||||
SUBDIRS = wrlib wutil-rs WINGs wmaker-rs src util po WindowMaker wmlib WPrefs.app doc
|
||||
DIST_SUBDIRS = $(SUBDIRS) test
|
||||
|
||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS =
|
||||
|
||||
SUBDIRS = WINGs . po Documentation Resources
|
||||
SUBDIRS = WINGs wings-rs . po Documentation Resources
|
||||
DIST_SUBDIRS = $(SUBDIRS) Tests Examples Extras
|
||||
|
||||
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
|
||||
|
||||
@@ -7,5 +7,8 @@ edition = "2024"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
wutil-rs = { path = "../wutil-rs" }
|
||||
libc = "0.2.177"
|
||||
pango-sys = "0.21.2"
|
||||
wutil-rs = { path = "../../wutil-rs" }
|
||||
x11 = "2.21.0"
|
||||
yeslogic-fontconfig-sys = "6.0"
|
||||
25
WINGs/wings-rs/Makefile.am
Normal file
25
WINGs/wings-rs/Makefile.am
Normal file
@@ -0,0 +1,25 @@
|
||||
AUTOMAKE_OPTIONS =
|
||||
|
||||
RUST_SOURCES = \
|
||||
src/font.rs \
|
||||
src/lib.rs \
|
||||
src/WINGsP.rs
|
||||
|
||||
RUST_EXTRA = \
|
||||
Cargo.lock \
|
||||
Cargo.toml
|
||||
|
||||
src/WINGsP.rs: ../WINGs/WINGsP.h ../../wrlib/wraster.h ../WINGs/WINGs.h ../WINGs/WUtil.h Makefile patch_WINGsP.sh
|
||||
$(BINDGEN) ../WINGs/WINGsP.h --ignore-functions --allowlist-type "^W_.+|^WM(View|Array|DragOperationType|Point|Data|OpenPanel|SavePanel|HashTable|DraggingInfo|SelectionProcs|Rect|EventProc|Widget|Size|Color|Pixmap|FilePanel)|R(Context|ContextAttributes|Image|RenderingMode|ScalingFilter|StdColormapMode|ImageFormat|Color)|_WINGsConfiguration" --no-recursive-allowlist -o src/WINGsP.rs -- @PANGO_CFLAGS@ -I../../wrlib -I.. && ./patch_WINGsP.sh src/WINGsP.rs
|
||||
|
||||
target/debug/libwings_rs.a: $(RUST_SOURCES) $(RUST_EXTRA)
|
||||
$(CARGO) build
|
||||
|
||||
check-local:
|
||||
$(CARGO) test
|
||||
|
||||
clean-local:
|
||||
$(CARGO) clean
|
||||
rm -f src/WINGsP.rs
|
||||
|
||||
all: target/debug/libwings_rs.a
|
||||
@@ -15,7 +15,7 @@ fi
|
||||
FILE="$1"
|
||||
|
||||
exec sed -i -r \
|
||||
-e "1s/^/use x11::xlib::*;\n\n/" \
|
||||
-e "1s/^/use x11::xlib::*;/" \
|
||||
-e "s/_XftDraw/::std::ffi::c_void/g" \
|
||||
-e "s/_XftFont/::std::ffi::c_void/g" \
|
||||
-e "s/PangoLayout/::std::ffi::c_void/g" \
|
||||
@@ -1,5 +1,4 @@
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
|
||||
pub mod WINGsP;
|
||||
@@ -933,13 +933,10 @@ AC_CONFIG_FILES(
|
||||
wutil-rs/Makefile
|
||||
|
||||
dnl WINGs toolkit
|
||||
WINGs/Makefile WINGs/WINGs/Makefile WINGs/po/Makefile
|
||||
WINGs/Makefile WINGs/wings-rs/Makefile WINGs/WINGs/Makefile WINGs/po/Makefile
|
||||
WINGs/Documentation/Makefile WINGs/Resources/Makefile WINGs/Extras/Makefile
|
||||
WINGs/Examples/Makefile WINGs/Tests/Makefile
|
||||
|
||||
dnl Rust implementation of WINGs libraries
|
||||
wings-rs/Makefile
|
||||
|
||||
dnl Rust implementation of Window Maker core
|
||||
wmaker-rs/Makefile
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
AUTOMAKE_OPTIONS =
|
||||
|
||||
RUST_SOURCES = \
|
||||
src/font.rs \
|
||||
src/lib.rs \
|
||||
src/WINGsP.rs
|
||||
|
||||
RUST_EXTRA = \
|
||||
Cargo.lock \
|
||||
Cargo.toml
|
||||
|
||||
src/WINGsP.rs: ../WINGs/WINGs/WINGsP.h ../wrlib/wraster.h ../WINGs/WINGs/WINGs.h ../WINGs/WINGs/WUtil.h Makefile patch_WINGsP.sh
|
||||
$(BINDGEN) ../WINGs/WINGs/WINGsP.h --ignore-functions --allowlist-type "^W_.+|^WM(View|Array|DragOperationType|Point|Data|OpenPanel|SavePanel|HashTable|DraggingInfo|SelectionProcs|Rect|EventProc|Widget|Size|Color|Pixmap|FilePanel)|R(Context|ContextAttributes|Image|RenderingMode|ScalingFilter|StdColormapMode|ImageFormat|Color)|_WINGsConfiguration" --no-recursive-allowlist -o src/WINGsP.rs -- @PANGO_CFLAGS@ -I../wrlib -I../WINGs && ./patch_WINGsP.sh src/WINGsP.rs
|
||||
|
||||
target/debug/libwings_rs.a: $(RUST_SOURCES) $(RUST_EXTRA)
|
||||
$(CARGO) build
|
||||
|
||||
check-local:
|
||||
$(CARGO) test
|
||||
|
||||
clean-local:
|
||||
$(CARGO) clean
|
||||
rm -f src/WINGsP.rs
|
||||
|
||||
all: target/debug/libwings_rs.a
|
||||
Reference in New Issue
Block a user