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

Add rebuild rule for template files #251

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Nov 17, 2016

CONFIG_STATUS_DEPENDENCIES ensure that 'make' will re-run configure
after any of the template files (freeipa.spec.in, ipasetup.py.in...)
have been altered.

Signed-off-by: Christian Heimes cheimes@redhat.com

CONFIG_STATUS_DEPENDENCIES ensure that 'make' will re-run configure
after any of the template files (freeipa.spec.in, ipasetup.py.in...)
have been altered.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@pspacek
Copy link
Contributor

pspacek commented Nov 18, 2016

NACK:

  • the variable is defined incorrectly, it should be in configure.ac (see Automake manual chapter 16 Rebuilding Makefiles)
  • file install/ui/src/libs/loader.js is missing in the list
  • please reference build system refactoring ticket in the commit message
  • even more importantly, there is a conceptual problem:
    I'm not even sure that this is the right approach. CONFIG_STATUS_DEPEDENCIES is intended for re-building Makefiles and related infrastructure, not individual files generated from templates. With this patch it will re-run configure and config.status for the whole tree. The correct way to do this is to re-run config.status only for particular file. (config.status is the script which is doing actual variable substitution into templates.)

Fixing this might require moving these particular template substitutions from AC_CONFIG_FILES to Makefile.am in particular directories.

@tiran
Copy link
Member Author

tiran commented Nov 18, 2016

I created a ticket for you, https://fedorahosted.org/freeipa/ticket/6498 .

This exact (!) AC_SUBST works for me. Additional newlines cause CONFIG_STATUS_DEPENDENCIES to be an empty rule.

# re-run configure after templates have been altered
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
     ['$(top_srcdir)/daemons/ipa-version.h.in $(top_srcdir)/freeipa.spec.in $(top_srcdir)/ipapython/version.py.in $(top_srcdir)/ipasetup.py.in $(top_srcdir)/install/ui/src/libs/loader.js.in'])

@pspacek
Copy link
Contributor

pspacek commented Nov 21, 2016

I'm going to provide a proper fix as agreed on meeting today.

@pspacek pspacek added the rejected Pull Request has been rejected label Nov 21, 2016
@pspacek pspacek closed this Nov 21, 2016
@tiran tiran deleted the config_status_deps branch November 21, 2016 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Pull Request has been rejected
Projects
None yet
2 participants