Writing Free Software – Part 7: Creating a working install target


Introduction

This entry will show how to add the bits required for an install target. There are two pieces that need to be added to the Makefile.am:

  • target_DATA, which is a list of files associated with the target
  • targetdir, which is the location where the above files will be installed

Return to the workplace

$ cd ~/src/greeting

Add the required variables to Makefile.am

$ cat >> Makefile.am
Greeting.exedir = $(prefix)/lib/mono/greeting
Greeting.exe_DATA = Greeting.exe
^D
$ sudo make install
...
$ ls /usr/local/lib/mono/greeting/
Greeting.exe

Conclusion

We now have the bits in place to put Greeting.exe in the correct directory, but no way to execute it. We’ll address that in a future post. Until then, you might be interested in reading through the application deployment guidelines

, , , , , ,

2 responses to “Writing Free Software – Part 7: Creating a working install target”

  1. It would have worked without the “noinst” prefix. Imo it’s kinda strange to use noinstin an install dir… ^^

Leave a Reply to C.J. Adams-Collier Cancel reply

%d bloggers like this: