Makefile: fix build for directories with spaces
When full path of a source directory has spaces in it, that makes shell and Make split the path, so special treatment is necessary. Additionally, @F doesn't honour the escaping, so has to be avoided. Reported-by: Roman Faizullin <roman@faizullin.info> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
committed by
Karl Palsson
parent
88c20212ed
commit
283d8cc7d2
@@ -29,12 +29,12 @@ OBJS += vector.o systick.o scb.o nvic.o assert.o sync.o dwt.o
|
||||
all: $(SRCLIBDIR)/$(LIBNAME).a
|
||||
|
||||
$(SRCLIBDIR)/$(LIBNAME).a: $(SRCLIBDIR)/$(LIBNAME).ld $(OBJS)
|
||||
@printf " AR $(@F)\n"
|
||||
$(Q)$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
@printf " AR $(LIBNAME).a\n"
|
||||
$(Q)$(AR) $(ARFLAGS) "$@" $(OBJS)
|
||||
|
||||
$(SRCLIBDIR)/$(LIBNAME).ld: $(LIBNAME).ld
|
||||
@printf " CP $(@F)\n"
|
||||
$(Q)cp $^ $@
|
||||
@printf " CP $(LIBNAME).ld\n"
|
||||
$(Q)cp $^ "$@"
|
||||
$(Q)if [ -f $(LIBNAME)_rom_to_ram.ld ]; then cp $(LIBNAME)_rom_to_ram.ld $(SRCLIBDIR); fi
|
||||
|
||||
%.o: %.c
|
||||
|
||||
Reference in New Issue
Block a user