[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9004.0. "What are the COMMENT rule within a makefile?" by DRAGN::BOURQUARD (This is not here) Fri Feb 28 1997 13:53

I'm just getting my feet wet on Unix and I have some basic questions that I
hope someone can help with (another problem is that I don't have access to
a Unix system just yet, but I'm working on that).

What are the rules on using Comments within a Makefile?  I know that the
pound character (#) must be in the first column.  Anything else?

Is this valid syntax for a makefile?

Thanks  

-Dan

#
#
# Compiling STDL task workspaces
#
#						(* _ZCOMPILE_WKSP.._ *)
#                       # MYMTAB_wcompstart*
mymtabw.h : mymtabw.std
	stdl $(SFLAGS) -c mymtabw.std
#                       # MYMTAB_wcompend%
#						(* _..ZCOMPILE_WKSP_ *)
#
# Compiling Task0 group STDL file
#
tp_proj_task0_grp_svr.o : tp_proj0.std \
#						(* _ZTASK0_GRP_WKSP.._ *)
#                       # MYMTAB_wt0grpstart*
			mymtabw.std \
#                       # MYMTAB_wt0grpend%
#						(* _..ZTASK0_GRP_WKSP_ *)
			tp_projt.std
	stdl $(STDL_DEBUG) $(SFLAGS) -c tp_proj0.std
#
#
# Compiling tasks in the Task0 group STDL file
#
tp_proj1.o : tp_proj1.std \
#						(* _ZTASK0_WKSP.._ *)
#                       # MYMTAB_wt0start*
			mymtabw.std \
#                       # MYMTAB_wt0end%
#						(* _..ZTASK0_WKSP_ *)
			tp_proj0.std \
			tp_projt.std
	stdl $(STDL_DEBUG) $(SFLAGS) -t tp_proj1.std
#
#
# Compiling Task group STDL file
#
tp_proj_task_grp_cli.o \
tp_proj_task_grp_svr.o : tp_projt.std \
#						(* _ZTASK_GRP_WKSP.._ *)
#                       # MYMTAB_wtgrpstart*
			mymtabw.std \
#                       # MYMTAB_wtgrpend%
#						(* _..ZTASK_GRP_WKSP_ *)
			tp_proj0.std
	stdl $(STDL_DEBUG) $(SFLAGS) -c tp_projt.std
T.RTitleUserPersonal
Name
DateLines
9004.1VAXCPU::michaudJeff Michaud - ObjectBrokerFri Feb 28 1997 15:0523
> What are the rules on using Comments within a Makefile?  I know that the
> pound character (#) must be in the first column.  Anything else?

	I would not comment out lines in a makefile that follow an
	un-commented out line that has the continuation character at
	the end, as in the following:

> tp_proj1.o : tp_proj1.std \
> #						(* _ZTASK0_WKSP.._ *)
> #                       # MYMTAB_wt0start*
> 			mymtabw.std \
> #                       # MYMTAB_wt0end%
> #						(* _..ZTASK0_WKSP_ *)
> 			tp_proj0.std \
> 			tp_projt.std

	I've found this confuses make (if not on Digital UNIX, at least
	on some other platforms).

	And as I've also recently learned, I'm glad to see you have white space
	around the `:' that separates the target(s) from the dependencies,
	as VMS's make (MMS) does not like the `:' to be appended to the
	target name.
9004.2DRAGN::BOURQUARDThis is not hereMon Mar 03 1997 11:2211
Thanks Jeff,  that's a big help!

The history behind this is that I'm working on a code generator that creates
Visual Basic/ACMSxp client server applications.  One of the features is that
the code can be modified after generation and the changes will be retained by
the generator.  We do this through comments in the source code.  We may
have to come up with a better algorithm for identifying the code.

Thanks again.

Dan