Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!austing From: austing@Apple.COM (Glenn L. Austin) Newsgroups: comp.sys.mac.programmer Subject: Re: C -I bug in MakeFile's... Message-ID: <28848@apple.Apple.COM> Date: 12 Apr 89 18:14:12 GMT References: Organization: Apple Computer Inc, Cupertino, CA Lines: 39 In article wb1j+@andrew.cmu.edu (William M. Bumgarner) writes: >Through experimentation, I have concluded that the problem w/-I flag for the >c compiler is a bug and not a product of my own stupidity (though that >possibility hasn't been entirely ruled out). > >I slept on it (14 hours) and then tried every permutation of the -I that I >could think of (including the ones reccommended on the net and the one >in the documentation). > >Settings/Variables/Environments: > >{CIncludes.bum} is a valid path to my custom/special include files. It is >defined and export'ed in UserStartup(dot)bum. It is valid: >open {CIncludes.bum}CDRom.h >opens the file CDRom.h in the specified directory. I also had the functions work correctly in the worksheet but not in makefiles if the script that exported the variable was simply run from either another script or from the shell. *THIS IS THE CORRECT WAY FOR MPW SHELL TO WORK* If you want the variables to be available to other scripts, you either have to define them directly from the shell, or make sure that your startup scripts have "EXECUTE scriptname" and not just "scriptname". This was put in just for this eventuality. A make file (and by inference BuildProgram) creates a list of commands that usually are executed as a script. If you are still having problems, type "EXPORT Cincludes.bum" in the shell and then attempting your makefile again -- chances are that it will then work correctly. Make *SURE* that your UserStartup and Startup files EXECUTE other scripts -- not just name the script. If they do, your variables will work fine in the shell but not in other scripts. ----------------------------------------------------------------------------- | Glenn L. Austin | The nice thing about standards is that | | Apple Computer, Inc. | there are so many of them to choose from. | | Internet: austing@apple.com | -Andrew S. Tanenbaum | ----------------------------------------------------------------------------- | All opinions stated above are mine -- who else would want them? | -----------------------------------------------------------------------------