git: 34db47a9dbc7 - main - aic7xxx: aicasm correct include file

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 04 May 2024 14:44:23 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=34db47a9dbc76c09019e2bfa37d23e28e477a506

commit 34db47a9dbc76c09019e2bfa37d23e28e477a506
Author:     HP van Braam <hp@tmm.cx>
AuthorDate: 2024-05-04 14:36:47 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-04 14:39:02 +0000

    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
---
 sys/dev/aic7xxx/aicasm/aicasm_symbol.c | 7 +++++--
 sys/modules/aic7xxx/ahc/Makefile       | 2 +-
 sys/modules/aic7xxx/ahd/Makefile       | 4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
index d3bca594b468..95d9da9be1b7 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
+++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
@@ -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
diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile
index 8fc4c68feebb..1ced6c050397 100644
--- a/sys/modules/aic7xxx/ahc/Makefile
+++ b/sys/modules/aic7xxx/ahc/Makefile
@@ -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
diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile
index 2fff21f332e9..cf68651e792c 100644
--- a/sys/modules/aic7xxx/ahd/Makefile
+++ b/sys/modules/aic7xxx/ahd/Makefile
@@ -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