Skip to content

Commit

Permalink
[build] Fix broken build caused by implied dependency upon "perl"
Browse files Browse the repository at this point in the history
Commit ea12dc0 ("[build] Avoid hard-coding the path to perl")
introduced a build failure for fully clean trees (e.g. after running
"make veryclean"), since the dependency upon $(PARSEROM) now includes
a dependency upon "perl" (which doesn't exist) rather than upon
"/usr/bin/perl" (which does exist).

There should of course be no dependency upon the perl binary at all;
the dependency should be upon "./util/parserom.pl" alone.

Fix by removing the $(PERL) from the definition of Perl-based utility
paths, and adding $(PERL) at the point of usage.

Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jun 24, 2010
1 parent ea12dc0 commit 719b498
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/Makefile
Expand Up @@ -31,12 +31,12 @@ RANLIB := $(CROSS_COMPILE)ranlib
OBJCOPY := $(CROSS_COMPILE)objcopy
NM := $(CROSS_COMPILE)nm
OBJDUMP := $(CROSS_COMPILE)objdump
PARSEROM := $(PERL) ./util/parserom.pl
FIXROM := $(PERL) ./util/fixrom.pl
SYMCHECK := $(PERL) ./util/symcheck.pl
SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
PADIMG := $(PERL) ./util/padimg.pl
LICENCE := $(PERL) ./util/licence.pl
PARSEROM := ./util/parserom.pl
FIXROM := ./util/fixrom.pl
SYMCHECK := ./util/symcheck.pl
SORTOBJDUMP := ./util/sortobjdump.pl
PADIMG := ./util/padimg.pl
LICENCE := ./util/licence.pl
NRV2B := ./util/nrv2b
ZBIN := ./util/zbin
ELF2EFI32 := ./util/elf2efi32
Expand Down
8 changes: 4 additions & 4 deletions src/Makefile.housekeeping
Expand Up @@ -486,7 +486,7 @@ define src_template
'\n$(2) : $$($(4)_DEPS)\n' \
'\nTAGS : $$($(4)_DEPS)\n' \
>> $(2)
@$(PARSEROM) $(1) >> $(2)
@$(PERL) $(PARSEROM) $(1) >> $(2)

endef

Expand Down Expand Up @@ -701,7 +701,7 @@ $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
$(QM)$(ECHO) " [LD] $@"
$(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
--defsym _build_id=`$(BUILD_ID_CMD)` -Map $(BIN)/$*.tmp.map
$(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
$(Q)$(OBJDUMP) -ht $@ | $(PERL) $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map

# Keep intermediate object file (useful for debugging)
.PRECIOUS : $(BIN)/%.tmp
Expand Down Expand Up @@ -758,7 +758,7 @@ $(BIN)/%.licence : $(BIN)/%.tmp
echo "files are missing a licence declaration:" ;\
echo $(call unlicensed_deps_list,$<);\
exit 1,\
$(LICENCE) $(call licence_list,$<))
$(PERL) $(LICENCE) $(call licence_list,$<))

# Extract compression information from intermediate object file
#
Expand Down Expand Up @@ -986,7 +986,7 @@ $(SYMTAB) : $(BLIB)
CLEANUP += $(BIN)/symtab

symcheck : $(SYMTAB)
$(SYMCHECK) $<
$(PERL) $(SYMCHECK) $<

endif # defined(BIN)

Expand Down
8 changes: 4 additions & 4 deletions src/arch/i386/Makefile.pcbios
Expand Up @@ -23,14 +23,14 @@ MEDIA += raw

# Padding rules
#
PAD_rom = $(PADIMG) --blksize=512 --byte=0xff $@
PAD_rom = $(PERL) $(PADIMG) --blksize=512 --byte=0xff $@
PAD_mrom = $(PAD_rom)
PAD_dsk = $(PADIMG) --blksize=512 $@
PAD_hd = $(PADIMG) --blksize=32768 $@
PAD_dsk = $(PERL) $(PADIMG) --blksize=512 $@
PAD_hd = $(PERL) $(PADIMG) --blksize=32768 $@

# Finalisation rules
#
FINALISE_rom = $(FIXROM) $@
FINALISE_rom = $(PERL) $(FIXROM) $@
FINALISE_mrom = $(FINALISE_rom)

# rule to make a non-emulation ISO boot image
Expand Down

0 comments on commit 719b498

Please sign in to comment.