commit b0b69440cc3f1f8127d3b6f341eb0e61116f7918 from: Stefan Sperling date: Mon May 20 20:27:12 2024 UTC make mantab.c compile without 'make obj' The requirement to run 'make obj' before 'make' keeps getting in the way when nsh is compiled as part of the ports infrastructure. commit - 52251c6854e85fb931e67dd6e2752018a9ebb085 commit + b0b69440cc3f1f8127d3b6f341eb0e61116f7918 blob - 2937190f2448d7c6d4b248aa4be41e9c01fe99f9 blob + 4a6b05550e650ed5a4945e34d458070d6a526f15 --- mantab.sh +++ mantab.sh @@ -1,7 +1,11 @@ #!/bin/sh echo '#include ' echo '#include ' -echo '#include "../externs.h"' +if [ "$(basename $(pwd))" = "obj" ]; then + echo '#include "../externs.h"' +else + echo '#include "externs.h"' +fi echo 'struct ghs mantab[] = {' grep '^\.Tg' "$1" | sort | uniq | cut -d ' ' -f2 | sed -e \ 's/\(.*\)/ { "\1", "Search for tag \1", CMPL0 NULL, 0 },/'