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

Rework the make-* scripts for simpler toolchain #122

Closed
wants to merge 3 commits into from
Closed

Rework the make-* scripts for simpler toolchain #122

wants to merge 3 commits into from

Conversation

josuah
Copy link

@josuah josuah commented Apr 11, 2020

Each commit address an independent point, with the global goal of making the toolchain simpler, and easier to rework with further on: #28, #2, #35, #107

Makefile Outdated Show resolved Hide resolved
elq.sh Outdated Show resolved Hide resolved
makelib.sh Outdated Show resolved Hide resolved
@josuah josuah requested a review from DerDakon April 13, 2020 16:44
@schmonz schmonz self-requested a review May 1, 2020 20:49
DJB generate compilation tools by concatenating

- warning header
- a file with CC='' LD=''
- make-<file>.sh with the echo 'things to add in <file>'

The end compilation tool <file> gets gen generated by executing make-<file>
which produces a short script with the commands to execute directly.

The make-makelib script did not have the same treatment as the others,
as AR and RANLIB was not configurable.  This patch gives the ability to
configure them the same way.

This also helps with avoiding a special case in #107.
Currently, the make-<file>.sh scripts generate a make-<file> that is
executed to obtain the <file> used for compiling.

The end ./compile script goes from this:

	#!/bin/sh
	# WARNING: This file was auto-generated. Do not edit!
	exec cc -O2 -c "$@"

to this:

	#!/bin/sh
	# WARNING: This file was auto-generated. Do not edit!
	CC='cc -O2'
	LD='cc -s'
	AR='ar'
	RANLIB='ranlib'
	exec $CC -c "$@"

So this is a tradeoff between having shorter end-result ./compile,
./load and ./makelib scripts, and having a simpler build process:
all .sh are now generated only with cat(1), and there is no script
that generate a script anymore.

An exception is ./auto-ccld.sh, which still takes its content from conf-*
config files.
@josuah
Copy link
Author

josuah commented May 24, 2020

FYI: Just rebased it to master.

@schmonz schmonz deleted the branch notqmail:master May 14, 2024 13:17
@schmonz schmonz closed this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants