0

I got the source code of a project (which I can't reach the author any more), that uses automake. I'm not familiar with system and all I want to do is rebuild the project.

I have the following files in the project:

Makefile.am
Makefile.in
Makefile

I've modified the Makefile.am file to fit the paths on my system, but how should I run it regenerate the Makefile.

Note: I'm not currently interested in learning automake, just recompiling this project.

Benjamin K.
  • 1,085
  • 3
  • 15
  • 24
  • For one `automake` project, I have a setup script that contains: `aclocal -I config && libtoolize --automake && autoheader && automake --foreign --add-missing && autoconf`. You may be able to miss out some or all of those steps; `libtoolize` and `autoheader` in particular; the `aclocal -I config` looks for files in the `config` sub-directory of the top-level of the source. Have you looked for guidance in the INSTALL or README or similar docs in the source? – Jonathan Leffler Apr 11 '13 at 06:49
  • I don't have them... It is an old university project, where the student who wrote is nowhere to be found... – Benjamin K. Apr 11 '13 at 07:24
  • If you don't have any of the `auto*` tools, you're stuck. You can't regenerate `Makefile` from `Makefile.am` without at least `automake` and `autoconf`. You'll have to manually hack the Makefile, probably, to match the changes in `Makefile.am`. – Jonathan Leffler Apr 11 '13 at 11:42
  • I have autotools, I don't have a README/INSTALL or any kind of information how he built the project except the files above – Benjamin K. Apr 11 '13 at 12:46

2 Answers2

3

to bootstrap an autoconf build-system, you might use

 $ autoreconf -fiv

which will call automake, aclocal, autoheaders as needed, and generate the configure script. after that ou can do the usual

 $ ./configure && make && make install 

as proposed by milos_ladni

but you will definitely need configure.ac (or configure.in if it's an older project), else the project is simply missing some core parts.

if those are missing, you could go and try to modify Makefile directly (good luck), but it might be easier to just recreate a configure.ac from scratch (and hope that the project doesn't have too many dependencies)

umläute
  • 28,885
  • 9
  • 68
  • 122
0

$ ./configure --prefix=some_directory

$ make

$ make install

http://inti.sourceforge.net/tutorial/libinti/autotoolsproject.html#AP05

  • @BenjaminK, do you have a `configure.in` or a `configure.ac`? With those files you can make the `configure` file. – ldav1s Apr 11 '13 at 17:06