Sponsored Content
Top Forums UNIX for Dummies Questions & Answers make and clean in a single rule in the makefile. Post 70197 by Perderabo on Tuesday 26th of April 2005 04:36:54 PM
Old 04-26-2005
Your "$(DAEMON_SO): OdbcSvApp.o $(SO) *.h" demands the presense of some .o file as a prerequisite. So "make" goes off and figures out how to make them. Once they exist, "make" runs the steps in this rule. Your first step is "-$(RM) *.o" (or equivalent). Then your second step barfs because there are no .o files.

create a new first rule something like:

default: cleanobj $(DAEMON_SO)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Clean file in single action

What one finds challenging another finds simple... (HPUX B.11.11) I have a text file named something like 12345.dst that could look like this: DOG CAT NONE TEST CAT What I want to end up with is 12345.dst looking like this: CAT DOG TEST removing "NONE" should it be there and... (1 Reply)
Discussion started by: djp
1 Replies

2. Shell Programming and Scripting

To make sure I don't violate rule #7

I am hoping to find out if it is possible to use some sort of UNIX programming/scripting tools to solve a problem I have with reformatting email messages that are sent out of my IBM UNIX (AIX) system. I'm thinking some advanced awk/sed may work I do not have the time or the ability to do this... (6 Replies)
Discussion started by: toddk
6 Replies

3. Shell Programming and Scripting

Makefile rule being skipped

I can't seem to get a rule in my Makefile to ever run... even if I change the rule to force make to re-enter the rule, or if I change the dependent files the rule depends on. Any ideas why the second rule is being ignored here? #MAKEFILES = $(DIRS:%=$(ROOT)/%/Makefile) #$(MAKEFILES):... (0 Replies)
Discussion started by: foureightyeast
0 Replies

4. Programming

A question about Makefile run by GNU make

Hello everybody, Currently I'm learning how to build projects (C programming) with GNU make. I have a problem with one Makefile and I would appreciate if you could kindly give me a hand. Here is the environment: OS: Redhat linux 5 compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)... (2 Replies)
Discussion started by: dariyoosh
2 Replies

5. Programming

Issue with make, no rule to make target etc.

I have been trying to split up my src directory to clear out files that are not re-compiled very often. Now I have the following setup in my trunk, trunk/bld trunk/src/ trunk/src/src_server trunk/makefile.linux In the make file, I have compile rules SOURCELOC = src # compile src c++... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

6. Shell Programming and Scripting

Need help with a script to make makefile

How do we create a shell script that creates a makefile? what if we want to use the #include header files too? (2 Replies)
Discussion started by: sslokhan
2 Replies

7. UNIX for Dummies Questions & Answers

Defining a new suffix rule in a Makefile

Hi everybody, I have a Makefile where a single suffix rule is defined: .SUFFIXES: .cpp .cpp.o: ${CXX} ${CXXFLAGS} -c -o $@ $< And I'd like to create another where an additional flag is added to compile in SMP. Right now, I have to do it like this: interface-smp.o:... (2 Replies)
Discussion started by: Zel2008
2 Replies

8. Programming

Makefile No rule to make target

I am trying to create a makefile to build a program and am getting the following error: make -f tsimplex.mk make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop. OPSYS = $(shell uname -s ) TARGET = tsimplex ROOTDIR = ../../.. GTSDIR =... (1 Reply)
Discussion started by: kristinu
1 Replies

9. Shell Programming and Scripting

Default rule to be executed in makefile

Hi all, I want to know the entry point (default rule to be executed) in a makefile once all defined variables are evaluated. I do not have all: in my makefile and I give "make" without any parameter in command line. thanks........ (3 Replies)
Discussion started by: useless79
3 Replies

10. Solaris

SunOS 5.5.1 usage of Makefile command in make file

I am new to Solaris and compilation using make files. I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder. In the make files present in subdirectories, I am seeing... (2 Replies)
Discussion started by: rajujayanthy
2 Replies
CPANPLUS::Dist::Base(3pm)				 Perl Programmers Reference Guide				 CPANPLUS::Dist::Base(3pm)

