Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not rerun configure if Makefile exists #2

Open
Dushistov opened this issue Jul 17, 2018 · 9 comments
Open

do not rerun configure if Makefile exists #2

Dushistov opened this issue Jul 17, 2018 · 9 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Dushistov
Copy link

I use simple build.rs:

extern crate autotools;

fn main() {
    let dst = autotools::build("3rdparty/rsync-3.1.3");
    println!(
        "rustc-env=RSYNC_BIN={}",
        dst.join("bin").join("rsync").display()
    );
}

and after adding such build.rs build becomes really slow,
because of it runs configure every build.
It would be nice check if Makefile exists and if so just run make.
As I know make automatically runs configure if something changed.

@lu-zero
Copy link
Owner

lu-zero commented Jul 18, 2018

If you want to add an option such as configure_once in a pull request I'd merge it immediately.

Checking for Makefile existence isn't enough sadly, you'd have to account for other changes such as different with/without options requested.

@lu-zero lu-zero added enhancement New feature or request help wanted Extra attention is needed labels Jul 18, 2018
@Dushistov
Copy link
Author

Checking for Makefile existence isn't enough sadly, you'd have to account for other changes such as >different with/without options requested.

What about checking config.log and compare new flags with flags from config.log and if flags matches and makefile exists, just run make?

@lu-zero
Copy link
Owner

lu-zero commented Jul 19, 2018

Sounds good (also saving the command in the build dir and compare it would work), are you willing to give it a try?

@lu-zero
Copy link
Owner

lu-zero commented Oct 15, 2018

@Dushistov do you still have the need for this feature?

@Dushistov
Copy link
Author

long story short: I have to turn off usage of autotools-rs from build.rs and use prebuild binary instead.
So at now I do not use autotools-rs anymore.

The more long variant of story: during CI (Continuous Integration) run time to time build failed, because of autoconf/automake build system decides that it need rerun of m4 -> shell code pass, and this doesn't work in out-of-source variant that uses autotools-rs. Because of really I need result of autoconf/automake build only for one specific case old linux distribution/amd64, so I decide just build this binary by hands.

@lu-zero
Copy link
Owner

lu-zero commented Oct 15, 2018

Sounds a bad quirk in rsync, but if you have a tree using it I can have a look.

@Dushistov
Copy link
Author

Dushistov commented Dec 4, 2018

@lu-zero

Sounds a bad quirk in rsync, but if you have a tree using it I can have a look.

It is reproducible on master branch of rsync.

For example I build rsync out of tree:

$ git clone git://git.samba.org/rsync.git
$ mkdir build-rsync
$ cd build-rsync
$ ../rsync/configure && make

then I touch configure.ac

$ touch ../rsync/configure.ac
$ make
autoconf -o configure.sh
autoconf -o configure.sh
autoconf: error: no input file
autoconf: error: no input file

Obviously I do not touch any source code of rsync,
so I have no idea why time to time this bug happens on CI,
but symptomatic is identical.

@lu-zero
Copy link
Owner

lu-zero commented Dec 4, 2018

Probably would be a good idea to report the issue to the rsync project.
The build-system doesn't use automake and does not support out of source directory.

@lu-zero
Copy link
Owner

lu-zero commented Jan 25, 2019

#6 should solve your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants