0
votes

Now that I finally got xmonad to play nicely with MATE DE, I though I would try to port the GNOME2/3/XFCE4 panel applet over to mate, since MATE is fundamentally GNOME2.

So far, I have added the necessary dependencies, ifdef's etc. for MATE, and running autogen.sh --with-panel=mate spits out a Makefile with showing any errors. However, running make gives this error: Makefile:770: *** missing separator. Stop. Here's my Makefile: http://pastebin.com/bLF9TD4M .

Here's the part that is causing the error:

#    $(applet_files): $(applet_files:.desktop=.desktop.in)
#           $(SED) -e "s|\@PLUGIN_DIR\@|$(PLUGIN_DIR)|" $< > $@
    if PANEL_MATE
        applet_files = org.mate.panel.XmonadLogApplet.panel-applet
        $(applet_files): $(applet_files:.panel-applet=.panel-applet.in)
                $(SED) -e "s|\@PLUGIN_DIR\@|$(PLUGIN_DIR)|" $< > $@
    else
        applet_files = org.gnome.panel.XmonadLogApplet.panel-applet
        $(applet_files): $(applet_files:.panel-applet=.panel-applet.in)
                $(SED) -e "s|\@PLUGIN_DIR\@|$(PLUGIN_DIR)|" $< > $@
    endif

    if !PANEL_MATE
        servicedir = $(SESSION_BUS_SERVICES_DIR)
        service_in_files = org.gnome.panel.applet.XmonadLogAppletFactory.service.in
        service_DATA = $(service_in_files:.service.in=.service)
        org.gnome.panel.applet.XmonadLogAppletFactory.service: $(service_in_files)
                $(SED) -e "s|\@PLUGIN_DIR\@|$(PLUGIN_DIR)|" $< > $@
    else
        servicedir = $(SESSION_BUS_SERVICES_DIR)
        service_in_files = org.mate.panel.applet.XmonadLogAppletFactory.service.in
        service_DATA = $(service_in_files:.service.in=.service)
                org.mate.panel.applet.XmonadLogAppletFactory.service: $(service_in_files)
                $(SED) -e "s|\@PLUGIN_DIR\@|$(PLUGIN_DIR)|" $< > $@
    endif

Those IF statements are left-overs from the Makefile.am file, and they shouldn't be here. If I manually remove the if statements (keeping the relevent stuff inside them) and run make, I get this:

make  all-am
make[1]: Entering directory `/home/ari/development/xmonad-log-applet'
gcc -DHAVE_CONFIG_H -I.  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include      -g -O2 -MT xmonad_log_applet-main.o -MD -MP -MF .deps/xmonad_log_applet-main.Tpo -c -o xmonad_log_applet-main.o `test -f 'main.c' || echo './'`main.c
main.c:15:21: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
make[1]: *** [xmonad_log_applet-main.o] Error 1
make[1]: Leaving directory `/home/ari/development/xmonad-log-applet'
make: *** [all] Error 2

This is the first time I have really used makefiles and automake, so any help would be appreciated. Here are my modifications on github: https://github.com/geniass/xmonad-log-applet

1
You can't indent code within if blocks in Automake. Are you de-indenting the code when you remove the if statements?ptomato
Oh if you can't indent within if blocks that would explain this problem. I thought that maybe I am using some version of automake that doesn't allow nested ifs. After I had unnested them, there was some duplicated code, but at least it worked. Unindenting everything also seems to work.geniass
Everything builds fine now, but mate doesn't recognise the applet as a valid applet. Removing the indentation worked. Maybe that should be added as an answer?geniass

1 Answers

0
votes

You can't indent code within if blocks in Automake. (Makefiles are sensitive to indentation.)