build: remove use of handcrafted m4 in configuring scripts
Now that library/ is fully gone, we don't need this anymore. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
8c7043390f
commit
7b73c4a75f
3 changed files with 3 additions and 11 deletions
|
@ -28,7 +28,6 @@ LIBMAKEPKGDIR = join_paths(PREFIX, DATAROOTDIR, 'makepkg')
|
|||
PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name())
|
||||
|
||||
PYTHON = import('python').find_installation('python3')
|
||||
M4 = find_program('m4')
|
||||
SED = find_program('sed')
|
||||
DU = find_program('du')
|
||||
LDCONFIG = get_option('ldconfig')
|
||||
|
@ -250,7 +249,6 @@ carch = chost.split('-')[0]
|
|||
# largely identical, but which distinguishes between quoting needs.
|
||||
substs = configuration_data()
|
||||
substs.set('SED', SED.path())
|
||||
substs.set('M4', M4.path())
|
||||
substs.set('CARCH', carch)
|
||||
substs.set('CHOST', chost)
|
||||
substs.set('PKGEXT', get_option('pkg-ext'))
|
||||
|
|
|
@ -189,7 +189,7 @@ edit = sed \
|
|||
## wrong file by accident.
|
||||
$(OURSCRIPTS): %: %.sh.in wrapper.sh.in $(LIBMAKEPKG_IN) Makefile
|
||||
$(AM_V_at)$(RM) $@
|
||||
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
||||
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@
|
||||
$(AM_V_at)chmod +x,a-w $@
|
||||
@$(BASH_SHELL) -O extglob -n $@
|
||||
|
||||
|
|
|
@ -14,18 +14,12 @@ SCRIPT_EDITOR = find_program(configure_file(
|
|||
output : 'edit-script.sh',
|
||||
configuration : substs))
|
||||
|
||||
m4_edit = generator(
|
||||
M4,
|
||||
arguments : ['-P', '-I', meson.current_source_dir(), '@INPUT@'],
|
||||
output : '@PLAINNAME@',
|
||||
capture : true)
|
||||
|
||||
foreach script : scripts
|
||||
script_shortname = script.split('.')[0]
|
||||
|
||||
custom_target(
|
||||
script,
|
||||
input : m4_edit.process(script),
|
||||
input : script,
|
||||
command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@', '0755'],
|
||||
output : script_shortname,
|
||||
install : true,
|
||||
|
@ -40,7 +34,7 @@ foreach script : wrapped_scripts
|
|||
# the build directory.
|
||||
internal_script = custom_target(
|
||||
script,
|
||||
input : m4_edit.process(script),
|
||||
input : script,
|
||||
command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@', '0755'],
|
||||
output : script,
|
||||
build_by_default : true)
|
||||
|
|
Loading…
Add table
Reference in a new issue