- fixed IDL_COMPILE (undefined!) to XPIDL_COMPILE

- made the make stop and error when XPIDLSRCS is defined but MODULE isn't.

- made the make warn when generating (from idl) a .h file that overrides an existing .h file.
This commit is contained in:
mccabe%netscape.com 1999-05-08 22:28:49 +00:00
Родитель 3ba3f65dfd
Коммит 243f7c02d3
1 изменённых файлов: 13 добавлений и 4 удалений

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

@ -888,7 +888,14 @@ endif
# moving them to the appropriate places.
ifneq ($(XPIDLSRCS),)
ifneq ($(MODULE),) # we need $(MODULE) to make $(MODULE).xpt
ifeq ($(MODULE),) # we need $(MODULE) to make $(MODULE).xpt
export:: FORCE
@echo
@echo "Error processing XPIDLSRCS:"
@echo "Please define MODULE when defining XPIDLSRCS,"
@echo "so we have a module name to use when creating MODULE.xpt."
@echo; sleep 2; false
else
# export .idl files to $(XPDIST)/idl
$(XPDIST)/idl::
@ -897,13 +904,15 @@ $(XPDIST)/idl::
export:: $(XPIDLSRCS) $(XPDIST)/idl
$(INSTALL) -m 444 $^
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(XPDIST)/include
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(XPDIST)/include;
# warn against overriding existing .h file.
$(XPIDL_GEN_DIR):
@if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
# XXX add warning here for overriding existing .h file
$(XPIDL_GEN_DIR)/%.h: %.idl $(IDL_COMPILE) $(XPIDL_GEN_DIR)
$(IDL_COMPILE) -m header -w -I $(XPDIST)/idl -o $(XPIDL_GEN_DIR)/$* $<
$(XPIDL_COMPILE) -m header -w -I $(XPDIST)/idl -o $(XPIDL_GEN_DIR)/$* $<
@if test -e $(srcdir)/$*.h; \
then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; fi
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(XPDIST)/include
$(INSTALL) -m 444 $^