%% "Wagner, Phillip W." <[EMAIL PROTECTED]> writes:
wpw> 1. While using the -win32 shell how does one correctly expand an
wpw> environment variable for usage on the command line. The
wpw> %DOS_VARIABLE% doesn't always expand when executing a command.
wpw> It appears to still be passing commands through the BASH shell
wpw> though the --win32 option is selected.
You should ask Windows questions on the [EMAIL PROTECTED] mailing list;
there are more Windows-knowledgeable folks there.
wpw> 2. I am dealing with a compiler that will create a target file (
wpw> .i or .obj) with a zero size when it errors. I need to allow
wpw> make to execute with errors suppressed as "acceptable"
wpw> warnings occur that stop make. Is there a way that make would
wpw> be able to check for files with 0 size to force them to be
wpw> rebuilt? Otherwise with the correct file date time stamp make
wpw> will consider the files complete and not try a rebuild.
You will have to change the rule that you use to detect this situation
and remove the file for you. If you were using a UNIX shell I'd suggest
something like this:
%.o : %.c
@echo $(COMPILE.c) -o $@ -c $<; \
$(COMPILE.c) -o $@ -c $< && exit 0; \
r=$$?; \
rm -f $@; \
exit $$r
If you don't have a UNIX shell you'll have to figure it out yourself.
wpw> 3. Are there any examples of using the macro definitions to
wpw> create a file. What is needed is the ability to create a file
wpw> on the fly that the bind tool will use as an input for the
wpw> creation of an OMF (executable) file.
There is no way to create a file from within a makefile, except as part
of a target command script:
foo:
echo first line > $@
echo second line >> $@
echo third line >> $@
etc. Or, you could try using the $(shell ...) function but you'd
probably run into command line length limitations there as well.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make