Browse Source

Show an #error if gmake not used / BUILDTS is empty

Bryan Drewery 13 năm trước cách đây
mục cha
commit
99aebf8fb9
2 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 1 0
      doc/UPDATES
  2. 4 0
      src/main.c

+ 1 - 0
doc/UPDATES

@@ -1,6 +1,7 @@
 maint
   * Prevent crashing on startup if openssl can not be loaded
   * Rename option -c to -m for 'manual' edit, and redirect -c to -C
+  * Show a nicer compile error when BUILDTS unable to be determined / gmake is not used.
 
 1.4.1 - http://wraith.botpack.net/milestone/1.4.1
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.

+ 4 - 0
src/main.c

@@ -83,9 +83,13 @@
 
 extern int		optind;
 
+#if (BUILDTS + 0)
 const time_t 	buildts = BUILDTS;		/* build timestamp (UTC) */
 const char	*commit = COMMIT;
 const char	*branch = BRANCH;
+#else
+#error BUILDTS unable to be determined. Gmake required. Source may also be incorrect.
+#endif
 const char	*egg_version = VERSION;
 char	git_version[50] = "";