General cleanup, and fixed the bug that caused an OBJDIR to be created under the normal OBJDIR.

This commit is contained in:
briano%netscape.com 1998-10-23 04:38:23 +00:00
Родитель ce6076d390
Коммит a063c97266
1 изменённых файлов: 76 добавлений и 100 удалений

Просмотреть файл

@ -1,4 +1,3 @@
#! gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
@ -23,15 +22,10 @@ include $(DEPTH)/cmd/unixfe/config/unixfe.mk
MODULE = xfeicons
LIBRARY_NAME = xfeicons
CSRCS = $(ICONS_GEN_SRC)
EXPORTS = $(ICONS_GEN_HDR) icondata.h
EXPORTS = icondata.h
REQUIRES = img java jtools layer nspr util xp xpcom
REQUIRES += \
$(XFE_JPEG_REQUIRES) \
$(XFE_PNG_REQUIRES) \
$(XFE_ZLIB_REQUIRES)
REQUIRES = img java jtools layer nspr util xp xpcom \
$(XFE_JPEG_REQUIRES) $(XFE_PNG_REQUIRES) $(XFE_ZLIB_REQUIRES)
LOCAL_INCLUDES = -I. -I$(OBJDIR)
@ -40,23 +34,7 @@ ICONS_GEN_SRC = $(OBJDIR)/icondata.c
include $(DEPTH)/config/rules.mk
#### NEXT FEW LINES ARE ONLY FOR TESTING -- full build!
#MOZ_MAIL_NEWS = 1
#MOZ_EDITOR = 1
#MOZ_OFFLINE = 1
#MOZ_LOC_INDEP = 1
#MOZ_TASKBAR = 1
#MOZ_LDAP = 1
#MOZ_ADMIN_LIB = 1
#MOZ_COMMUNICATOR_NAME = 1
#MOZ_JSD = 1
#MOZ_IFC_TOOLS = 1
#MOZ_NETCAST = 1
#MOZ_COMMUNICATOR_IIDS = 1
#MOZ_COMMUNICATOR_ABOUT = 1
#MOZ_COMMUNICATOR_CONFIG_JS = 1
#MOZ_COPY_ALL_JARS = 1
#### END OF TESTING LINES
OBJS = $(ICONS_GEN_SRC:.c=.o)
# See comment in icondata.c for why this is necessary.
DEFINES += -DXFE
@ -64,69 +42,65 @@ DEFINES += -DXFE
# Split the icons by portion of the product.
# Be careful to avoid hitting max line length on Irix,
# therefore, split the icon list among several variables.
ICONS = $(wildcard images/[AGIHL]*.gif images/BM*.gif images/DTB*.gif)
ICONS += $(wildcard images/Dash*.gif images/TB*.gif)
ICONS += \
images/Desk_AdminKit.gif \
images/Desk_Bookmark.gif \
images/Desk_Calendar.gif \
images/Desk_Communicator.gif \
images/Desk_Conference.gif \
images/Desk_History.gif \
images/Desk_Navigator.gif \
images/Desk_Search.gif \
images/SEC_Replace.gif \
images/Splash.gif \
images/cparent.gif
ICONS = $(wildcard images/[AGIHL]*.gif images/BM*.gif images/DTB*.gif)
ICONS += $(wildcard images/Dash*.gif images/TB*.gif)
ICONS += \
images/Desk_AdminKit.gif \
images/Desk_Bookmark.gif \
images/Desk_Calendar.gif \
images/Desk_Communicator.gif \
images/Desk_Conference.gif \
images/Desk_History.gif \
images/Desk_Navigator.gif \
images/Desk_Search.gif \
images/SEC_Replace.gif \
images/Splash.gif \
images/cparent.gif
# Icons for the Outliner
ICONS += $(wildcard images/hidecolumn*.gif images/showcolumn*.gif) \
images/oparent.gif
ICONS += $(wildcard images/hidecolumn*.gif images/showcolumn*.gif) \
images/oparent.gif
# Icons referenced in rosetta.h
ICONS += $(wildcard images/M_*.gif)
ICONS += $(wildcard images/M_*.gif)
MAIL_OR_COMPOSE_ICONS = $(wildcard images/MNC*.gif \
images/MNTB_Next*.gif \
images/MNTB_Forward*.gif \
images/MNAB_NewPerson*.gif \
images/MN_Draft*.gif \
images/MN_Collect*.gif \
images/MN_Template*.gif ) \
images/MN_MailAttach.gif \
images/MN_Person.gif \
images/MN_People.gif
MAIL_OR_COMPOSE_ICONS = $(wildcard images/MNC*.gif images/MNTB_Next*.gif \
images/MNTB_Forward*.gif images/MNAB_NewPerson*.gif \
images/MN_Draft*.gif images/MN_Collect*.gif \
images/MN_Template*.gif) \
images/MN_MailAttach.gif \
images/MN_Person.gif \
images/MN_People.gif
ifdef MOZ_MAIL_NEWS
ICONS += $(MAIL_OR_COMPOSE_ICONS) \
$(wildcard images/MNTB*.gif images/MNAB*.gif images/MN_*.gif) \
images/threadoff.gif \
images/threadon.gif \
images/Desk_Address.gif \
images/Desk_Collabra.gif \
images/Desk_Messenger.gif \
images/Desk_MsgCenter.gif \
images/Desk_NewMail.gif
ICONS += $(MAIL_OR_COMPOSE_ICONS) \
$(wildcard images/MNTB*.gif images/MNAB*.gif images/MN_*.gif) \
images/threadoff.gif \
images/threadon.gif \
images/Desk_Address.gif \
images/Desk_Collabra.gif \
images/Desk_Messenger.gif \
images/Desk_MsgCenter.gif \
images/Desk_NewMail.gif
endif
ifdef MOZ_MAIL_COMPOSE
ifndef MOZ_MAIL_NEWS
ICONS += $(MAIL_OR_COMPOSE_ICONS)
ICONS += $(MAIL_OR_COMPOSE_ICONS)
endif
ICONS += \
images/Desk_MsgCompose.gif
ICONS += images/Desk_MsgCompose.gif
endif
ifdef MOZ_EDITOR
ICONS += $(wildcard images/e*.gif images/Desk_Composer.gif)
ICONS += $(wildcard images/e*.gif images/Desk_Composer.gif)
endif
ifdef MOZ_TASKBAR
ICONS += $(wildcard images/Task*.gif)
ICONS += $(wildcard images/Task*.gif)
endif
ifdef MOZ_NETCAST
ICONS += images/Desk_Netcaster.gif
ICONS += images/Desk_Netcaster.gif
endif
ifdef NETSCAPE_COMMERCIAL
@ -135,43 +109,42 @@ else
ANIM = $(wildcard anim/main/*.gif)
endif
ICONLIST = $(OBJDIR)/icon.list
ICONANIMLIST = $(OBJDIR)/iconanim.list
MKICONS_EXE = $(OBJDIR)/mkicons
ICONLIST = $(OBJDIR)/icon.list
ICONANIMLIST = $(OBJDIR)/iconanim.list
MKICONS_EXE = $(OBJDIR)/mkicons
ifdef JAVA_OR_NSJVM
JAVA_JMC = $(DIST)/lib/libjmc.a # XXX To be removed...
JAVA_JMC = $(DIST)/lib/libjmc.a # XXX To be removed...
else
JAVA_JMC = $(DIST)/lib/libstubsj.a
JAVA_JMC = $(DIST)/lib/libstubsj.a
endif
MKICONS_LIB = \
$(DIST)/lib/libimg.a \
$(JAVA_JMC) \
$(DIST)/lib/libnspr21.a \
$(DIST)/lib/libutil.a \
$(DIST)/lib/libxp.a \
$(DIST)/lib/libplc21.a \
$(DIST)/lib/libxpcom.a \
$(XFE_MKICONS_PNG_LIB) \
$(XFE_MKICONS_ZLIB_LIB) \
$(XFE_MKICONS_JPEG_LIB) \
$(NULL)
$(DIST)/lib/libimg.a \
$(JAVA_JMC) \
$(DIST)/lib/libnspr21.a \
$(DIST)/lib/libutil.a \
$(DIST)/lib/libxp.a \
$(DIST)/lib/libplc21.a \
$(DIST)/lib/libxpcom.a \
$(XFE_MKICONS_PNG_LIB) \
$(XFE_MKICONS_ZLIB_LIB) \
$(XFE_MKICONS_JPEG_LIB) \
$(NULL)
MKICONS_DSOS = \
$(XFE_MKICONS_JPEG_DSO) \
$(XFE_MKICONS_PNG_DSO) \
$(XFE_MKICONS_ZLIB_DSO) \
$(NULL)
MKICONS_DSOS = \
$(XFE_MKICONS_JPEG_DSO) \
$(XFE_MKICONS_PNG_DSO) \
$(XFE_MKICONS_ZLIB_DSO) \
$(NULL)
GARBAGE += $(MKICONS_EXE) \
$(ICONS_GEN_HDR) \
$(ICONS_GEN_HDR).tmp \
$(ICONS_GEN_SRC) \
$(wildcard $(ICONS_GEN_HDR)*) \
$(wildcard $(ICONS_GEN_SRC)*) \
$(ICONLIST) \
$(ICONANIMLIST)
MKICONS_EXTRA = $(MKICONS_DSOS) $(OS_LIBS) -lm
MKICONS_EXTRA = $(MKICONS_DSOS) $(OS_LIBS) -lm
#######################################################################
# Rules to build mkicons program and then icondata.c
@ -196,14 +169,17 @@ ifneq ($(ANIM),)
endif
$(ICONS_GEN_HDR): $(ICONLIST)
@sed 's/^images\/\(.*\)\.gif.*/extern struct fe_icon_data \1;/; y/./_/;' \
$(ICONLIST) > $@.$$$$ \
&& if [ ! -f $(ICONS_GEN_HDR) -o "`cmp $@.$$$$ $@`" != "" ] ; then \
echo Generating $@ from $(ICONLIST); \
\mv -f $@.$$$$ $@; \
fi
@rm -f $@.tmp
@sed 's/^images\/\(.*\)\.gif.*/extern struct fe_icon_data \1;/; y/./_/;' $(ICONLIST) > $@.tmp
@if test ! -f $@; then touch $@; else true; fi
@if test ! -z "`diff $@.tmp $@`"; then rm -f $@; mv $@.tmp $@; else true; fi
$(ICONS_GEN_SRC): icondata.h $(ICONANIMLIST) $(MKICONS_EXE) $(ICONS_GEN_HDR)
$(MKICONS_EXE) -no-xfe-define - < $(ICONANIMLIST) > $@.$$$$ && mv $@.$$$$ $@
@rm -f $@
$(MKICONS_EXE) -no-xfe-define - < $(ICONANIMLIST) > $@
$(LIBRARY): $(OBJS)
export:: $(ICONS_GEN_HDR) $(DIST)/include
$(INSTALL) -m 444 $^