squash: tidy up the mkdirs
This commit is contained in:
parent
d42c5fc422
commit
a4bfb70876
@ -173,17 +173,20 @@
|
|||||||
-- it screws up the escaping of spaces and parethesis (anyone know a fix?)
|
-- it screws up the escaping of spaces and parethesis (anyone know a fix?)
|
||||||
--
|
--
|
||||||
|
|
||||||
function make.mkdirRules(dirname)
|
function make.mkdir(dirname)
|
||||||
_p('%s:', dirname)
|
|
||||||
_p('\t@echo Creating %s', dirname)
|
|
||||||
_p('ifeq (posix,$(SHELLTYPE))')
|
_p('ifeq (posix,$(SHELLTYPE))')
|
||||||
_p('\t$(SILENT) mkdir -p %s', dirname)
|
_p('\t$(SILENT) mkdir -p %s', dirname)
|
||||||
_p('else')
|
_p('else')
|
||||||
_p('\t$(SILENT) mkdir $(subst /,\\\\,%s)', dirname)
|
_p('\t$(SILENT) mkdir $(subst /,\\\\,%s)', dirname)
|
||||||
_p('endif')
|
_p('endif')
|
||||||
_p('')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function make.mkdirRules(dirname)
|
||||||
|
_p('%s:', dirname)
|
||||||
|
_p('\t@echo Creating %s', dirname)
|
||||||
|
make.mkdir(dirname)
|
||||||
|
_p('')
|
||||||
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Format a list of values to be safely written as part of a variable assignment.
|
-- Format a list of values to be safely written as part of a variable assignment.
|
||||||
|
@ -153,17 +153,14 @@
|
|||||||
if path.iscppfile(node.abspath) then
|
if path.iscppfile(node.abspath) then
|
||||||
_x('$(OBJDIR)/%s.o: %s', node.objname, node.relpath)
|
_x('$(OBJDIR)/%s.o: %s', node.objname, node.relpath)
|
||||||
_p('\t@echo $(notdir $<)')
|
_p('\t@echo $(notdir $<)')
|
||||||
_p('ifeq (posix,$(SHELLTYPE))')
|
make.mkdir('$(OBJDIR)')
|
||||||
_p('\t$(SILENT) mkdir -p "$(OBJDIR)"')
|
|
||||||
_p('else')
|
|
||||||
_p('\t$(SILENT) mkdir "$(subst /,\\\\,$(OBJDIR))"')
|
|
||||||
_p('endif')
|
|
||||||
cpp.buildcommand(prj, "o", node)
|
cpp.buildcommand(prj, "o", node)
|
||||||
|
|
||||||
-- resource file
|
-- resource file
|
||||||
elseif path.isresourcefile(node.abspath) then
|
elseif path.isresourcefile(node.abspath) then
|
||||||
_x('$(OBJDIR)/%s.res: %s', node.objname, node.relpath)
|
_x('$(OBJDIR)/%s.res: %s', node.objname, node.relpath)
|
||||||
_p('\t@echo $(notdir $<)')
|
_p('\t@echo $(notdir $<)')
|
||||||
|
make.mkdir('$(OBJDIR)')
|
||||||
_p('\t$(SILENT) $(RESCOMP) $< -O coff -o "$@" $(ALL_RESFLAGS)')
|
_p('\t$(SILENT) $(RESCOMP) $< -O coff -o "$@" $(ALL_RESFLAGS)')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -370,11 +367,7 @@
|
|||||||
function make.cppTargetRules(prj)
|
function make.cppTargetRules(prj)
|
||||||
_p('$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)')
|
_p('$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)')
|
||||||
_p('\t@echo Linking %s', prj.name)
|
_p('\t@echo Linking %s', prj.name)
|
||||||
_p('ifeq (posix,$(SHELLTYPE))')
|
make.mkdir('$(TARGETDIR)')
|
||||||
_p('\t$(SILENT) mkdir -p "$(TARGETDIR)"')
|
|
||||||
_p('else')
|
|
||||||
_p('\t$(SILENT) mkdir "$(subst /,\\\\,$(TARGETDIR))"')
|
|
||||||
_p('endif')
|
|
||||||
_p('\t$(SILENT) $(LINKCMD)')
|
_p('\t$(SILENT) $(LINKCMD)')
|
||||||
_p('\t$(POSTBUILDCMDS)')
|
_p('\t$(POSTBUILDCMDS)')
|
||||||
_p('')
|
_p('')
|
||||||
|
Loading…
Reference in New Issue
Block a user