Re: Some build. sys. improvs. (Cygwin in particular)

Tuomo Valkonen <[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
On 2008-01-07 20:45 +0200, Tuomo Valkonen wrote:
> The attached patch contains some improvements to the Ion build system,
> in particular for hopefully better Cygwin support. It does contain
> quite big modifications (to do things in one place instead of a zillion
> Makefiles), and I'd rather not make another RC release, so I'd appreciate
> people checking that it (still) works, even on non-Cygwin configurations,
> but in particular on that.

And the attachment... *sigh*

-- 
Tuomo
build.diff (text/plain, 6.6 KB)
Mon Jan  7 20:39:24 EET 2008  Tuomo Valkonen <[email protected]>
  * Some build system improvements for nicer .exe handling
Mon Jan  7 20:02:53 EET 2008  Tuomo Valkonen <[email protected]>
  * Added CF_NO_GET_LOADAVG
Sun Jan  6 22:41:19 EET 2008  Tuomo Valkonen <[email protected]>
  * Dockapp WM_CLASS hack had been broken. Fixed.
Fri Jan  4 17:25:05 EET 2008  Tuomo Valkonen <[email protected]>
  * Removed defer-pending on destroy warning
Thu Jan  3 20:49:45 EET 2008  Tuomo Valkonen <[email protected]>
  * Bah, statusd build was still broken
Thu Jan  3 20:23:46 EET 2008  Tuomo Valkonen <[email protected]>
  tagged ion-3rc-20080103
diff -rN old-ixx/build/rules.mk new-ixx/build/rules.mk
18a19,29
> ifdef EXTRA_EXECUTABLE
> EXECUTABLE := $(EXTRA_EXECUTABLE)
> BINDIR_ := $(EXTRABINDIR)
> endif
> 
> ifdef EXECUTABLE
> BINDIR_ ?= $(BINDIR)
> EXECUTABLE_ := $(EXECUTABLE)$(BIN_SUFFIX)
> TARGETS := $(TARGETS) $(EXECUTABLE_)
> endif
> 
89a101,136
> 
> ifdef EXECUTABLE
> 
> ifdef MODULE_LIST
> ifdef MODULE_PATH
> ifeq ($(PRELOAD_MODULES),1)
> EXT_OBJS += $(foreach mod, $(MODULE_LIST), $(MODULE_PATH)/$(mod)/$(mod).a)
> DEPEND_DEPENDS += preload.c
> SOURCES += preload.c
> TO_CLEAN += preload.c
> else # !PRELOAD_MODULES
> LDFLAGS += $(EXPORT_DYNAMIC)
> WHOLEA = -Wl,-whole-archive
> NO_WHOLEA = -Wl,-no-whole-archive
> endif # !PRELOAD_MODULES
> 
> preload.c:
> 	$(LUA) $(TOPDIR)/build/mkpreload.lua $(MODULE_LIST) > preload.c
> 
> endif # MODULE_PATH
> endif # MODULE_LIST
> 
> ifeq ($(RELOCATABLE),1)
> DEFINES += -DCF_RELOCATABLE_BIN_LOCATION=\"$(BINDIR_)/$(EXECUTABLE)\"
> endif
> 
> $(EXECUTABLE_): $(OBJS) $(EXT_OBJS)
> 	$(CC) $(OBJS) $(WHOLEA) $(EXT_OBJS) $(NO_WHOLEA) $(LDFLAGS) -o $@
> 
> executable_install:
> 	$(INSTALLDIR) $(BINDIR_)
> 	$(INSTALLBIN) $(EXECUTABLE_) $(BINDIR_)
> 
> endif # EXECUTABLE
> 
> 
diff -rN old-ixx/ion/Makefile new-ixx/ion/Makefile
14c14
< SOURCES=ion.c
---
> EXECUTABLE = ion3
16c16
< TARGETS=ion3
---
> SOURCES = ion.c
18c18
< INCLUDES += $(X11_INCLUDES) 
---
> INCLUDES += $(X11_INCLUDES)
22c22
< LIBS += $(X11_LIBS)
---
> LIBS += $(X11_LIBS) -lSM -lICE
27,41c27
< ifeq ($(PRELOAD_MODULES),1)
< EXT_OBJS += $(foreach mod, $(MODULE_LIST), ../$(mod)/$(mod).a)
< DEPEND_DEPENDS += preload.c
< SOURCES += preload.c
< TO_CLEAN += preload.c
< LIBS += -lSM -lICE
< else
< LDFLAGS += $(EXPORT_DYNAMIC)
< WHOLEA = -Wl,-whole-archive
< NO_WHOLEA = -Wl,-no-whole-archive
< endif
< 
< ifeq ($(RELOCATABLE),1)
< DEFINES += -DCF_RELOCATABLE_ION3_LOCATION=\"$(BINDIR)/ion3\"
< endif
---
> MODULE_PATH = $(TOPDIR)
57,58d42
< ion3: $(OBJS) $(EXT_OBJS)
< 	$(CC) $(OBJS) $(WHOLEA) $(EXT_OBJS) $(NO_WHOLEA) $(LDFLAGS) -o $@
60,61c44
< preload.c:
< 	$(LUA) ../build/mkpreload.lua $(MODULE_LIST) > preload.c
---
> _install: executable_install
63,65d45
< _install:
< 	$(INSTALLDIR) $(BINDIR)
< 	$(INSTALLBIN) ion3 $(BINDIR)
diff -rN old-ixx/ion/ion.c new-ixx/ion/ion.c
154,155c154,155
< #ifdef CF_RELOCATABLE_ION3_LOCATION
<     prefix_set(argv[0], CF_RELOCATABLE_ION3_LOCATION);
---
> #ifdef CF_RELOCATABLE_BIN_LOCATION
>     prefix_set(argv[0], CF_RELOCATABLE_BIN_LOCATION);
diff -rN old-ixx/ioncore/clientwin.c new-ixx/ioncore/clientwin.c
511,514c511
< 
<                 win=icon_win;
<                 attr=icon_attr;
< 
---
>                 
527a525,527
>                 
>                 win=icon_win;
>                 attr=icon_attr;
diff -rN old-ixx/libmainloop/defer.c new-ixx/libmainloop/defer.c
20a21
> #include <libtu/debug.h>
81c82
<     warn(TR("Object destroyed while deferred actions are still pending."));
---
>     D(warn(TR("Object destroyed while deferred actions are still pending.")));
diff -rN old-ixx/pwm/Makefile new-ixx/pwm/Makefile
14c14
< SOURCES=pwm.c
---
> EXECUTABLE = pwm3
16c16
< ETC = cfg_pwm.lua
---
> SOURCES = pwm.c
18c18
< TARGETS = pwm3
---
> ETC = cfg_pwm.lua
24c24
< LIBS += $(X11_LIBS)
---
> LIBS += $(X11_LIBS) -lSM -lICE
29,43c29
< ifeq ($(PRELOAD_MODULES),1)
< EXT_OBJS += $(foreach mod, $(PWM_MODULE_LIST), ../$(mod)/$(mod).a)
< DEPEND_DEPENDS += preload.c
< SOURCES += preload.c
< TO_CLEAN += preload.c
< LIBS += -lSM -lICE
< else
< LDFLAGS += $(EXPORT_DYNAMIC)
< WHOLEA = -Wl,-whole-archive
< NO_WHOLEA = -Wl,-no-whole-archive
< endif
< 
< ifeq ($(RELOCATABLE),1)
< DEFINES += -DCF_RELOCATABLE_PWM3_LOCATION=\"$(BINDIR)/pwm3\"
< endif
---
> MODULE_PATH = $(TOPDIR)
65,73c51
< pwm3: $(OBJS) $(EXT_OBJS)
< 	$(CC) $(OBJS) $(WHOLEA) $(EXT_OBJS) $(NO_WHOLEA) $(LDFLAGS) -o $@
< 
< preload.c:
< 	$(LUA) ../build/mkpreload.lua $(PWM_MODULE_LIST) > preload.c
< 
< _install:
< 	$(INSTALLDIR) $(BINDIR)
< 	$(INSTALLBIN) pwm3 $(BINDIR)
---
> _install: executable_install
diff -rN old-ixx/pwm/pwm.c new-ixx/pwm/pwm.c
101,102c101,102
< #ifdef CF_RELOCATABLE_PWM3_LOCATION
<     prefix_set(argv[0], CF_RELOCATABLE_PWM3_LOCATION);
---
> #ifdef CF_RELOCATABLE_BIN_LOCATION
>     prefix_set(argv[0], CF_RELOCATABLE_BIN_LOCATION);
diff -rN old-ixx/system.mk new-ixx/system.mk
41a42,44
> # Executable suffix (for Cygwin).
> #BIN_SUFFIX = .exe
> 
134a138,140
> # Cygwin needs this.
> #DEFINES += -DCF_NO_GETLOADAVG
> 
diff -rN old-ixx/utils/ion-completefile/Makefile new-ixx/utils/ion-completefile/Makefile
11,13c11
< LIBS += $(LIBTU_LIBS)
< INCLUDES += $(LIBTU_INCLUDES)
< CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE)
---
> EXTRA_EXECUTABLE = ion-completefile
17c15,17
< TARGETS=ion-completefile
---
> LIBS += $(LIBTU_LIBS)
> INCLUDES += $(LIBTU_INCLUDES)
> CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE)
25,30c25
< ion-completefile: $(SOURCES)
< 	$(CC) $< $(CFLAGS) $(LDFLAGS) -o $@
< 
< _install:
< 	$(INSTALLDIR) $(EXTRABINDIR)
< 	$(INSTALLBIN) ion-completefile $(EXTRABINDIR)
---
> _install: executable_install
diff -rN old-ixx/utils/ion-statusd/Makefile new-ixx/utils/ion-statusd/Makefile
10a11,14
> EXTRA_EXECUTABLE = ion-statusd
> 
> SOURCES = ion-statusd.c exec.c extlrx.c
> 
17,18c21
< 	   -DLCDIR=\"$(LCDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" \
<            -DSTATUSD_LOCATION=\"$(EXTRABINDIR)/ion-statusd\"
---
> 	   -DLCDIR=\"$(LCDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
20,23d22
< SOURCES = ion-statusd.c exec.c extlrx.c
< 
< TARGETS = ion-statusd
< 
36,41c35
< ion-statusd: $(OBJS) $(EXT_OBJS)
< 	$(CC) $(OBJS) $(EXT_OBJS) $(LDFLAGS) -o $@
< 
< _install: lc_install
< 	$(INSTALLDIR) $(EXTRABINDIR)
< 	$(INSTALLBIN) ion-statusd $(EXTRABINDIR)
---
> _install: lc_install executable_install
diff -rN old-ixx/utils/ion-statusd/ion-statusd.c new-ixx/utils/ion-statusd/ion-statusd.c
164,165c164,165
< #ifdef STATUSD_LOCATION
<     prefix_set(argv[0], STATUSD_LOCATION);
---
> #ifdef CF_RELOCATABLE_BIN_LOCATION
>     prefix_set(argv[0], CF_RELOCATABLE_BIN_LOCATION);
302a303
> #ifndef CF_NO_GETLOADAVG
314c315
<         
---
> #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.