mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
prepare_ports: prevent execution of automake
This patch discharges the dependency of Makefile.in from Makefile.am files whenever both files are present in a downloaded archive. Being based on make, the trigger of running automake is based on the timestamps for the extracted archive content. However, since we reset the timestamps (via 'tar -m') at extraction time, no assumptions about the timestamp relations between the extracted files can be made. In the event automake is triggered, we are faced with the tool dependency from a specific automake version on the host. The patch enforces the unconditional use the 'Makefile.in' version supplied by the archive. Fixes #4350
This commit is contained in:
parent
c8a3497662
commit
4f820cf1e5
@ -256,8 +256,24 @@ _extract_function = $(call _assert,\
|
||||
%.archive: ARCHIVE = $(call _archive_name,$*)
|
||||
%.archive: DIR = $(call _archive_dir,$*)
|
||||
|
||||
#
|
||||
# Quirk for automake
|
||||
#
|
||||
# If both 'Makefile.in' and 'Makefile.am' are present, and 'Makefile.am'
|
||||
# happens to have the more recent timestamp (by chance, using 'tar -m'),
|
||||
# a rule in the resulting 'Makefile' make will try to run automake to
|
||||
# re-generate 'Makefile.in' from 'Makefile.am'. This step is brittle
|
||||
# because it requires a specific automake version on the host.
|
||||
#
|
||||
# We rename the rule target to discharge this magic and keep using the
|
||||
# provided 'Makefile.in'.
|
||||
#
|
||||
_discharge_automake = ( find $(DIR) -name "Makefile.in" |\
|
||||
xargs -r sed -i "/Makefile\.in:.*Makefile\.am/s/^/IGNORE-/" )
|
||||
|
||||
%.archive: %.file
|
||||
@$(MSG_EXTRACT)"$(ARCHIVE) ($*)"
|
||||
$(VERBOSE)\
|
||||
mkdir -p $(DIR);\
|
||||
$(call _extract_function,$*)
|
||||
$(call _extract_function,$*);\
|
||||
$(_discharge_automake)
|
||||
|
Loading…
Reference in New Issue
Block a user