Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3455026
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:33:48+00:00 2026-05-18T09:33:48+00:00

I have a following Makefile for tiobench. I wrote it. The problem is, when

  • 0

I have a following Makefile for tiobench. I wrote it. The problem is, when I do make all , this does not leave me in the install directory as it should. Why ?

# Makefile for tiotest

#include $(shell while [ "`pwd`" != / -a \! -r options.mk ]; do cd .. ; done ; pwd )/options.mk

#CFLAGS=-O3 -fomit-frame-pointer -Wall
CFLAGS=-O2 -Wall

#DEFINES=-DUSE_MMAP 
#-DUSE_MADVISE

# This enables support for 64bit file offsets, allowing
# possibility to test with files larger than (2^31) bytes.

#DEFINES=-DLARGEFILES

#DEFINES=

MODULE=tiotest
PROJECT=tiobench
# do it once instead of each time referenced
VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
DISTNAME=$(PROJECT)-$(VERSION)

INSTALL := $(CURDIR)/install
INSTALL_DIR := $(INSTALL)/test/bin
BOM := $(CURDIR)/BOM
BUILDRESULTS := $(CURDIR)/buildresults
MODULE := tiotest

build: $(MODULE)

crc32.o: crc32.c crc32.h
    $(CC) -c $(CFLAGS) $(DEFINES) crc32.c -o crc32.o

tiotest.o: tiotest.c tiotest.h crc32.h crc32.c Makefile
    $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o

$(MODULE): tiotest.o crc32.o
    $(CC) -o $(MODULE) tiotest.o crc32.o -lpthread
    @echo
    @echo "./tiobench.pl --help for usage options"
    @echo

configure:

clean: clean-install
    rm -f tiotest.o crc32.o $(MODULE) core

distclean: clean

clean-install:
    -rm -rf $(INSTALL) $(BUILDRESULTS)

install: clean-install build
    mkdir -p $(INSTALL_DIR)
    cp $(MODULE) $(INSTALL_DIR)
    #$(STRIP) $(INSTALL_DIR)/$(MODULE)
    @echo install tree is in $(INSTALL)

buildresults: install
    mkdir $(BUILDRESULTS)
    cd install && tar cf - `cat $(BOM)` | (cd $(BUILDRESULTS) ; tar xfp -)
    @echo buildresults tree is in $(BUILDRESULTS)

all: distclean configure build install buildresults

.PHONY: build clean-install install buildresults clean distclean all
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:33:49+00:00Added an answer on May 18, 2026 at 9:33 am

    the commands are run in a sub shell. they can’t effect the current working directory of the shell from which you ran make all

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to just type 'make all' and have the following Makefile do everything
I have the following error during sqlite3-ruby install: Building native extensions. This could take
I have a makefile which does the usual directory creation: $(Release_target_OBJDIR)/%.o: %.cpp mkdir -p
In a makefile, I have the following line: helper.cpp: dtds.h Which ensures that helper.cpp
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I have the following makefile that I use to build a program (a kernel,
I have the following makefile for my project, and I'd like to configure it
I have the following makefile for my program. It creates program.o file, but when
I have the following Makefile to build my erlang project: .SUFFIXES: .erl .beam .yrl
I have the following makefile (fragment) SRC_DIR = src OBJ_DIR = obj DEP_DIR =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.