diff options
author | Lee Duncan <lduncan@suse.com> | 2022-04-13 12:06:28 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2022-04-13 12:06:28 -0700 |
commit | 31ef94d20bd8ec8b0ad29672038c86aec11f0d6f (patch) | |
tree | 3d6dc63e8917570be450bb16059226d5a43b9914 /usr/fwparam_ibft/Makefile | |
parent | 7de11c99ba1e4b9581376d5a9f805b007c133c43 (diff) | |
download | open-iscsi-31ef94d20bd8ec8b0ad29672038c86aec11f0d6f.tar.gz |
Make fwparam_ibft build more reliable.
This build has lex and bison source files, but
they are not normally used to regenerate C files,
since that has been done ahead of time, statically,
to handle the case when users building the software
may not have these tools. But some build systems
think the generated C files need to be regenerated
because the timestamp on the source and generated
files is so close, just because of the order the
files were populated in this directory. So we tell
the Makefile to only generate C files if those
files are missing. This should have no effect,
since these files should never need to be
regenerated unless we change lex or bison logic.
Diffstat (limited to 'usr/fwparam_ibft/Makefile')
-rw-r--r-- | usr/fwparam_ibft/Makefile | 18 |
1 files changed, 18 insertions, 0 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 |