NAME
CPANPLUS::Dist::Base - Base class for custom distribution classes SYNOPSIS
package CPANPLUS::Dist::MY_IMPLEMENTATION use base 'CPANPLUS::Dist::Base'; sub prepare { my $dist = shift; ### do the 'standard' things $dist->SUPER::prepare( @_ ) or return; ### do MY_IMPLEMENTATION specific things ... ### don't forget to set the status! return $dist->status->prepared( $SUCCESS ? 1 : 0 ); } DESCRIPTION
CPANPLUS::Dist::Base functions as a base class for all custom distribution implementations. It does all the mundane work CPANPLUS would have done without a custom distribution, so you can override just the parts you need to make your own implementation work. FLOW
Below is a brief outline when and in which order methods in this class are called: $Class->format_available; # can we use this class on this system? $dist->init; # set up custom accessors, etc $dist->prepare; # find/write meta information $dist->create; # write the distribution file $dist->install; # install the distribution file $dist->uninstall; # remove the distribution (OPTIONAL) METHODS
@subs = $Class->methods Returns a list of methods that this class implements that you can override. $bool = $Class->format_available This method is called when someone requests a module to be installed via the superclass. This gives you the opportunity to check if all the needed requirements to build and install this distribution have been met. For example, you might need a command line program, or a certain perl module installed to do your job. Now is the time to check. Simply return true if the request can proceed and false if it can not. The "CPANPLUS::Dist::Base" implementation always returns true. $bool = $dist->init This method is called just after the new dist object is set up and before the "prepare" method is called. This is the time to set up the object so it can be used with your class. For example, you might want to add extra accessors to the "status" object, which you might do as follows: $dist->status->mk_accessors( qw[my_implementation_accessor] ); The "status" object is implemented as an instance of the "Object::Accessor" class. Please refer to its documentation for details. Return true if the initialization was successful, and false if it was not. The "CPANPLUS::Dist::Base" implementation does not alter your object and always returns true. $bool = $dist->prepare This runs the preparation step of your distribution. This step is meant to set up the environment so the "create" step can create the actual distribution(file). A "prepare" call in the standard "ExtUtils::MakeMaker" distribution would, for example, run "perl Makefile.PL" to find the dependencies for a distribution. For a "debian" distribution, this is where you would write all the metafiles required for the "dpkg-*" tools. The "CPANPLUS::Dist::Base" implementation simply calls the underlying distribution class (Typically "CPANPLUS::Dist::MM" or "CPANPLUS::Dist::Build"). Sets "$dist->status->prepared" to the return value of this function. If you override this method, you should make sure to set this value. $bool = $dist->create This runs the creation step of your distribution. This step is meant to follow up on the "prepare" call, that set up your environment so the "create" step can create the actual distribution(file). A "create" call in the standard "ExtUtils::MakeMaker" distribution would, for example, run "make" and "make test" to build and test a distribution. For a "debian" distribution, this is where you would create the actual ".deb" file using "dpkg". The "CPANPLUS::Dist::Base" implementation simply calls the underlying distribution class (Typically "CPANPLUS::Dist::MM" or "CPANPLUS::Dist::Build"). Sets "$dist->status->dist" to the location of the created distribution. If you override this method, you should make sure to set this value. Sets "$dist->status->created" to the return value of this function. If you override this method, you should make sure to set this value. $bool = $dist->install This runs the install step of your distribution. This step is meant to follow up on the "create" call, which prepared a distribution(file) to install. A "create" call in the standard "ExtUtils::MakeMaker" distribution would, for example, run "make install" to copy the distribution files to their final destination. For a "debian" distribution, this is where you would run "dpkg --install" on the created ".deb" file. The "CPANPLUS::Dist::Base" implementation simply calls the underlying distribution class (Typically "CPANPLUS::Dist::MM" or "CPANPLUS::Dist::Build"). Sets "$dist->status->installed" to the return value of this function. If you override this method, you should make sure to set this value. $bool = $dist->uninstall This runs the uninstall step of your distribution. This step is meant to remove the distribution from the file system. A "uninstall" call in the standard "ExtUtils::MakeMaker" distribution would, for example, run "make uninstall" to remove the distribution files the file system. For a "debian" distribution, this is where you would run "dpkg --uninstall PACKAGE". The "CPANPLUS::Dist::Base" implementation simply calls the underlying distribution class (Typically "CPANPLUS::Dist::MM" or "CPANPLUS::Dist::Build"). Sets "$dist->status->uninstalled" to the return value of this function. If you override this method, you should make sure to set this value. perl v5.18.2 2014-01-06 CPANPLUS::Dist::Base(3pm)
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy