aic7xxx: aicasm correct include file

aicasm just puts the value of the "-i" passed include file in the
generated file with quotes around it. This means that there are manual
edits made to aic7xxx_reg_print.c and aic79xx_reg_print.c

now we check to see if the value passed to '-i' starts with a '<', if it
does don't output the quotes.

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp (minor code simplification)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1209
This commit is contained in:
HP van Braam 2024-05-04 08:36:47 -06:00 committed by Warner Losh
parent 758d02fb30
commit 34db47a9db
3 changed files with 8 additions and 5 deletions

View file

@ -343,10 +343,13 @@ aic_print_file_prologue(FILE *ofile)
static void
aic_print_include(FILE *dfile, char *header_file)
{
if (dfile == NULL)
return;
fprintf(dfile, "\n#include \"%s\"\n\n", header_file);
if (header_file[0] == '<')
fprintf(dfile, "\n#include %s\n\n", header_file);
else
fprintf(dfile, "\n#include \"%s\"\n\n", header_file);
}
static void

View file

@ -28,7 +28,7 @@ ${GENSRCS}: \
-I${SYSDIR}/dev/aic7xxx \
-o aic7xxx_seq.h -r aic7xxx_reg.h \
${REG_PRINT_OPT} \
-i ${SYSDIR}/dev/aic7xxx/aic7xxx_osm.h \
-i "<dev/aic7xxx/aic7xxx_osm.h>" \
${SYSDIR}/dev/aic7xxx/aic7xxx.seq
.elif defined(.MAKE.LEVEL)
# This target interfers with fmake's world view and causes this message

View file

@ -17,11 +17,11 @@ ahdfirmware: ${GENSRCS}
${GENSRCS}: \
${SRCTOP}/sys/dev/aic7xxx/aic79xx.{reg,seq} \
${SRCTOP}/sys/cam/scsi/scsi_message.h
aicasm ${INCLUDES} -I${SRCTOP}/sys/cam/scsi \
../aicasm/aicasm ${INCLUDES} -I${SRCTOP}/sys/cam/scsi \
-I${SRCTOP}/sys/dev/aic7xxx \
-o aic79xx_seq.h -r aic79xx_reg.h \
${REG_PRINT_OPT} \
-i ${SRCTOP}/sys/dev/aic7xxx/aic79xx_osm.h \
-i "<dev/aic7xxx/aic79xx_osm.h>" \
${SRCTOP}/sys/dev/aic7xxx/aic79xx.seq
.else
${GENSRCS}: .NOMETA