summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2022-04-13 12:40:14 -0700
committerGitHub <noreply@github.com>2022-04-13 12:40:14 -0700
commitd245091be10c09080f837becce4e2ff115cddad5 (patch)
tree3d6dc63e8917570be450bb16059226d5a43b9914
parent7de11c99ba1e4b9581376d5a9f805b007c133c43 (diff)
parent31ef94d20bd8ec8b0ad29672038c86aec11f0d6f (diff)
downloadopen-iscsi-d245091be10c09080f837becce4e2ff115cddad5.tar.gz
Merge pull request #340 from gonzoleeman/make-ibft-build-more-stable
Make fwparam_ibft build more reliable.
-rw-r--r--usr/fwparam_ibft/Makefile18
-rw-r--r--usr/fwparam_ibft/README6
2 files changed, 23 insertions, 1 deletions
diff --git a/usr/fwparam_ibft/Makefile b/usr/fwparam_ibft/Makefile
index 768b573..9e4d0ba 100644
--- a/usr/fwparam_ibft/Makefile
+++ b/usr/fwparam_ibft/Makefile
@@ -24,6 +24,8 @@ ifeq ($(TOPDIR),)
TOPDIR = ../..
endif
+BISON = bison
+
SBINDIR ?= $(DESTDIR)/sbin
SYSDEPS_OBJS = $(sort $(wildcard ../sysdeps/*.o))
@@ -46,6 +48,22 @@ clean:
$(OBJS): prom_parse.tab.h prom_parse.h
+#
+# This directory is set up so that lex and bison should not have
+# to be run to generate C files, since the C files have already
+# been checked in and are present. This eliminates the need to run
+# them on systems where those tools may not be present. If you wish
+# to run either of them to regenerate their output files, remove
+# the output files first. This prevents these tools from being run
+# again if the output files are already present.
+#
+
+prom_lex.c: prom_lex.l
+ @[ -f $@ ] || $(LEX) -t $? > $@
+
+prom_parse.tab.c prom_parse.tab.h: prom_parse.y
+ @[ -f prom_parse.tab.c ] && [ -f prom_parse.tab.h ] || $(BISON) -H $?
+
depend:
$(CC) $(CFLAGS) -M `ls *.c` > .depend
diff --git a/usr/fwparam_ibft/README b/usr/fwparam_ibft/README
index f040493..0888cf9 100644
--- a/usr/fwparam_ibft/README
+++ b/usr/fwparam_ibft/README
@@ -13,7 +13,11 @@ tools, but the system of having static
parsing and lexical analysis has worked for
so long (and isn't broken), it would be a
shame to change and break it. So the static
-files remain, for now.
+files remain, for now. If you actually wish
+to rerun either of these tools, the Makefile
+is set up so that you have to first remove the
+generated files (prom_lex.c for lex, prom_parse.tab.c,
+and prom_parse.tab.h for bison).
Note: if you wish to use these object files,
they have two external requirements: they