configure.in
changeset 12035 1a7dec71e8e0
parent 12033 bc702c5a7c3a
child 12054 e604fe493d45
     1.1 --- a/configure.in	Mon Jun 25 01:57:28 2018 -0400
     1.2 +++ b/configure.in	Mon Jun 25 09:37:25 2018 -0700
     1.3 @@ -1403,8 +1403,6 @@
     1.4                  WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
     1.5                  WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
     1.6                  WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
     1.7 -                WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
     1.8 -                WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
     1.9                  video_wayland=yes
    1.10              fi
    1.11          fi
    1.12 @@ -1416,9 +1414,6 @@
    1.13                  AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
    1.14              fi
    1.15  
    1.16 -            WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6"
    1.17 -            WAYLAND_PROTOCOLS_STABLE="xdg-shell"
    1.18 -
    1.19              SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
    1.20              EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
    1.21              AC_ARG_ENABLE(wayland-shared,
    1.22 @@ -3978,74 +3973,25 @@
    1.23  SDLTEST_SOURCES="$srcdir/src/test/*.c"
    1.24  
    1.25  if test x$video_wayland = xyes; then
    1.26 -    WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
    1.27 -    WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
    1.28 -    WAYLAND_PROTOCOLS_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE $WAYLAND_PROTOCOLS_STABLE |\
    1.29 -        sed 's,[[^ ]]\+,\\$(gen)/&-protocol.c,g'`
    1.30 -    WAYLAND_PROTOCOLS_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE $WAYLAND_PROTOCOLS_STABLE |\
    1.31 -        sed 's,[[^ ]]\+,\\$(gen)/&-client-protocol.h,g'`
    1.32 -    GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_SOURCES"
    1.33 -    GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_HEADERS"
    1.34 -
    1.35 -    WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
    1.36 -$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
    1.37 -	@\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
    1.38 -	\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
    1.39 -
    1.40 -    WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
    1.41 -$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
    1.42 -	@\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
    1.43 -	\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
    1.44 -
    1.45 -    WAYLAND_CORE_PROTOCOL_OBJECT="
    1.46 -\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
    1.47 -	\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
    1.48 -
    1.49 -    WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.50 -        do echo ; echo \$p | sed\
    1.51 -        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
    1.52 -	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.53 -	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
    1.54 -
    1.55 -    WAYLAND_PROTOCOLS_CLIENT_HEADER_STABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_STABLE;\
    1.56 -        do echo ; echo \$p | sed\
    1.57 -        "s,^\\([[a-z\\-]]\\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/stable/\1/&.xml\\\\
    1.58 -	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.59 -	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
    1.60 -
    1.61 -    WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.62 -        do echo ; echo \$p | sed\
    1.63 -        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
    1.64 -	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.65 -	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
    1.66 -
    1.67 -    WAYLAND_PROTOCOLS_CODE_STABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_STABLE;\
    1.68 -        do echo ; echo \$p | sed\
    1.69 -        "s,^\\([[a-z\\-]]\\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/stable/\1/&.xml\\\\
    1.70 -	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.71 -	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
    1.72 -
    1.73 -    WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.74 -        do echo ; echo \$p | sed\
    1.75 -        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
    1.76 -	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
    1.77 -
    1.78 -    WAYLAND_PROTOCOLS_OBJECTS_STABLE=`for p in $WAYLAND_PROTOCOLS_STABLE;\
    1.79 -        do echo ; echo \$p | sed\
    1.80 -        "s,^\\([[a-z\\-]]\\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
    1.81 -	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
    1.82 -
    1.83 -    WAYLAND_PROTOCOLS_DEPENDS="
    1.84 -$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
    1.85 -$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
    1.86 -$WAYLAND_CORE_PROTOCOL_OBJECT
    1.87 -$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
    1.88 -$WAYLAND_PROTOCOLS_CLIENT_HEADER_STABLE_DEPENDS
    1.89 -$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
    1.90 -$WAYLAND_PROTOCOLS_CODE_STABLE_DEPENDS
    1.91 -$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
    1.92 -$WAYLAND_PROTOCOLS_OBJECTS_STABLE
    1.93 -"
    1.94 +    WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done`
    1.95 +    WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done`
    1.96 +    WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done`
    1.97 +    GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES"
    1.98 +    GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS"
    1.99 +
   1.100 +    WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\
   1.101 +        echo ;\
   1.102 +        echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
   1.103 +        echo "	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
   1.104 +        echo "	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\
   1.105 +        echo ;\
   1.106 +        echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
   1.107 +        echo "	@\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
   1.108 +        echo "	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\
   1.109 +        echo ;\
   1.110 +        echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\
   1.111 +        echo "	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\
   1.112 +        done`
   1.113  fi
   1.114  
   1.115  OBJECTS=`echo $SOURCES`