Add support for spaces in filenames (4/x)

This takes care of includes.

GNU Make is required for this to work.
This commit is contained in:
Pierre Pronchery 2019-02-12 23:29:36 +01:00
parent 9037225288
commit ea21cb77d2

View File

@ -2529,15 +2529,22 @@ static int _install_include(Makefile * makefile, String const * include)
return 2; return 2;
} }
/* FIXME keep track of the directories created */ /* FIXME keep track of the directories created */
_makefile_print(makefile, "%s%s", "\t$(MKDIR) $(DESTDIR)", install); _makefile_print(makefile, "%s", "\t$(MKDIR) $(DESTDIR)");
_makefile_print_escape(makefile, install);
if(p != NULL) if(p != NULL)
{ {
_makefile_print(makefile, "/%s", p); _makefile_print(makefile, "/");
_makefile_print_escape(makefile, p);
string_delete(p); string_delete(p);
} }
_makefile_print(makefile, "\n"); _makefile_print(makefile, "\n");
_makefile_print(makefile, "%s%s%s%s/%s\n", "\t$(INSTALL) -m 0644 ", _makefile_print(makefile, "%s", "\t$(INSTALL) -m 0644 ");
include, " $(DESTDIR)", install, include); _makefile_print_escape(makefile, include);
_makefile_print(makefile, "%s", " $(DESTDIR)");
_makefile_print_escape(makefile, install);
_makefile_print(makefile, "/");
_makefile_print_escape(makefile, include);
_makefile_print(makefile, "\n");
return 0; return 0;
} }
@ -2899,8 +2906,11 @@ static int _uninstall_include(Makefile * makefile,
if((install = _makefile_get_config(makefile, include, "install")) if((install = _makefile_get_config(makefile, include, "install"))
== NULL) == NULL)
install = "$(INCLUDEDIR)"; install = "$(INCLUDEDIR)";
_makefile_print(makefile, "%s%s/%s\n", "\t$(RM) -- $(DESTDIR)", install, _makefile_print(makefile, "%s", "\t$(RM) -- $(DESTDIR)");
include); _makefile_print_escape(makefile, install);
_makefile_print(makefile, "/");
_makefile_print_escape(makefile, include);
_makefile_print(makefile, "\n");
return 0; return 0;
} }