-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakegen
More file actions
executable file
·26 lines (23 loc) · 763 Bytes
/
makegen
File metadata and controls
executable file
·26 lines (23 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl -w
# makegen : a makefile generator to automate builds for a list of targets
#
# Copyright (c) 2025 Charles Suresh <romforth@proton.me>
# SPDX-License-Identifier: AGPL-3.0-only
# Please see the LICENSE file for the Affero GPL 3.0 license details
use strict;
my $gen="makefile.gen";
open(my $fh,">$gen") or die "can't open $gen for writing";
select $fh;
print "all : build\n";
my @acc=();
while (<>) {
chomp;
push @acc, "../build/$_";
print "../build/$_ :\n";
print "\tcd ../binutils ; ";
print "mkdir -p \$\@ ; ";
print "cd \$\@ ; ";
print "../../binutils/configure --target=$_ --prefix \${PWD} --disable-nls --enable-gprofng=no --disable-gdb --disable-sim ; make ; make install\n";
}
print "build : ", join(' ', @acc), "\n";
close $fh;