environment settings

Mark Brethen mark.brethen at gmail.com
Tue Nov 27 01:58:04 UTC 2018


Attached is my current portfile which builds both a static archive and dynamic library.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 1988 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181126/ff32dc2d/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-taucs-build.diff
Type: application/octet-stream
Size: 4469 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181126/ff32dc2d/attachment-0003.obj>
-------------- next part --------------


The last thing to do is build the example programs that can be used to test Tarcs:

#for the second pass through WRKSRC_SHARED, use a nonexistent MAKEOBJDIR to
71	#prevent make from entering the obj subdirectories and breaking the build (see,
72	#for example, the description of .OBJDIR in make(1)):
73	        (cd ${WRKSRC}_SHARED && \
74	                ${SETENV} ${MAKE_ENV} MAKEOBJDIR="${NONEXISTENT}" \
75	                ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${BINS:S|^|bin/FreeBSD/|})

which corresponds to

$(DIREXE)direct$(EXEEXT): $(STDDEPS) $(DIROBJ)direct$(OBJEXT) $(DIRLIB)libtaucs$(LIBEXT)
	$(LD) $(LDFLAGS) \
	$(LOUTFLG)$(DIREXE)direct$(EXEEXT) \
	$(DIROBJ)direct$(OBJEXT) \
	-L$(DIRLIB) -ltaucs \
	$(LIBS)
$(DIREXE)taucs_run$(EXEEXT): $(STDDEPS) $(DIROBJ)taucs_run$(OBJEXT) $(DIRLIB)libtaucs$(LIBEXT)
	$(LD) $(LDFLAGS) \
	$(LOUTFLG)$(DIREXE)taucs_run$(EXEEXT) \
	$(DIROBJ)taucs_run$(OBJEXT) \
	-L$(DIRLIB) -ltaucs \
	$(LIBS)
$(DIREXE)iter$(EXEEXT): $(STDDEPS) $(DIROBJ)iter$(OBJEXT) $(DIRLIB)libtaucs$(LIBEXT)
	$(LD) $(LDFLAGS) \
	$(LOUTFLG)$(DIREXE)iter$(EXEEXT) \
	$(DIROBJ)iter$(OBJEXT) \
	-L$(DIRLIB) -ltaucs \
	$(LIBS)

in the makefile. They set a nonexistent directory using OBJDIR with BSD make. Gnu make does not have this option, does it? It seems rediculus to have to build the library each time. Can I issue these with ‘system', omitting the library object?


Mark Brethen
mark.brethen at gmail.com



> On Nov 26, 2018, at 11:45 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> 
> 
> On Nov 26, 2018, at 10:51, Mark Brethen wrote:
> 
>> On Nov 26, 2018, at 10:39 AM, Ryan Schmidt wrote:
>> 
>>> For example, I see here that they make a copy of the configured source directory so that they can build libtaucs.a "normally" in the first directory and then with position-independent code in the second directory so that a shared library can be created from it.
>> 
>> You are referring to the $(PICFLAG) variable in the second build?
> 
> Yes.
> 
>> I wondered about that, and had read that it wasn’t necessary for Mac OSX?
> 
> Yes. PIC is on by default on macOS.
> 



More information about the macports-dev mailing list