aaaantoine
November 25th, 2008, 06:13 PM
I'm trying to GNUify a package that I want to distribute.
Because I can't figure out Makefiles, I write a quick bash file that does the compiling for me. So I tried to read over the documentation for Automake... And I find it rather confusing.
So, how do I convert this...
#!/bin/bash
gcc $(pkg-config --cflags --libs libpanelapplet-2.0 libwnck-1.0) -o taskdock-applet taskdock.c
sudo cp taskdock-applet /usr/lib/gnome-panel
sudo cp TaskdockApplet_Factory.server /usr/lib/bonobo/servers
...into a Makefile.am?
Note: After pkg-config is run, the data expands to...
#!/bin/bash
gcc -DORBIT2=1 -pthread -I/usr/include/panel-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libwnck-1.0 -I/usr/include/startup-notification-1.0 -pthread -lpanel-applet-2 -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgconf-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lbonobo-2 -lbonobo-activation -lORBit-2 -lgthread-2.0 -lrt -lwnck-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -o taskdock-applet taskdock.c
sudo cp taskdock-applet /usr/lib/gnome-panel
sudo cp TaskdockApplet_Factory.server /usr/lib/bonobo/servers
I figured out that the -I fields get attached to an INCLUDES variable, like so:
INCLUDES = -I/usr/include/panel-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libwnck-1.0 -I/usr/include/startup-notification-1.0
But the rest I don't know about.
Because I can't figure out Makefiles, I write a quick bash file that does the compiling for me. So I tried to read over the documentation for Automake... And I find it rather confusing.
So, how do I convert this...
#!/bin/bash
gcc $(pkg-config --cflags --libs libpanelapplet-2.0 libwnck-1.0) -o taskdock-applet taskdock.c
sudo cp taskdock-applet /usr/lib/gnome-panel
sudo cp TaskdockApplet_Factory.server /usr/lib/bonobo/servers
...into a Makefile.am?
Note: After pkg-config is run, the data expands to...
#!/bin/bash
gcc -DORBIT2=1 -pthread -I/usr/include/panel-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libwnck-1.0 -I/usr/include/startup-notification-1.0 -pthread -lpanel-applet-2 -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgconf-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lbonobo-2 -lbonobo-activation -lORBit-2 -lgthread-2.0 -lrt -lwnck-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -o taskdock-applet taskdock.c
sudo cp taskdock-applet /usr/lib/gnome-panel
sudo cp TaskdockApplet_Factory.server /usr/lib/bonobo/servers
I figured out that the -I fields get attached to an INCLUDES variable, like so:
INCLUDES = -I/usr/include/panel-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libwnck-1.0 -I/usr/include/startup-notification-1.0
But the rest I don't know about.