Bug 1407388 - Remove build/unix/elfhack/inject/Makefile.in and replace with generated files. r=mshal

MozReview-Commit-ID: Cr2RUlksKBJ
This commit is contained in:
Chris Manchester
2017-11-07 16:54:22 -08:00
parent 6be206b9d8
commit cdef76c96c
2 changed files with 14 additions and 8 deletions

View File

@@ -1,11 +1,9 @@
# # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk def copy(out_file, in_path):
with open(in_path, 'r') as fh:
$(CSRCS): %.c: ../inject.c out_file.write(fh.read())
cp $< $@
GARBAGE += $(CSRCS)

View File

@@ -17,8 +17,16 @@ elif CONFIG['TARGET_CPU'].startswith('arm'):
else: else:
cpu = CONFIG['TARGET_CPU'] cpu = CONFIG['TARGET_CPU']
gen_src = '%s.c' % cpu
GENERATED_FILES += [
gen_src,
]
GENERATED_FILES[gen_src].script = 'copy_source.py:copy'
GENERATED_FILES[gen_src].inputs = ['../inject.c']
SOURCES += [ SOURCES += [
"!%s.c" % cpu, '!%s' % gen_src,
] ]
NO_PGO = True NO_PGO = True