RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Community Support →

amu variables

Subscribe to amu variables 3 posts, 3 voices

 
Aug 5, 2022 11:41am
Avatar Julie Stamp (8365) 415 posts

Hello, is there an easy way to get amu to print out the value of a Makefile variable (e.g. OBJS)?

There aren’t any targets to edit to put an echo in since they all come from includes.

 
Aug 5, 2022 4:53pm
Avatar Paolo Fabio Zaino (28) 1153 posts

The only way I know is to use -x6 parameter for AMU

This will not only prints the macro when they are set, but also in the correct order of when they are set during the entire procedure and doesn’t require targets.

The only issue is, it prints out all the macros assignment, so usually best to execute it in the desktop and then process the output file with an editor like StrongED to search for what you need.

Just my 0.5c

 
Aug 5, 2022 5:17pm
Avatar Rick Murray (539) 11793 posts

To further expand that, the documentation for Amu says:

-x_n_ Enable Makefile debugging.
n is a bitfield, so -x1 sets level 1, -x2 sets level 2, -x4 sets level 3, -x6 sets levels 2 and 3.

The level assignments are:
1: CLI processing, dependency tree creation & command list assignments
2: Macro processing, pattern substitutions etc.
3: Unused
4: Command execution
5: Command expansion of patterns ($* $< $? etc.)
6: Makefile data structure internal debugging
7: Low-level internal debugging

Sometimes it can be useful to try to track down where something is defined, but as is typical with anything to do with C 1, why specify one thing when you can specify thousands?
So I’d definitely second the idea to run it in a TaskWindow to then look for what exactly is is you require.

1 Thinking specifically here of the compiler’s tendency to not give up on hitting an actual error, but instead to plough on getting more and more confused along the way.
Is there an option (that I haven’t noticed) to have it give up as soon as an error or serious error is encountered?

Reply

To post replies, please first log in.

Forums → Community Support →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

Community-provided support for all users of RISC OS.

Voices

  • Julie Stamp (8365)
  • Paolo Fabio Zaino (28)
  • Rick Murray (539)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys