From d70a24d32a5fb37ef1f505ea6a24bede7850d9d4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 9 Oct 2007 15:52:51 +0000 Subject: [PATCH] PREFIX and DESTDIR were not present in directories with only includes --- src/makefile.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/makefile.c b/src/makefile.c index f53624a..c918c5d 100644 --- a/src/makefile.c +++ b/src/makefile.c @@ -246,6 +246,11 @@ static int _variables_executables(Configure * configure, FILE * fp) i = 0; } } + else if(includes != NULL) + { + fprintf(fp, "%s%s\n", "PREFIX\t= ", configure->prefs->prefix); + fprintf(fp, "%s%s\n", "DESTDIR\t= ", configure->prefs->destdir); + } if(targets != NULL || includes != NULL) fprintf(fp, "%s", "RM\t= rm -f\n"); if(config_get(configure->config, "", "package")) @@ -447,9 +452,10 @@ static void _binary_ldflags(Configure * configure, FILE * fp, static void _variables_library(Configure * configure, FILE * fp, char * done) { if(!done[TT_LIBRARY]) - fprintf(fp, "%s%s%s%s\n", "PREFIX\t= ", - configure->prefs->prefix, "\nDESTDIR\t= ", - configure->prefs->destdir); + { + fprintf(fp, "%s%s\n", "PREFIX\t= ", configure->prefs->prefix); + fprintf(fp, "%s%s\n", "DESTDIR\t= ", configure->prefs->destdir); + } if(configure->prefs->libdir[0] == '/') fprintf(fp, "%s%s\n", "LIBDIR\t= ", configure->prefs->libdir); else