aboutsummaryrefslogtreecommitdiff
path: root/miscutils/make.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-10-17 09:07:56 +0100
committerRon Yorston <rmy@pobox.com>2024-10-17 09:07:56 +0100
commit4f13a5c9ea4994bd44ff91d3a6200113f863977b (patch)
tree8f43ba047b07264ca2d27cd78806f63013bd3b35 /miscutils/make.c
parente26ca25a4332330dfcf439bb79bd37dbe85f8e60 (diff)
downloadbusybox-w32-4f13a5c9ea4994bd44ff91d3a6200113f863977b.tar.gz
busybox-w32-4f13a5c9ea4994bd44ff91d3a6200113f863977b.tar.bz2
busybox-w32-4f13a5c9ea4994bd44ff91d3a6200113f863977b.zip
make: look for PDPmakefile
As an extension have pdpmake look for the file 'PDPmakefile' before 'makefile' and 'Makefile'. This is similar to how GNU make first checks for 'GNUmakefile'. Adds 32-40 bytes.
Diffstat (limited to '')
-rw-r--r--miscutils/make.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/miscutils/make.c b/miscutils/make.c
index 8d953f9fc..868cab5e2 100644
--- a/miscutils/make.c
+++ b/miscutils/make.c
@@ -3122,7 +3122,6 @@ int make_main(int argc UNUSED_PARAM, char **argv)
3122#if ENABLE_FEATURE_MAKE_POSIX 3122#if ENABLE_FEATURE_MAKE_POSIX
3123 const char *prag; 3123 const char *prag;
3124#endif 3124#endif
3125 char def_make[] = "makefile";
3126 int estat; 3125 int estat;
3127 bool found_target; 3126 bool found_target;
3128 FILE *ifd; 3127 FILE *ifd;
@@ -3247,17 +3246,17 @@ int make_main(int argc UNUSED_PARAM, char **argv)
3247 free((void *)newpath); 3246 free((void *)newpath);
3248 3247
3249 if (!makefiles) { // Look for a default Makefile 3248 if (!makefiles) { // Look for a default Makefile
3249 if (!posix && (ifd = fopen("PDPmakefile", "r")) != NULL)
3250 makefile = "PDPmakefile";
3251 else if ((ifd = fopen("PDPmakefile" + 3, "r")) != NULL)
3252 makefile = "PDPmakefile" + 3;
3250#if !ENABLE_PLATFORM_MINGW32 3253#if !ENABLE_PLATFORM_MINGW32
3251 for (; def_make[0] >= 'M'; def_make[0] -= 0x20) { 3254 else if ((ifd = fopen("Makefile", "r")) != NULL)
3252#else 3255 makefile = "Makefile";
3253 {
3254#endif 3256#endif
3255 if ((ifd = fopen(def_make, "r")) != NULL) { 3257 else
3256 makefile = def_make; 3258 error("no makefile found");
3257 goto read_makefile; 3259 goto read_makefile;
3258 }
3259 }
3260 error("no makefile found");
3261 } 3260 }
3262 3261
3263 while ((file = llist_pop(&makefiles))) { 3262 while ((file = llist_pop(&makefiles))) {