Просмотр исходного кода

New make changes
Author: jgg
Date: 1998-07-14 03:31:31 GMT
New make changes

Arch Librarian лет назад: 22
Родитель
Сommit
118a5e95e0
3 измененных файлов с 31 добавлено и 16 удалено
  1. 9 3
      buildlib/config.h.in
  2. 16 11
      buildlib/defaults.mak
  3. 6 2
      configure.in

+ 9 - 3
buildlib/config.h.in

@@ -4,9 +4,6 @@
    byte first (like Motorola and SPARC, unlike Intel and VAX).  */
 #undef WORDS_BIGENDIAN
 
-/* Define if the X Window System is missing or not being used.  */
-#undef X_DISPLAY_MISSING
-
 /* The number of bytes in a unsigned char.  */
 #undef SIZEOF_UNSIGNED_CHAR
 
@@ -18,3 +15,12 @@
 
 /* The number of bytes in a unsigned short.  */
 #undef SIZEOF_UNSIGNED_SHORT
+
+/* Define if we have libgpm. */
+#undef HAVE_LIBGPM
+
+/* Define if we have the SLang library from Davis. */
+#undef HAVE_LIBSLANG    
+
+/* Define if we have the X11 windowing system. */
+#undef HAVE_X11

+ 16 - 11
buildlib/defaults.mak

@@ -26,9 +26,21 @@
 # but by explicly setting the BUILD variable. Make is invoked from
 # within the source itself which is much more compatible with compilation
 # environments.
+.SILENT:
 
-ifndef BUILD
-BUILD=$(BASE)/build
+# Search for the build directory
+ifdef BUILD
+BUILD_POSSIBLE = $(BUILD)
+else
+BUILD_POSSIBLE = $(BASE) $(BASE)/build
+endif
+
+BUILD:= $(foreach i,$(BUILD_POSSIBLE),$(wildcard $(i)/environment.mak))
+BUILD:= $(firstword $(dir $(BUILD)))
+
+ifeq ($(words $(BUILD)),0)
+error-all:
+	echo Can't find the build directory in $(BUILD_POSSIBLE) -- use BUILD=
 endif
 
 # Base definitions
@@ -57,15 +69,8 @@ SUBDIRS+=
 HEADER_TARGETDIRS+=
 
 # Options
-CXX = c++
-CC = cc
-CPPFLAGS+= -I$(INCLUDE)
-CXXFLAGS+= -Wall -g -fno-implicit-templates  -fno-exceptions
-PICFLAGS+= -fPIC -DPIC
-LFLAGS+= 
-INLINEDEPFLAG = -MD
-DEBIANDOC_HTML = yes
-DEBIANDOC_TEXT = yes
+include $(BUILD)/environment.mak
+CPPFLAGS+= -I$(BUILD)/include
 
 # Phony rules. Other things hook these by appending to the dependency
 # list

+ 6 - 2
configure.in

@@ -33,16 +33,17 @@ AC_SUBST(X11LIB)
 X11LIB=
 if test "$no_x" != "yes"; then
   X11LIB="-lx11"
+  AC_DEFINE(HAVE_X11)
 fi
 
 dnl Checks for Slang
-AC_CHECK_LIB(slang, init_SLang,SLANGLIB="-lslang")
+AC_CHECK_LIB(slang, init_SLang,[AC_DEFINE(HAVE_LIBSLANG) SLANGLIB="-lslang"])
 AC_SUBST(SLANGLIB)
 
 dnl Checks for GPM
 AC_ARG_WITH(gpm,[  --without-gpm		  do not use GPM mouse support])
 if test "$with_gpm" != "no"; then
-  AC_CHECK_LIB(gpm, Gpm_Open,GPMLIB="-lgpm")
+  AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
   AC_SUBST(GPMLIB)
 fi
 
@@ -84,3 +85,6 @@ AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
 
 AC_OUTPUT(environment.mak:buildlib/environment.mak.in)
+
+dnl Setup the directories
+mkdir doc bin obj include/apt-pkg include/deity