aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: 20070108 breaks separated builds  (Read 3078 times)

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
20070108 breaks separated builds
« on: January 08, 2007, 11:19:59 PM »

The 20070108 reorganization breaks builds where srcdir != builddir.

There are two problems:

(1) src/libs/ec/abstracts/Makefile.am runs ./file_generator.pl from the current directory.

This should be $srcdir/file_generator.pl and is trivial to fix.

(2) file_generator.pl opens License.abstract from the current directory at line 202. It should open $srcdir/License.abstract instead.

This is more tricky to fix because file_generator.pl needs to allow specifying a different input file.

The rule is also run unconditionally even if it has just been run and the input files didn't change because all depends on BUILT_SOURCES, which is ECGeneratedFiles, which in turn is not a file (and therefore doesn't have a timestamp).

Furthermore, "make distclean" and "make maintainer-clean" are not removing src/libs/ec/cpp/ECTagTypes.h although it is a generated file.
« Last Edit: January 08, 2007, 11:49:02 PM by Gerd78 »
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: 20070108 breaks separated builds
« Reply #1 on: January 09, 2007, 12:04:30 AM »

A partial workaround is changing the rule
Code: [Select]
ECGeneratedFiles: $(ECGeneratedFilesSources)
./file_generator.pl $(ECGeneratedFilesSources);
to be
Code: [Select]
ECGeneratedFiles: $(ECGeneratedFilesSources)
cd $(srcdir) && ./file_generator.pl $(ECGeneratedFilesSources);
That way, "make" should at least run (not tested), but it doesn't fix the other issues.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
RE: 20070108 breaks separated builds
« Reply #2 on: January 09, 2007, 12:53:39 AM »

Quote
Originally posted by Gerd78
The 20070108 reorganization breaks builds where srcdir != builddir.

There are two problems:

(1) src/libs/ec/abstracts/Makefile.am runs ./file_generator.pl from the current directory.

This should be $srcdir/file_generator.pl and is trivial to fix.

Done.

Quote
Originally posted by Gerd78
(2) file_generator.pl opens License.abstract from the current directory at line 202. It should open $srcdir/License.abstract instead.

This is more tricky to fix because file_generator.pl needs to allow specifying a different input file.

file_generator now forces the first parameter to be the dir where the abstracts are located. It also generates the files based on that folder, which might be right or wrong, I have no idea.

Quote
Originally posted by Gerd78
The rule is also run unconditionally even if it has just been run and the input files didn't change because all depends on BUILT_SOURCES, which is ECGeneratedFiles, which in turn is not a file (and therefore doesn't have a timestamp).

That's intentional.

Quote
Originally posted by Gerd78
Furthermore, "make distclean" and "make maintainer-clean" are not removing src/libs/ec/cpp/ECTagTypes.h although it is a generated file.

That's intentional too.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: 20070108 breaks separated builds
« Reply #3 on: January 09, 2007, 08:00:40 AM »

Sorry Kry, this is just broken.

"make install" currently rebuilds the sources because install depends on all, which depends on BUILT_SOURCES, which is always rebuilt. These 2 .h files trigger a rebuild of everything because mostly anything else depends on them. "make" followed by "make install" effectively builds the codebase twice. I just accidentally noticed it because the build took almost twice as long as usual.

I won't believe that this is intentional until you clearly say so. Otherwise, can we please try to fix it properly?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: 20070108 breaks separated builds
« Reply #4 on: January 09, 2007, 12:53:45 PM »

Is not finished, that's why it's intentional. I'm not done yet.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: 20070108 breaks separated builds
« Reply #5 on: January 13, 2007, 11:56:59 PM »

Try now.
Logged